api

http4k / org.http4k.lens / MultiLensSpec

MultiLensSpec

interface MultiLensSpec<IN : Any, OUT>

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

Functions

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

Inheritors

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