Class DefaultSerializers.TreeSetSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<Collection>
-
- com.esotericsoftware.kryo.serializers.CollectionSerializer
-
- com.esotericsoftware.kryo.serializers.DefaultSerializers.TreeSetSerializer
-
- Enclosing class:
- DefaultSerializers
public static class DefaultSerializers.TreeSetSerializer extends CollectionSerializer
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 TreeSetcreate(Kryo kryo, Input input, Class<Collection> type)Used byCollectionSerializer.read(Kryo, Input, Class)to create the new object.protected TreeSetcreateCopy(Kryo kryo, Collection original)Used byCollectionSerializer.copy(Kryo, Collection)to create the new object.voidwrite(Kryo kryo, Output output, Collection collection)Writes the bytes for the object to the output.-
Methods inherited from class com.esotericsoftware.kryo.serializers.CollectionSerializer
copy, read, setElementClass, setElementsCanBeNull, setGenerics
-
Methods inherited from class com.esotericsoftware.kryo.Serializer
getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
-
-
-
Method Detail
-
write
public void write(Kryo kryo, Output output, Collection collection)
Description copied from class:SerializerWrites the bytes for the object to the output.This method should not be called directly, instead this serializer can be passed to
Kryowrite methods that accept a serialier.- Overrides:
writein classCollectionSerializercollection- May be null ifSerializer.getAcceptsNull()is true.
-
create
protected TreeSet create(Kryo kryo, Input input, Class<Collection> type)
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. The default implementation usesKryo.newInstance(Class).- Overrides:
createin classCollectionSerializer
-
createCopy
protected TreeSet createCopy(Kryo kryo, Collection 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
-
-