Class CodecsKt
-
- All Implemented Interfaces:
public final class CodecsKt
-
-
Method Summary
Modifier and Type Method Description final static <A extends Any> Codec<List<A>>listOf(Codec<A> $self, IntRange range)このCodecをListのCodecに変換します。 final static <A extends Any> Codec<List<A>>listOrElement(Codec<A> $self)このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。 final static <A extends Any> Codec<List<A>>listOrElement(Codec<A> $self, IntRange range)このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。 final static <A extends Any> Codec<List<A>>listOrElement(Codec<A> $self, Integer min, Integer max)このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。 final static <A extends Any> Codec<Set<A>>setOf(Codec<List<A>> $self)このCodecをSetのCodecに変換します。 final static <A extends Any, B extends Any> MapCodec<Either<A, B>>convertToEither(MapCodec<Either<A, B>> $self)final static <A extends Any> MapCodec<Option<A>>convertToOption(MapCodec<Optional<A>> $self)-
-
Method Detail
-
listOf
final static <A extends Any> Codec<List<A>> listOf(Codec<A> $self, IntRange range)
このCodecをListのCodecに変換します。
-
listOrElement
final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self)
このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。
- Since:
0.1.0
-
listOrElement
final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self, IntRange range)
このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。
-
listOrElement
final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self, Integer min, Integer max)
このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。
-
setOf
final static <A extends Any> Codec<Set<A>> setOf(Codec<List<A>> $self)
このCodecをSetのCodecに変換します。
- Returns:
SetのCodec
- Since:
0.16.0
-
convertToEither
final static <A extends Any, B extends Any> MapCodec<Either<A, B>> convertToEither(MapCodec<Either<A, B>> $self)
-
convertToOption
final static <A extends Any> MapCodec<Option<A>> convertToOption(MapCodec<Optional<A>> $self)
-
-
-
-