Package org.jfree.chart.util
Class ObjectList
java.lang.Object
org.jfree.chart.util.AbstractObjectList
org.jfree.chart.util.ObjectList
- All Implemented Interfaces:
Serializable,Cloneable
A list of objects that can grow as required.
When cloning, the objects in the list are NOT cloned, only the references.
- See Also:
-
Field Summary
Fields inherited from class org.jfree.chart.util.AbstractObjectList
DEFAULT_INITIAL_CAPACITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int index) Returns the object at the specified index, if there is one, ornull.intReturns the index of the specified object, or -1 if the object is not in the list.voidSets an object reference (overwriting any existing object).
-
Constructor Details
-
ObjectList
public ObjectList()Default constructor. -
ObjectList
Creates a new list.- Parameters:
initialCapacity- the initial capacity.
-
-
Method Details
-
get
Returns the object at the specified index, if there is one, ornull.- Overrides:
getin classAbstractObjectList- Parameters:
index- the object index.- Returns:
- The object or
null.
-
set
Sets an object reference (overwriting any existing object).- Overrides:
setin classAbstractObjectList- Parameters:
index- the object index.object- the object (nullpermitted).
-
indexOf
Returns the index of the specified object, or -1 if the object is not in the list.- Overrides:
indexOfin classAbstractObjectList- Parameters:
object- the object.- Returns:
- The index or -1.
-