Class AbstractSerializableSetDecorator<E>
- java.lang.Object
-
- org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
-
- org.apache.commons.collections4.set.AbstractSetDecorator<E>
-
- org.apache.commons.collections4.set.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 Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
Serialization version
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSerializableSetDecorator(java.util.Set<E> set)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
readObject(java.io.ObjectInputStream in)
Read the set in using a custom routine.private void
writeObject(java.io.ObjectOutputStream out)
Write the set out using a custom routine.-
Methods inherited from class org.apache.commons.collections4.set.AbstractSetDecorator
decorated, equals, hashCode
-
Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, setCollection, size, toArray, toArray, toString
-
-
-
-
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 streamjava.lang.ClassNotFoundException
- if an object read from the stream can not be loaded
-
-