Class DefaultSerializers.TreeMapSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<T>
-
- com.esotericsoftware.kryo.serializers.MapSerializer<TreeMap>
-
- com.esotericsoftware.kryo.serializers.DefaultSerializers.TreeMapSerializer
-
- Enclosing class:
- DefaultSerializers
public static class DefaultSerializers.TreeMapSerializer extends MapSerializer<TreeMap>
Serializer forTreeMapand any subclass.- Author:
- Tumi
(enhacements)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esotericsoftware.kryo.serializers.MapSerializer
MapSerializer.BindMap
-
-
Constructor Summary
Constructors Constructor Description TreeMapSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TreeMapcreate(Kryo kryo, Input input, Class<? extends TreeMap> type, int size)Used byMapSerializer.read(Kryo, Input, Class)to create the new object.protected TreeMapcreateCopy(Kryo kryo, TreeMap original)protected voidwriteHeader(Kryo kryo, Output output, TreeMap treeSet)Can be overidden to write data needed forMapSerializer.create(Kryo, Input, Class, int).-
Methods inherited from class com.esotericsoftware.kryo.serializers.MapSerializer
copy, getKeyClass, getKeySerializer, getValueClass, getValueSerializer, read, setKeyClass, setKeyClass, setKeysCanBeNull, setKeySerializer, setValueClass, setValueClass, setValuesCanBeNull, setValueSerializer, write
-
Methods inherited from class com.esotericsoftware.kryo.Serializer
getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
-
-
-
Method Detail
-
writeHeader
protected void writeHeader(Kryo kryo, Output output, TreeMap treeSet)
Description copied from class:MapSerializerCan be overidden to write data needed forMapSerializer.create(Kryo, Input, Class, int). The default implementation does nothing.- Overrides:
writeHeaderin classMapSerializer<TreeMap>
-
create
protected TreeMap create(Kryo kryo, Input input, Class<? extends TreeMap> type, int size)
Description copied from class:MapSerializerUsed byMapSerializer.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 usesKryo.newInstance(Class)with a special case for HashMap.- Overrides:
createin classMapSerializer<TreeMap>
-
createCopy
protected TreeMap createCopy(Kryo kryo, TreeMap original)
- Overrides:
createCopyin classMapSerializer<TreeMap>
-
-