public static class DefaultSerializers.TreeMapSerializer extends MapSerializer
TreeMap
and any subclass.MapSerializer.BindMap
Constructor and Description |
---|
TreeMapSerializer() |
Modifier and Type | Method and Description |
---|---|
protected Map |
create(Kryo kryo,
Input input,
Class<Map> type)
Used by
MapSerializer.read(Kryo, Input, Class) to create the new object. |
protected Map |
createCopy(Kryo kryo,
Map original) |
void |
write(Kryo kryo,
Output output,
Map map)
Writes the bytes for the object to the output.
|
copy, read, setGenerics, setKeyClass, setKeysCanBeNull, setValueClass, setValuesCanBeNull
getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
public void write(Kryo kryo, Output output, Map map)
Serializer
This method should not be called directly, instead this serializer can be passed to Kryo
write methods that accept a
serialier.
write
in class MapSerializer
map
- May be null if Serializer.getAcceptsNull()
is true.protected Map create(Kryo kryo, Input input, Class<Map> type)
MapSerializer
MapSerializer.read(Kryo, Input, Class)
to create the new object. This can be overridden to customize object creation, eg
to call a constructor with arguments. The default implementation uses Kryo.newInstance(Class)
.create
in class MapSerializer
protected Map createCopy(Kryo kryo, Map original)
createCopy
in class MapSerializer
Copyright © 2018. All rights reserved.