Class AbstractSerializableSetDecorator<E>

  • Type Parameters:
    E - the type of the elements in this set
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.Set<E>
    Direct Known Subclasses:
    ListOrderedSet, UnmodifiableSet

    public abstract class AbstractSerializableSetDecorator<E>
    extends AbstractSetDecorator<E>
    Serializable subclass of AbstractSetDecorator.
    Since:
    3.1
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serialization version
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractSerializableSetDecorator

        protected AbstractSerializableSetDecorator​(java.util.Set<E> set)
        Constructor.
        Parameters:
        set - the list to decorate, must not be null
        Throws:
        java.lang.NullPointerException - if set is null
    • Method Detail

      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Write the set out using a custom routine.
        Parameters:
        out - the output stream
        Throws:
        java.io.IOException - if an error occurs while writing to the stream
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Read the set in using a custom routine.
        Parameters:
        in - the input stream
        Throws:
        java.io.IOException - if an error occurs while reading from the stream
        java.lang.ClassNotFoundException - if an object read from the stream can not be loaded