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 forTreeMap
and 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 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.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
-
-
-
-
Method Detail
-
write
public void write(Kryo kryo, Output output, Collection collection)
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
collection
- May be null ifSerializer.getAcceptsNull()
is true.
-
create
protected TreeSet create(Kryo kryo, Input input, Class<Collection> type)
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
protected TreeSet createCopy(Kryo kryo, Collection original)
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
-
-