Package com.illumon.util.codec
Class MapCodec<K,V>
java.lang.Object
com.illumon.util.codec.MapCodec<K,V>
- All Implemented Interfaces:
ObjectCodec<Map<K,,V>> io.deephaven.util.codec.ObjectCodec<Map<K,,V>> io.deephaven.util.codec.ObjectDecoder<Map<K,V>>
- Direct Known Subclasses:
StringBooleanMapCodec
ObjectCodec implementation for Maps of type K to V.
Each map is encoded as an integer length, followed by encoded pairs of key values.
A null map is represented as an array of zero bytes.
-
Field Summary
Fields inherited from interface io.deephaven.util.codec.ObjectDecoder
VARIABLE_WIDTH_SENTINEL -
Method Summary
Modifier and TypeMethodDescriptiondecode(@org.jetbrains.annotations.NotNull byte[] input, int offset, int length) decode(ByteBuffer byteBuffer) @org.jetbrains.annotations.NotNull byte[]intintintgetScale()booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.util.codec.ObjectDecoder
checkWidth
-
Method Details
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceio.deephaven.util.codec.ObjectCodec<K>
-
getPrecision
public int getPrecision()- Specified by:
getPrecisionin interfaceio.deephaven.util.codec.ObjectCodec<K>
-
getScale
public int getScale()- Specified by:
getScalein interfaceio.deephaven.util.codec.ObjectCodec<K>
-
encode
@NotNull public @org.jetbrains.annotations.NotNull byte[] encode(@Nullable @Nullable Map<K, V> input) - Specified by:
encodein interfaceio.deephaven.util.codec.ObjectCodec<K>
-
decode
@Nullable public @Nullable Map<K,V> decode(@NotNull @org.jetbrains.annotations.NotNull byte[] input, int offset, int length) - Specified by:
decodein interfaceio.deephaven.util.codec.ObjectDecoder<K>
-
decode
- Specified by:
decodein interfaceio.deephaven.util.codec.ObjectDecoder<K>
-
expectedObjectWidth
public int expectedObjectWidth()- Specified by:
expectedObjectWidthin interfaceio.deephaven.util.codec.ObjectDecoder<K>
-