Class AbstractSerializableListDecorator<E>
- java.lang.Object
-
- org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
-
- org.apache.commons.collections4.list.AbstractListDecorator<E>
-
- org.apache.commons.collections4.list.AbstractSerializableListDecorator<E>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>
- Direct Known Subclasses:
FixedSizeList,GrowthList,LazyList,SetUniqueList,UnmodifiableList
public abstract class AbstractSerializableListDecorator<E> extends AbstractListDecorator<E>
Serializable subclass of AbstractListDecorator.- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDSerialization version
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSerializableListDecorator(java.util.List<E> list)Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidreadObject(java.io.ObjectInputStream in)Read the list in using a custom routine.private voidwriteObject(java.io.ObjectOutputStream out)Write the list out using a custom routine.-
Methods inherited from class org.apache.commons.collections4.list.AbstractListDecorator
add, addAll, decorated, equals, get, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, set, subList
-
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
-
AbstractSerializableListDecorator
protected AbstractSerializableListDecorator(java.util.List<E> list)
Constructor that wraps (not copies).- Parameters:
list- the list to decorate, must not be null- Throws:
java.lang.NullPointerException- if list is null
-
-
Method Detail
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExceptionWrite the list 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.ClassNotFoundExceptionRead the list 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
-
-