Class DefaultSerializers.TreeSetSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<T>
-
- com.esotericsoftware.kryo.serializers.CollectionSerializer<java.util.TreeSet>
-
- com.esotericsoftware.kryo.serializers.DefaultSerializers.TreeSetSerializer
-
- Enclosing class:
- DefaultSerializers
public static class DefaultSerializers.TreeSetSerializer extends CollectionSerializer<java.util.TreeSet>
Serializer forTreeMapand any subclass.- Author:
- Tumi
(enhacements)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esotericsoftware.kryo.serializers.CollectionSerializer
CollectionSerializer.BindCollection
-
-
Constructor Summary
Constructors Constructor Description TreeSetSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.TreeSetcreate(Kryo kryo, Input input, java.lang.Class<? extends java.util.TreeSet> type, int size)Used byCollectionSerializer.read(Kryo, Input, Class)to create the new object.protected java.util.TreeSetcreateCopy(Kryo kryo, java.util.TreeSet original)Used byCollectionSerializer.copy(Kryo, Collection)to create the new object.protected voidwriteHeader(Kryo kryo, Output output, java.util.TreeSet treeSet)Can be overidden to write data needed forCollectionSerializer.create(Kryo, Input, Class, int).-
Methods inherited from class com.esotericsoftware.kryo.serializers.CollectionSerializer
copy, getElementClass, getElementSerializer, read, setElementClass, setElementClass, setElementsCanBeNull, setElementSerializer, write
-
Methods inherited from class com.esotericsoftware.kryo.Serializer
getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
-
-
-
Method Detail
-
writeHeader
protected void writeHeader(Kryo kryo, Output output, java.util.TreeSet treeSet)
Description copied from class:CollectionSerializerCan be overidden to write data needed forCollectionSerializer.create(Kryo, Input, Class, int). The default implementation does nothing.- Overrides:
writeHeaderin classCollectionSerializer<java.util.TreeSet>
-
create
protected java.util.TreeSet create(Kryo kryo, Input input, java.lang.Class<? extends java.util.TreeSet> type, int size)
Description copied from class:CollectionSerializerUsed byCollectionSerializer.read(Kryo, Input, Class)to create the new object. This can be overridden to customize object creation (eg to call a constructor with arguments), optionally reading bytes written inCollectionSerializer.writeHeader(Kryo, Output, Collection). The default implementation usesKryo.newInstance(Class)with special cases for ArrayList.- Overrides:
createin classCollectionSerializer<java.util.TreeSet>
-
createCopy
protected java.util.TreeSet createCopy(Kryo kryo, java.util.TreeSet original)
Description copied from class:CollectionSerializerUsed byCollectionSerializer.copy(Kryo, Collection)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).- Overrides:
createCopyin classCollectionSerializer<java.util.TreeSet>
-
-