- Type Parameters:
T- The type of the optional value.E- The type of the optional elements.
- All Known Implementing Classes:
OptionalOptionalValueCodec
public interface OptionalValueCodec<T,E>
A codec for optional values.
-
Method Summary
Modifier and TypeMethodDescriptiondecodeOptional(Optional<ESExpr> expr, ESExprCodec.FailurePath path) Decode an optional expression into an optional value.encodeOptional(T value) Encode an optional value into an optional expression.booleanisEncodedEqual(T x, T y) Determines if two optional values, after being encoded, are equal.
-
Method Details
-
isEncodedEqual
-
encodeOptional
-
decodeOptional
Decode an optional expression into an optional value.- Parameters:
expr- The optional expression.path- The path of the current value within the decoded object for diagnostic purposes.- Returns:
- The optional value.
- Throws:
DecodeException- when the value cannot be decoded.
-