api

http4k / org.http4k.lens / BiDiMultiLensSpec

BiDiMultiLensSpec

interface BiDiMultiLensSpec<IN : Any, OUT> : MultiLensSpec<IN, OUT> (source)

Represents a bi-directional extraction of a list of entities from a target, or an insertion into a target.

Functions

Name Summary
defaulted abstract fun defaulted(name: String, default: List<OUT>, description: String?): BiDiLens<IN, List<OUT>>
Make a concrete Lens for this spec that fall back to the default list of values if no values are found in the target.
optional abstract fun optional(name: String, description: String?): BiDiLens<IN, List<OUT>?>
Make a concrete Lens for this spec that looks for an optional list of values in the target.
required abstract fun required(name: String, description: String?): BiDiLens<IN, List<OUT>>
Make a concrete Lens for this spec that looks for a required list of values in the target.

Inherited Functions

Name Summary
defaulted abstract fun defaulted(name: String, default: Lens<IN, List<OUT>>, description: String? = null): Lens<IN, List<OUT>>
Make a concrete Lens for this spec that falls back to another lens if no values are found in the target.

Extension Functions

Name Summary
with fun <T> T.with(vararg modifiers: (T) -> T): T