Class ControlledArrayList<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.apache.juneau.collections.ControlledArrayList<E>
Type Parameters:
E - The element type.
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess
Direct Known Subclasses:
HeaderList, PartList

public class ControlledArrayList<E> extends ArrayList<E>
An array list that allows you to control whether it's read-only via a constructor parameter.

Override methods such as overrideAdd(int, Object) are provided that bypass the unmodifiable restriction on the list. They allow you to manipulate the list while not exposing the ability to manipulate the list through any of the methods provided by the List interface (meaning you can pass the object around as an unmodifiable List).

See Also: