edu.rice.cs.plt.collect
Class DelegatingList<E>
java.lang.Object
java.util.AbstractCollection<T>
edu.rice.cs.plt.collect.DelegatingCollection<E>
edu.rice.cs.plt.collect.DelegatingList<E>
- All Implemented Interfaces:
- SizedIterable<E>, Composite, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
- Direct Known Subclasses:
- SnapshotSynchronizedList
public class DelegatingList<E>
- extends DelegatingCollection<E>
- implements java.util.List<E>
An implementation of List that delegates all operations to a wrapped
list. Subclasses can be defined that override a few of the methods, while maintaining
the default delegation behavior in most cases. Subclasses can also invoke the overridden
methods in AbstractCollection to use the default implementations there by
invoking, for example, DelegatingCollection.abstractCollectionAddAll(java.util.Collection extends T>) (see
AbstractCollection for details on the default implementations).
- See Also:
- Serialized Form
|
Field Summary |
protected java.util.List<E> |
_delegate
|
| Methods inherited from class edu.rice.cs.plt.collect.DelegatingCollection |
abstractCollectionAddAll, abstractCollectionClear, abstractCollectionContains, abstractCollectionContainsAll, abstractCollectionIsEmpty, abstractCollectionRemove, abstractCollectionRemoveAll, abstractCollectionRetainAll, abstractCollectionToArray, abstractCollectionToArray, add, addAll, clear, compositeHeight, compositeSize, contains, containsAll, hasFixedSize, isEmpty, isInfinite, isStatic, iterator, remove, removeAll, retainAll, size, size, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
_delegate
protected final java.util.List<E> _delegate
DelegatingList
public DelegatingList(java.util.List<E> delegate)
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.util.Collection<E>- Specified by:
equals in interface java.util.List<E>- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface java.util.Collection<E>- Specified by:
hashCode in interface java.util.List<E>- Overrides:
hashCode in class java.lang.Object
get
public E get(int index)
- Specified by:
get in interface java.util.List<E>
set
public E set(int index,
E element)
- Specified by:
set in interface java.util.List<E>
add
public void add(int index,
E element)
- Specified by:
add in interface java.util.List<E>
remove
public E remove(int index)
- Specified by:
remove in interface java.util.List<E>
addAll
public boolean addAll(int index,
java.util.Collection<? extends E> c)
- Specified by:
addAll in interface java.util.List<E>
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf in interface java.util.List<E>
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf in interface java.util.List<E>
listIterator
public java.util.ListIterator<E> listIterator()
- Specified by:
listIterator in interface java.util.List<E>
listIterator
public java.util.ListIterator<E> listIterator(int index)
- Specified by:
listIterator in interface java.util.List<E>
subList
public java.util.List<E> subList(int fromIndex,
int toIndex)
- Specified by:
subList in interface java.util.List<E>