org.jfree.util
Class AbstractObjectList
java.lang.Object
org.jfree.util.AbstractObjectList
- Cloneable, Serializable
extends java.lang.Object
implements Cloneable, Serializable
A list of objects that can grow as required.
void | clear() - Clears the list.
|
Object | clone() - Clones the list of objects.
|
boolean | equals(Object obj) - Tests this list for equality with another object.
|
protected Object | get(int index) - Returns the object at the specified index, if there is one, or
null .
|
int | hashCode() - Returns a hash code value for the object.
|
protected int | indexOf(Object object) - Returns the index of the specified object, or -1 if the object is not in
the list.
|
protected void | set(int index, Object object) - Sets an object reference (overwriting any existing object).
|
int | size() - Returns the size of the list.
|
AbstractObjectList
protected AbstractObjectList()
Creates a new list with the default initial capacity.
AbstractObjectList
protected AbstractObjectList(int initialCapacity)
Creates a new list.
initialCapacity
- the initial capacity.
AbstractObjectList
protected AbstractObjectList(int initialCapacity,
int increment)
Creates a new list.
initialCapacity
- the initial capacity.increment
- the increment.
clear
public void clear()
Clears the list.
clone
public Object clone()
throws CloneNotSupportedException
Clones the list of objects. The objects in the list are not cloned, so
this is method makes a 'shallow' copy of the list.
equals
public boolean equals(Object obj)
Tests this list for equality with another object.
obj
- the object to test.
get
protected Object get(int index)
Returns the object at the specified index, if there is one, or
null
.
index
- the object index.
hashCode
public int hashCode()
Returns a hash code value for the object.
indexOf
protected int indexOf(Object object)
Returns the index of the specified object, or -1 if the object is not in
the list.
set
protected void set(int index,
Object object)
Sets an object reference (overwriting any existing object).
index
- the object index.object
- the object (null
permitted).
size
public int size()
Returns the size of the list.