|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
com.opensymphony.xwork.util.XWorkList
A simple list that guarantees that inserting and retrieving objects will always work regardless
of the current size of the list. Upon insertion, type conversion is also performed if necessary.
Empty beans will be created to fill the gap between the current list size and the requested index
using ObjectFactory's buildBean
method.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
XWorkList(Class clazz)
|
|
XWorkList(Class clazz,
Collection c)
|
|
XWorkList(Class clazz,
int initialCapacity)
|
Method Summary | |
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list. |
boolean |
add(Object element)
Appends the specified element to the end of this list. |
boolean |
addAll(Collection c)
Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator. |
boolean |
addAll(int index,
Collection c)
Inserts all of the elements in the specified Collection into this list, starting at the specified position. |
Object |
get(int index)
Returns the element at the specified position in this list. |
Object |
set(int index,
Object element)
Replaces the element at the specified position in this list with the specified element. |
Methods inherited from class java.util.ArrayList |
clear, clone, contains, ensureCapacity, indexOf, isEmpty, lastIndexOf, remove, removeRange, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Constructor Detail |
public XWorkList(Class clazz)
public XWorkList(Class clazz, Collection c)
public XWorkList(Class clazz, int initialCapacity)
Method Detail |
public void add(int index, Object element)
index
- index at which the specified element is to be inserted.element
- element to be inserted.public boolean add(Object element)
element
- element to be appended to this list.
public boolean addAll(Collection c)
c
- the elements to be inserted into this list.
NullPointerException
- if the specified collection is null.public boolean addAll(int index, Collection c)
index
- index at which to insert first element from the specified collection.c
- elements to be inserted into this list.
public Object get(int index)
index
- index of element to return.
public Object set(int index, Object element)
index
- index of element to replace.element
- element to be stored at the specified position.
|
XWork Project Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |