Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <TARGET : Any, T> BiDiLensSpec<TARGET, String>.composite(crossinline fn: BiDiLensSpec<TARGET, String>.(TARGET) -> T): Lens<TARGET, T>

This allows creation of a composite object from several values from the same source.

inline fun <TARGET : Any, T> BiDiLensSpec<TARGET, String>.composite(crossinline getFn: BiDiLensSpec<TARGET, String>.(TARGET) -> T, crossinline setFn: T.(TARGET) -> TARGET): BiDiLens<TARGET, T>
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.csv(delimiter: String = ","): BiDiLensSpec<IN, List<String>>
fun <IN : Any, T : Any> BiDiLensSpec<IN, String>.csv(delimiter: String = ",", mapElement: BiDiMapping<String, T>): BiDiLensSpec<IN, List<T>>
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.dateTime(formatter: DateTimeFormatter = ISO_LOCAL_DATE_TIME): BiDiLensSpec<IN, LocalDateTime>
Link copied to clipboard
open override fun defaulted(name: String, default: String, description: String?, metadata: Map<String, Any>): BiDiLens<HttpMessage, String>

Make a concrete Lens for this spec that falls back to the default value if no value is found in the target.

open override fun defaulted(name: String, default: LensExtractor<HttpMessage, String>, description: String?, metadata: Map<String, Any>): BiDiLens<HttpMessage, String>

Make a concrete Lens for this spec that falls back to another lens if no value is found in the target.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <IN : Any, T : Enum<T>> BiDiLensSpec<IN, String>.enum(): BiDiLensSpec<IN, T>
inline fun <T : Enum<T>> Header.enum(caseSensitive: Boolean = true): BiDiLensSpec<HttpMessage, T>
inline fun <IN : Any, T : Enum<T>> BiDiLensSpec<IN, String>.enum(noinline nextOut: (String) -> T, noinline nextIn: (T) -> String): BiDiLensSpec<IN, T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.localDate(formatter: DateTimeFormatter = ISO_LOCAL_DATE): BiDiLensSpec<IN, LocalDate>
Link copied to clipboard
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.localTime(formatter: DateTimeFormatter = ISO_LOCAL_TIME): BiDiLensSpec<IN, LocalTime>
Link copied to clipboard
Link copied to clipboard
fun <NEXT> map(nextIn: (String) -> NEXT, nextOut: (NEXT) -> String): BiDiLensSpec<HttpMessage, NEXT>

Create another BiDiLensSpec which applies the bi-directional transformations to the result. Any resultant Lens can be used to extract or insert the final type from/into a target.

fun <NEXT> map(nextIn: (String) -> NEXT): LensSpec<HttpMessage, NEXT>

Create another LensSpec which applies the uni-directional transformation to the result. Any resultant Lens can only be used to extract the final type from a target.

Link copied to clipboard
Link copied to clipboard
fun <NEXT> mapWithNewMeta(nextIn: (String) -> NEXT, nextOut: (NEXT) -> String, paramMeta: ParamMeta): BiDiLensSpec<HttpMessage, NEXT>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.offsetDateTime(formatter: DateTimeFormatter = ISO_OFFSET_DATE_TIME): BiDiLensSpec<IN, OffsetDateTime>
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.offsetTime(formatter: DateTimeFormatter = ISO_OFFSET_TIME): BiDiLensSpec<IN, OffsetTime>
Link copied to clipboard
open override fun optional(name: String, description: String?, metadata: Map<String, Any>): BiDiLens<HttpMessage, String?>

Make a concrete Lens for this spec that looks for an optional value in the target.

Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.regex(pattern: String, group: Int = 1): BiDiLensSpec<IN, String>
Link copied to clipboard
Link copied to clipboard
open override fun required(name: String, description: String?, metadata: Map<String, Any>): BiDiLens<HttpMessage, String>

Make a concrete Lens for this spec that looks for a required value in the target.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <M : Any, VALUE : Value<T>, T : Any> BiDiLensSpec<M, String>.value(vf: ValueFactory<VALUE, T>): BiDiLensSpec<M, VALUE>

Custom lens for mapping to values4k Value

Link copied to clipboard
Link copied to clipboard
fun <IN : Any> BiDiLensSpec<IN, String>.zonedDateTime(formatter: DateTimeFormatter = ISO_ZONED_DATE_TIME): BiDiLensSpec<IN, ZonedDateTime>
Link copied to clipboard
Link copied to clipboard