- Type Parameters:
T- The type of the list elements.
A codec for list values.
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.argon.esexpr.ESExprCodec
ESExprCodec.FailurePath -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(@NotNull ESExpr expr, @NotNull ESExprCodec.FailurePath path) Decode an ESExpr into a value.@NotNull ESExprEncode a value into an ESExpr.tags()Gets the set of tags of values for this type.Methods inherited from class dev.argon.esexpr.ESExprCodec
decode, optionalCodec
-
Constructor Details
-
ListCodec
Create a codec for list values.- Parameters:
itemCodec- The underlying codec for the values.
-
-
Method Details
-
tags
Description copied from class:ESExprCodecGets the set of tags of values for this type.- Specified by:
tagsin classESExprCodec<List<T>>- Returns:
- The set of tags.
-
encode
Description copied from class:ESExprCodecEncode a value into an ESExpr.- Specified by:
encodein classESExprCodec<List<T>>- Parameters:
value- The value to encode.- Returns:
- The encoded ESExpr.
-
decode
@NotNull public @NotNull List<T> decode(@NotNull @NotNull ESExpr expr, @NotNull @NotNull ESExprCodec.FailurePath path) throws DecodeException Description copied from class:ESExprCodecDecode an ESExpr into a value.- Specified by:
decodein classESExprCodec<List<T>>- Parameters:
expr- The ESExpr to decode.path- The path of the current value within the decoded object for diagnostic purposes.- Returns:
- The decoded value.
- Throws:
DecodeException- when the value cannot be decoded.
-