Module net.luis.utils
Package net.luis.utils.io.codec.struct
package net.luis.utils.io.codec.struct
-
ClassesClassDescriptionEitherCodec<F,
S> A codec for encoding and decoding values of typeEither
.
This codec uses two other codecs to encode and decode the values of the first and second type.ListCodec<C>A codec for encoding and decoding lists of elements.
This codec uses another codec to encode and decode the elements of the list.MapCodec<K,V> A codec for encoding and decoding maps of key-value pairs.
This codec uses two other codecs to encode and decode the keys and values of the map.
The key codec must be aKeyableCodec
to encode and decode the keys of the map.A codec for encoding and decoding optional values.
This codec uses another codec to encode and decode the optional value.A codec for encoding and decoding number values of a certain range.
This codec uses a converter to convert between numbers and the range type.
The codec can be configured by the following methods:
RangeCodec.positive()
to only accept positive numbersRangeCodec.positiveOrZero()
to accept positive numbers and zeroRangeCodec.negative()
to only accept negative numbersRangeCodec.negativeOrZero()
to accept negative numbers and zeroRangeCodec.atLeast(Number)
to only accept numbers greater or equal to the given numberRangeCodec.atMost(Number)
to only accept numbers smaller or equal to the given numberRangeCodec.range(Number, Number)
to only accept numbers in the given range (inclusive)UnitCodec<C>A codec for encoding and decoding unit values.
This codec does not encode or decode any value, it is used to represent a unit value.