Class JdkCollectionsSerializers.SingletonSetSerializer

java.lang.Object
com.esotericsoftware.kryo.Serializer<Set<?>>
uno.anahata.asi.persistence.kryo.JdkCollectionsSerializers.SingletonSetSerializer
Enclosing class:
JdkCollectionsSerializers

public static class JdkCollectionsSerializers.SingletonSetSerializer extends com.esotericsoftware.kryo.Serializer<Set<?>>
Kryo serializer for Collections.singleton(Object).
Author:
anahata
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor marking serializer as immutable.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<?>
    read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends Set<?>> type)
    void
    write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, Set<?> object)

    Methods inherited from class com.esotericsoftware.kryo.Serializer

    copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SingletonSetSerializer

      public SingletonSetSerializer()
      Default constructor marking serializer as immutable.
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, Set<?> object)

      Serializes the single element in the set.

      Specified by:
      write in class com.esotericsoftware.kryo.Serializer<Set<?>>
    • read

      public Set<?> read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<? extends Set<?>> type)

      Deserializes the single element and reconstructs a singleton set.

      Specified by:
      read in class com.esotericsoftware.kryo.Serializer<Set<?>>