org.apache.commons.collections.list

Class AbstractListDecorator

Implemented Interfaces:
Collection, List
Known Direct Subclasses:
AbstractSerializableListDecorator

public abstract class AbstractListDecorator
extends AbstractCollectionDecorator
implements List

Decorates another List to provide additional behaviour.

Methods are forwarded directly to the decorated list.

Version:
$Revision: 1.4 $ $Date: 2004/06/02 21:53:02 $
Author:
Stephen Colebourne
Since:
Commons Collections 3.0

Field Summary

Fields inherited from class org.apache.commons.collections.collection.AbstractCollectionDecorator

collection

Constructor Summary

AbstractListDecorator()
Constructor only used in deserialization, do not use otherwise.
AbstractListDecorator(List list)
Constructor that wraps (not copies).

Method Summary

void
add(int index, Object object)
boolean
addAll(int index, Collection coll)
Object
get(int index)
protected List
getList()
Gets the list being decorated.
int
indexOf(Object object)
int
lastIndexOf(Object object)
ListIterator
listIterator()
ListIterator
listIterator(int index)
Object
remove(int index)
Object
set(int index, Object object)
List
subList(int fromIndex, int toIndex)

Methods inherited from class org.apache.commons.collections.collection.AbstractCollectionDecorator

add, addAll, clear, contains, containsAll, equals, getCollection, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString

Constructor Details

AbstractListDecorator

protected AbstractListDecorator()
Constructor only used in deserialization, do not use otherwise.
Since:
Commons Collections 3.1

AbstractListDecorator

protected AbstractListDecorator(List list)
Constructor that wraps (not copies).
Parameters:
list - the list to decorate, must not be null

Method Details

add

public void add(int index,
                Object object)

addAll

public boolean addAll(int index,
                      Collection coll)

get

public Object get(int index)

getList

protected List getList()
Gets the list being decorated.
Returns:
the decorated list

indexOf

public int indexOf(Object object)

lastIndexOf

public int lastIndexOf(Object object)

listIterator

public ListIterator listIterator()

listIterator

public ListIterator listIterator(int index)

remove

public Object remove(int index)

set

public Object set(int index,
                  Object object)

subList

public List subList(int fromIndex,
                    int toIndex)

Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.