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: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
| 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