Class EnumBinaryDtoFieldCodec<E extends Enum<E>>
java.lang.Object
io.datarouter.bytes.binarydto.fieldcodec.BinaryDtoBaseFieldCodec<E>
io.datarouter.bytes.binarydto.fieldcodec.other.EnumBinaryDtoFieldCodec<E>
public class EnumBinaryDtoFieldCodec<E extends Enum<E>> extends BinaryDtoBaseFieldCodec<E>
-
Constructor Summary
Constructors Constructor Description EnumBinaryDtoFieldCodec(Class<E> type) -
Method Summary
Modifier and Type Method Description intcompareAsIfEncoded(E left, E right)Override this with optimized implementations that avoid encoding.Edecode(byte[] bytes, int offset, int length)byte[]encode(E value)booleansupportsComparableCodec()Override with true if the codec is suitable for comparable encoding.Methods inherited from class io.datarouter.bytes.binarydto.fieldcodec.BinaryDtoBaseFieldCodec
decode, fixedLength, isFixedLength, isVariableLength
-
Constructor Details
-
EnumBinaryDtoFieldCodec
-
-
Method Details
-
supportsComparableCodec
public boolean supportsComparableCodec()Description copied from class:BinaryDtoBaseFieldCodecOverride with true if the codec is suitable for comparable encoding.- Specified by:
supportsComparableCodecin classBinaryDtoBaseFieldCodec<E extends Enum<E>>
-
encode
- Specified by:
encodein classBinaryDtoBaseFieldCodec<E extends Enum<E>>
-
decode
- Specified by:
decodein classBinaryDtoBaseFieldCodec<E extends Enum<E>>
-
compareAsIfEncoded
Description copied from class:BinaryDtoBaseFieldCodecOverride this with optimized implementations that avoid encoding.- Overrides:
compareAsIfEncodedin classBinaryDtoBaseFieldCodec<E extends Enum<E>>
-