A codec for non-negative bigint values.
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.argon.esexpr.ESExprCodec
ESExprCodec.FailurePath -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ESExprCodec<BigInteger> A codec for non-negative bigint values. -
Method Summary
Modifier and TypeMethodDescriptionfinal BigIntegerdecode(ESExpr expr, ESExprCodec.FailurePath path) Decode an ESExpr into a value.final ESExprencode(BigInteger value) Encode a value into an ESExpr.booleanDetermines whether two values are equal when encoded as an `ESExpr`.final ESExprTagSettags()Gets the set of tags of values for this type.Methods inherited from class dev.argon.esexpr.ESExprCodec
decode, optionalCodec
-
Field Details
-
INSTANCE
A codec for non-negative bigint values.
-
-
Method Details
-
tags
Description copied from class:ESExprCodecGets the set of tags of values for this type.- Specified by:
tagsin classESExprCodec<BigInteger>- Returns:
- The set of tags.
-
isEncodedEqual
Description copied from class:ESExprCodecDetermines whether two values are equal when encoded as an `ESExpr`.- Specified by:
isEncodedEqualin classESExprCodec<BigInteger>- Parameters:
x- The first value.y- The second value.- Returns:
- true iff the values are equal when encoded.
-
encode
Description copied from class:ESExprCodecEncode a value into an ESExpr.- Specified by:
encodein classESExprCodec<BigInteger>- Parameters:
value- The value to encode.- Returns:
- The encoded ESExpr.
-
decode
Description copied from class:ESExprCodecDecode an ESExpr into a value.- Specified by:
decodein classESExprCodec<BigInteger>- 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.
-