core
/
dev.fritz2.lenses
/
Lens
common
js
Lens
interface
Lens
<
P
,
T
>
Content copied to clipboard
Describes a focus point into a data structure, i.e. a property of a given complex entity
Functions
Properties
Extensions
Functions
apply
Link copied to clipboard
common
open suspend fun
apply
(parent:
P
, mapper: suspend (
T
) ->
T
):
P
Content copied to clipboard
manipulates the focus target's value inside the
parent
equals
Link copied to clipboard
common
open operator fun
equals
(other:
Any
?):
Boolean
Content copied to clipboard
get
Link copied to clipboard
common
abstract fun
get
(parent:
P
):
T
Content copied to clipboard
gets the value of the focus target
hashCode
Link copied to clipboard
common
open fun
hashCode
():
Int
Content copied to clipboard
plus
Link copied to clipboard
common
open operator fun <
X
>
plus
(other:
Lens
<
T
,
X
>):
Lens
<
P
,
X
>
Content copied to clipboard
appends to
Lens
es so that the resulting
Lens
points from the parent of the
Lens
this is called on to the target of
other
set
Link copied to clipboard
common
abstract fun
set
(parent:
P
, value:
T
):
P
Content copied to clipboard
sets the value of the focus target
toString
Link copied to clipboard
common
open fun
toString
():
String
Content copied to clipboard
Properties
id
Link copied to clipboard
common
abstract val
id
:
String
Content copied to clipboard
identifies the focus of this lens
Extensions
asString
Link copied to clipboard
js
fun <
P
>
Lens
<
P
,
Byte
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Byte
to
String
fun <
P
>
Lens
<
P
,
Byte
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Byte
to
String
fun <
P
>
Lens
<
P
,
Short
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Short
to
String
fun <
P
>
Lens
<
P
,
Short
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Short
to
String
fun <
P
>
Lens
<
P
,
Int
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Int
to
String
fun <
P
>
Lens
<
P
,
Int
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Int
to
String
fun <
P
>
Lens
<
P
,
Long
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Long
to
String
fun <
P
>
Lens
<
P
,
Long
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Long
to
String
fun <
P
>
Lens
<
P
,
Double
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Double
to
String
fun <
P
>
Lens
<
P
,
Double
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Double
to
String
fun <
P
>
Lens
<
P
,
Float
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Float
to
String
fun <
P
>
Lens
<
P
,
Float
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Float
to
String
fun <
P
>
Lens
<
P
,
Boolean
>.
asString
():
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Boolean
to
String
fun <
P
>
Lens
<
P
,
Boolean
?>.
asString
(emptyValue:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
Boolean
to
String
fun <
P
>
Lens
<
P
,
List
<
Byte
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
Byte
to
String
fun <
P
>
Lens
<
P
,
List
<
Short
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
Short
to
String
fun <
P
>
Lens
<
P
,
List
<
Int
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
Int
to
String
fun <
P
>
Lens
<
P
,
List
<
Long
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
Long
to
String
fun <
P
>
Lens
<
P
,
List
<
Double
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
Double
to
String
fun <
P
>
Lens
<
P
,
List
<
Float
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
Float
to
String
fun <
P
>
Lens
<
P
,
List
<
String
>>.
asString
(separator:
String
= ", ", prefix:
String
= "", postfix:
String
= ""):
Lens
<
P
,
String
>
Content copied to clipboard
Creates a
Lens
from
List
of
String
to
String