org.apache.commons.collections.list
public class FixedSizeList extends AbstractSerializableListDecorator implements BoundedCollection
List
to fix the size preventing add/remove.
The add, remove, clear and retain operations are unsupported. The set method is allowed (as it doesn't change the list size).
This class is Serializable from Commons Collections 3.1.
Since: Commons Collections 3.0
Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $
Constructor Summary | |
---|---|
protected | FixedSizeList(List list)
Constructor that wraps (not copies).
|
Method Summary | |
---|---|
boolean | add(Object object) |
void | add(int index, Object object) |
boolean | addAll(Collection coll) |
boolean | addAll(int index, Collection coll) |
void | clear() |
static List | decorate(List list)
Factory method to create a fixed size list.
|
Object | get(int index) |
int | indexOf(Object object) |
boolean | isFull() |
Iterator | iterator() |
int | lastIndexOf(Object object) |
ListIterator | listIterator() |
ListIterator | listIterator(int index) |
int | maxSize() |
Object | remove(int index) |
boolean | remove(Object object) |
boolean | removeAll(Collection coll) |
boolean | retainAll(Collection coll) |
Object | set(int index, Object object) |
List | subList(int fromIndex, int toIndex) |
Parameters: list the list to decorate, must not be null
Throws: IllegalArgumentException if list is null
Parameters: list the list to decorate, must not be null
Throws: IllegalArgumentException if list is null