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:
Serializable,Iterable<E>,Collection<E>,Set<E>
- Direct Known Subclasses:
ListOrderedSet,UnmodifiableSet
Serializable subclass of AbstractSetDecorator.
- Since:
- 3.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longSerialization version -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidDeserializes the set in using a custom routine.private voidSerializes this object to an ObjectOutputStream.Methods inherited from class org.apache.commons.collections4.set.AbstractSetDecorator
decorated, equals, hashCodeMethods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, removeIf, retainAll, setCollection, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version- See Also:
-
-
Constructor Details
-
AbstractSerializableSetDecorator
Constructs a new instance.- Parameters:
set- the list to decorate, must not be null- Throws:
NullPointerException- if set is null
-
-
Method Details
-
readObject
Deserializes the set in using a custom routine.- Parameters:
in- the input stream- Throws:
IOException- if an error occurs while reading from the streamClassNotFoundException- if an object read from the stream cannot be loaded
-
writeObject
Serializes this object to an ObjectOutputStream.- Parameters:
out- the target ObjectOutputStream.- Throws:
IOException- thrown when an I/O errors occur writing to the target stream.
-