api

http4k / org.http4k.lens / MultiLensSpec

MultiLensSpec

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

Represents a uni-directional extraction of a list of entities from a target.

Functions

Name Summary
defaulted abstract fun defaulted(name: String, default: List<OUT>, description: String? = null): Lens<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.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.
optional abstract fun optional(name: String, description: String? = null): Lens<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? = null): Lens<IN, List<OUT>>
Make a concrete Lens for this spec that looks for a required list of values in the target.

Extension Functions

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

Inheritors

Name Summary
BiDiMultiLensSpec interface BiDiMultiLensSpec<IN : Any, OUT> : MultiLensSpec<IN, OUT>
Represents a bi-directional extraction of a list of entities from a target, or an insertion into a target.