toggle menu
http4k
6.9.0.0
jvm
switch theme
search in API
http4k-core
/
org.http4k.lens
/
BiDiMapping
Bi
Di
Mapping
open
class
BiDiMapping
<
IN
,
OUT
>
(
val
clazz
:
Class
<
OUT
>
,
val
asOut
:
(
IN
)
->
OUT
,
val
asIn
:
(
OUT
)
->
IN
)
A BiDiMapping defines a reusable bidirectional transformation between an input and output type
Members
Constructors
Bi
Di
Mapping
Link copied to clipboard
constructor
(
clazz
:
Class
<
OUT
>
,
asOut
:
(
IN
)
->
OUT
,
asIn
:
(
OUT
)
->
IN
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
as
In
Link copied to clipboard
val
asIn
:
(
OUT
)
->
IN
as
Out
Link copied to clipboard
val
asOut
:
(
IN
)
->
OUT
clazz
Link copied to clipboard
val
clazz
:
Class
<
OUT
>
Functions
invoke
Link copied to clipboard
@
JvmName
(
name
=
"asIn"
)
operator
fun
invoke
(
out
:
OUT
)
:
IN
@
JvmName
(
name
=
"asOut"
)
operator
fun
invoke
(
asIn
:
IN
)
:
OUT
map
Link copied to clipboard
inline
fun
<
NEXT
>
map
(
crossinline
nextOut
:
(
OUT
)
->
NEXT
,
crossinline
nextIn
:
(
NEXT
)
->
OUT
)
:
BiDiMapping
<
IN
,
NEXT
>