public static class DefaultSerializers.TreeSetSerializer extends CollectionSerializer
TreeMap
and any subclass.CollectionSerializer.BindCollection
Constructor and Description |
---|
TreeSetSerializer() |
Modifier and Type | Method and Description |
---|---|
protected TreeSet |
create(Kryo kryo,
Input input,
Class<Collection> type)
Used by
CollectionSerializer.read(Kryo, Input, Class) to create the new object. |
protected TreeSet |
createCopy(Kryo kryo,
Collection original)
Used by
CollectionSerializer.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.
|
copy, read, setElementClass, setElementsCanBeNull, setGenerics
getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
public void write(Kryo kryo, Output output, Collection collection)
Serializer
This method should not be called directly, instead this serializer can be passed to Kryo
write methods that accept a
serialier.
write
in class CollectionSerializer
collection
- May be null if Serializer.getAcceptsNull()
is true.protected TreeSet create(Kryo kryo, Input input, Class<Collection> type)
CollectionSerializer
CollectionSerializer.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 uses Kryo.newInstance(Class)
.create
in class CollectionSerializer
protected TreeSet createCopy(Kryo kryo, Collection original)
CollectionSerializer
CollectionSerializer.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 uses Kryo.newInstance(Class)
.createCopy
in class CollectionSerializer
Copyright © 2018. All rights reserved.