Class DefaultSerializers.TreeSetSerializer
- java.lang.Object
-
- com.esotericsoftware.kryo.Serializer<java.util.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.
-
-
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.TreeSet
create(Kryo kryo, Input input, java.lang.Class<java.util.Collection> type)
Used byCollectionSerializer.read(Kryo, Input, Class)
to create the new object.protected java.util.TreeSet
createCopy(Kryo kryo, java.util.Collection original)
Used byCollectionSerializer.copy(Kryo, Collection)
to create the new object.private java.util.TreeSet
createTreeSet(java.lang.Class<? extends java.util.Collection> type, java.util.Comparator comparator)
void
write(Kryo kryo, Output output, java.util.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, java.util.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 java.util.TreeSet create(Kryo kryo, Input input, java.lang.Class<java.util.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 java.util.TreeSet createCopy(Kryo kryo, java.util.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
-
createTreeSet
private java.util.TreeSet createTreeSet(java.lang.Class<? extends java.util.Collection> type, java.util.Comparator comparator)
-
-