org.jfree.util
Class ObjectList
- Cloneable, Serializable
A list of objects that can grow as required.
When cloning, the objects in the list are NOT cloned, only the references.
Object | get(int index) - Returns the object at the specified index, if there is one, or
null .
|
int | indexOf(Object object) - Returns the index of the specified object, or -1 if the object is not in the list.
|
void | set(int index, Object object) - Sets an object reference (overwriting any existing object).
|
ObjectList
public ObjectList()
Default constructor.
ObjectList
public ObjectList(int initialCapacity)
Creates a new list.
initialCapacity
- the initial capacity.
get
public Object get(int index)
Returns the object at the specified index, if there is one, or null
.
- get in interface AbstractObjectList
index
- the object index.
indexOf
public int indexOf(Object object)
Returns the index of the specified object, or -1 if the object is not in the list.
- indexOf in interface AbstractObjectList
set
public void set(int index,
Object object)
Sets an object reference (overwriting any existing object).
- set in interface AbstractObjectList
index
- the object index.object
- the object (null
permitted).