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
Serializer for
TreeMap and any subclass.-
Nested Class Summary
Nested classes/interfaces inherited from class com.esotericsoftware.kryo.serializers.CollectionSerializer
CollectionSerializer.BindCollection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.private TreeSetcreateTreeSet(Class<? extends Collection> type, Comparator comparator) 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, setGenericsMethods inherited from class com.esotericsoftware.kryo.Serializer
getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
Constructor Details
-
TreeSetSerializer
public TreeSetSerializer()
-
-
Method Details
-
write
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 classCollectionSerializer- Parameters:
collection- May be null ifSerializer.getAcceptsNull()is true.
-
create
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
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
-
createTreeSet
-