org.apache.commons.collections15.list
Class AbstractListDecorator<E>
java.lang.Object
org.apache.commons.collections15.collection.AbstractCollectionDecorator<E>
org.apache.commons.collections15.list.AbstractListDecorator<E>
- All Implemented Interfaces:
- Iterable<E>, Collection<E>, List<E>
- Direct Known Subclasses:
- AbstractSerializableListDecorator
public abstract class AbstractListDecorator<E>
- extends AbstractCollectionDecorator<E>
- implements List<E>
Decorates another List to provide additional behaviour.
Methods are forwarded directly to the decorated list.
- Since:
- Commons Collections 3.0
- Version:
- $Revision: 1.1 $ $Date: 2005/10/11 17:05:32 $
- Author:
- Matt Hall, John Watkinson, Stephen Colebourne
| Methods inherited from class org.apache.commons.collections15.collection.AbstractCollectionDecorator |
add, addAll, clear, contains, containsAll, equals, getCollection, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from interface java.util.List |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
AbstractListDecorator
protected AbstractListDecorator()
- Constructor only used in deserialization, do not use otherwise.
- Since:
- Commons Collections 3.1
AbstractListDecorator
protected AbstractListDecorator(List<E> list)
- Constructor that wraps (not copies).
- Parameters:
list - the list to decorate, must not be null
- Throws:
IllegalArgumentException - if list is null
getList
protected List<E> getList()
- Gets the list being decorated.
- Returns:
- the decorated list
add
public void add(int index,
E object)
- Specified by:
add in interface List<E>
addAll
public boolean addAll(int index,
Collection<? extends E> coll)
- Specified by:
addAll in interface List<E>
get
public E get(int index)
- Specified by:
get in interface List<E>
indexOf
public int indexOf(Object object)
- Specified by:
indexOf in interface List<E>
lastIndexOf
public int lastIndexOf(Object object)
- Specified by:
lastIndexOf in interface List<E>
listIterator
public ListIterator<E> listIterator()
- Specified by:
listIterator in interface List<E>
listIterator
public ListIterator<E> listIterator(int index)
- Specified by:
listIterator in interface List<E>
remove
public E remove(int index)
- Specified by:
remove in interface List<E>
set
public E set(int index,
E object)
- Specified by:
set in interface List<E>
subList
public List<E> subList(int fromIndex,
int toIndex)
- Specified by:
subList in interface List<E>
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.