- Type Parameters:
T- The type of the dictionary argument value.E- The type of the dictionary key elements.
public interface DictCodec<T,E>
A codec for dictionary argument values.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilds paths for elements of a dictionary argument. -
Method Summary
Modifier and TypeMethodDescriptiondecodeDict(Map<String, ESExpr> exprs, DictCodec.KeywordPathBuilder pathBuilder) Decode a map of expressions into a dictionary argument value.encodeDict(T value) Encode a dictionary argument value into a map of expressions.booleanisEncodedEqual(T x, T y) Compares two dictionary argument values to determine if they are encoded equivalently.
-
Method Details
-
isEncodedEqual
Compares two dictionary argument values to determine if they are encoded equivalently.- Parameters:
x- The first encoded dictionary argument value to compare.y- The second encoded dictionary argument value to compare.- Returns:
- true if the two dictionary argument values are equivalent when encoded, otherwise false.
-
encodeDict
-
decodeDict
T decodeDict(Map<String, ESExpr> exprs, DictCodec.KeywordPathBuilder pathBuilder) throws DecodeExceptionDecode a map of expressions into a dictionary argument value.- Parameters:
exprs- The expressions.pathBuilder- A path builder of the current expressions within the decoded object for diagnostic purposes.- Returns:
- The dictionary argument value.
- Throws:
DecodeException- when the value cannot be decoded.
-