http4k / org.http4k.lens / StringBiDiMappings


object StringBiDiMappings (source)

A set of standardised String <-> Type conversions which are used throughout http4k


Name Summary
base64 fun base64(): BiDiMapping<String, String>
bigDecimal fun bigDecimal(): BiDiMapping<String, BigDecimal>
bigInteger fun bigInteger(): BiDiMapping<String, BigInteger>
boolean fun boolean(): BiDiMapping<String, Boolean>
double fun double(): BiDiMapping<String, Double>
duration fun duration(): BiDiMapping<String, Duration!>
float fun float(): BiDiMapping<String, Float>
instant fun instant(): BiDiMapping<String!, Instant!>
int fun int(): BiDiMapping<String, Int>
localDate fun localDate(formatter: DateTimeFormatter = ISO_LOCAL_DATE): BiDiMapping<String!, LocalDate!>
localDateTime fun localDateTime(formatter: DateTimeFormatter = ISO_LOCAL_DATE_TIME): BiDiMapping<String!, LocalDateTime!>
localTime fun localTime(formatter: DateTimeFormatter = ISO_LOCAL_TIME): BiDiMapping<String!, LocalTime!>
long fun long(): BiDiMapping<String, Long>
nonEmpty fun nonEmpty(): BiDiMapping<String, String>
offsetDateTime fun offsetDateTime(formatter: DateTimeFormatter = ISO_OFFSET_DATE_TIME): BiDiMapping<String!, OffsetDateTime!>
offsetTime fun offsetTime(formatter: DateTimeFormatter = ISO_OFFSET_TIME): BiDiMapping<String!, OffsetTime!>
regex fun regex(pattern: String, group: Int = 1): BiDiMapping<String, String>
regexObject fun regexObject(): BiDiMapping<String, Regex>
uri fun uri(): BiDiMapping<String, Uri>
url fun url(): BiDiMapping<String!, URL>
uuid fun uuid(): BiDiMapping<String, UUID!>
zonedDateTime fun zonedDateTime(formatter: DateTimeFormatter = ISO_ZONED_DATE_TIME): BiDiMapping<String!, ZonedDateTime!>

Extension Functions

Name Summary
authority fun StringBiDiMappings.authority(): BiDiMapping<String, Authority>
host fun StringBiDiMappings.host(): BiDiMapping<String, Host>
port fun StringBiDiMappings.port(): BiDiMapping<String, Port>
with fun <T> T.with(vararg modifiers: (T) -> T): T