⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.list

Class AbstractListDecorator

java.lang.Object
|
+--org.apache.commons.collections.collection.AbstractCollectionDecorator
   |
   +--org.apache.commons.collections.list.AbstractListDecorator

All Implemented Interfaces:
Collection, List

Known Direct Subclasses:
FixedSizeList, LazyList, SetUniqueList, UnmodifiableList


public abstract class AbstractListDecorator
extends AbstractCollectionDecorator
implements List

Decorates another List to provide additional behaviour.

Methods are forwarded directly to the decorated list.

Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Constructor Summary

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)

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)

Constructor Details

AbstractListDecorator

protected AbstractListDecorator(List list)

Constructor that wraps (not copies).

Parameters:
list - the list to decorate, must not be null
Throws:
- if list is null

Method Details

add

public void add(int index, Object object)

Parameters:
index
object

addAll

public boolean addAll(int index, Collection coll)

Parameters:
index
coll

get

public Object get(int index)

Parameters:
index

getList

protected List getList()

Gets the list being decorated.

Returns:
the decorated list

indexOf

public int indexOf(Object object)

Parameters:
object

lastIndexOf

public int lastIndexOf(Object object)

Parameters:
object

listIterator

public ListIterator listIterator()


listIterator

public ListIterator listIterator(int index)

Parameters:
index

remove

public Object remove(int index)

Parameters:
index

set

public Object set(int index, Object object)

Parameters:
index
object

subList

public List subList(int fromIndex, int toIndex)

Parameters:
fromIndex
toIndex