java.lang.Object | +--org.apache.commons.collections.collection.AbstractCollectionDecorator | +--org.apache.commons.collections.collection.PredicatedCollection | +--org.apache.commons.collections.list.PredicatedListAll Implemented Interfaces:
PredicatedList(List list, Predicate predicate) Constructor that wraps (not copies). |
void | add(int index, Object object) |
boolean | addAll(int index, Collection coll) |
static List | decorate(List list, Predicate predicate) Factory method to create a predicated (validating) list. |
Object | get(int index) |
List | getList() Gets the list being decorated. |
int | indexOf(Object object) |
int | lastIndexOf(Object object) |
ListIterator | |
ListIterator | listIterator(int i) |
Object | remove(int index) |
Object | set(int index, Object object) |
List | subList(int fromIndex, int toIndex) |
protected PredicatedList(List list, Predicate predicate)
- if list or predicate is null
- if the list contains invalid elementspublic void add(int index, Object object)
public boolean addAll(int index, Collection coll)
public static List decorate(List list, Predicate predicate)
- if list or predicate is null
- if the list contains invalid elementspublic Object get(int index)
protected List getList()
public int indexOf(Object object)
public int lastIndexOf(Object object)
public ListIterator listIterator()
public ListIterator listIterator(int i)
public Object remove(int index)
public Object set(int index, Object object)
public List subList(int fromIndex, int toIndex)
List
to validate that all additions match a specified predicate. If an object cannot be added to the list, an IllegalArgumentException is thrown.