public class AbstractObjectList extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INITIAL_CAPACITY
The default initial capacity of the list.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractObjectList()
Creates a new list with the default initial capacity.
|
protected |
AbstractObjectList(int initialCapacity)
Creates a new list.
|
protected |
AbstractObjectList(int initialCapacity,
int increment)
Creates a new list.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int DEFAULT_INITIAL_CAPACITY
protected AbstractObjectList()
protected AbstractObjectList(int initialCapacity)
initialCapacity
- the initial capacity.protected AbstractObjectList(int initialCapacity, int increment)
initialCapacity
- the initial capacity.increment
- the increment.protected Object get(int index)
null
.index
- the object index.null
.protected void set(int index, Object object)
index
- the object index.object
- the object (null
permitted).public void clear()
public int size()
protected int indexOf(Object object)
object
- the object.public boolean equals(Object obj)
public int hashCode()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- if an item in the list does not
support cloning.Copyright © 2001–2017 JFree.org. All rights reserved.