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 TreeSet
create
(Kryo kryo, Input input, Class<Collection> type) Used byCollectionSerializer.read(Kryo, Input, Class)
to create the new object.protected TreeSet
createCopy
(Kryo kryo, Collection original) Used byCollectionSerializer.copy(Kryo, Collection)
to create the new object.private TreeSet
createTreeSet
(Class<? extends Collection> type, Comparator comparator) void
write
(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
-
Constructor Details
-
TreeSetSerializer
public TreeSetSerializer()
-
-
Method Details
-
write
Description copied from class:Serializer
Writes the bytes for the object to the output.This method should not be called directly, instead this serializer can be passed to
Kryo
write methods that accept a serialier.- Overrides:
write
in classCollectionSerializer
- Parameters:
collection
- May be null ifSerializer.getAcceptsNull()
is true.
-
create
Description copied from class:CollectionSerializer
Used 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:
create
in classCollectionSerializer
-
createCopy
Description copied from class:CollectionSerializer
Used 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:
createCopy
in classCollectionSerializer
-
createTreeSet
-