| java.util.ArrayList com.opensymphony.xwork.util.XWorkList
XWorkList | public class XWorkList extends ArrayList (Code) | | 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
ObjectFactory.buildBean(Classjava.util.Map) buildBean method.
author: Patrick Lightbody |
Method Summary | |
public void | add(int index, Object element) Inserts the specified element at the specified position in this list. | public boolean | add(Object element) Appends the specified element to the end of this list.
This method performs any necessary type conversion.
Parameters: element - element to be appended to this list. | public 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. | public boolean | addAll(int index, Collection c) Inserts all of the elements in the specified Collection into this list, starting at the
specified position. | public boolean | contains(Object element) | public synchronized Object | get(int index) Returns the element at the specified position in this list.
An object is guaranteed to be returned since it will create empty beans to fill the gap
between the current list size and the requested index.
Parameters: index - index of element to return. | public Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element.
This method is guaranteed to work since it will create empty beans to fill the gap between
the current list size and the requested index to enable the element to be set. |
XWorkList | public XWorkList(Class clazz, int initialCapacity)(Code) | | |
add | public void add(int index, Object element)(Code) | | Inserts the specified element at the specified position in this list. Shifts the element
currently at that position (if any) and any subsequent elements to the right (adds one to
their indices).
This method is guaranteed to work since it will create empty beans to fill the gap between
the current list size and the requested index to enable the element to be set. This method
also performs any necessary type conversion.
Parameters: index - index at which the specified element is to be inserted. Parameters: element - element to be inserted. |
add | public boolean add(Object element)(Code) | | Appends the specified element to the end of this list.
This method performs any necessary type conversion.
Parameters: element - element to be appended to this list. true (as per the general contract of Collection.add). |
addAll | public boolean addAll(Collection c)(Code) | | 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. The behavior of this
operation is undefined if the specified Collection is modified while the operation is in
progress. (This implies that the behavior of this call is undefined if the specified
Collection is this list, and this list is nonempty.)
This method performs any necessary type conversion.
Parameters: c - the elements to be inserted into this list. true if this list changed as a result of the call. throws: NullPointerException - if the specified collection is null. |
addAll | public boolean addAll(int index, Collection c)(Code) | | Inserts all of the elements in the specified Collection into this list, starting at the
specified position. Shifts the element currently at that position (if any) and any
subsequent elements to the right (increases their indices). The new elements will appear in
the list in the order that they are returned by the specified Collection's iterator.
This method is guaranteed to work since it will create empty beans to fill the gap between
the current list size and the requested index to enable the element to be set. This method
also performs any necessary type conversion.
Parameters: index - index at which to insert first element from the specified collection. Parameters: c - elements to be inserted into this list. true if this list changed as a result of the call. |
get | public synchronized Object get(int index)(Code) | | Returns the element at the specified position in this list.
An object is guaranteed to be returned since it will create empty beans to fill the gap
between the current list size and the requested index.
Parameters: index - index of element to return. the element at the specified position in this list. |
set | public Object set(int index, Object element)(Code) | | Replaces the element at the specified position in this list with the specified element.
This method is guaranteed to work since it will create empty beans to fill the gap between
the current list size and the requested index to enable the element to be set. This method
also performs any necessary type conversion.
Parameters: index - index of element to replace. Parameters: element - element to be stored at the specified position. the element previously at the specified position. |
|
|