Class CollectionCodec
java.lang.Object
dev.siroshun.codec4j.api.codec.collection.CollectionCodec
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> @NotNull Codec<Collection<E>> collection(@NotNull Codec<E> elementCodec)
-
Method Details
-
list
-
set
Creates aCodecforSetwith the specified element typeCollectionCodec.This
Codecdoes not allow duplicates in the set when decoding. -
set
-
collection
@NotNull public static <E> @NotNull Codec<Collection<E>> collection(@NotNull @NotNull Codec<E> elementCodec) - Type Parameters:
E- the type of the element- Parameters:
elementCodec- theCodecfor elements- Returns:
- a
CollectionCodec
-