java.io.Serializable, java.lang.CloneableObjectListpublic class AbstractObjectList
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
static int |
DEFAULT_INITIAL_CAPACITY |
The default initial capacity of the list.
|
| Modifier | Constructor | 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 | Description |
|---|---|---|
void |
clear() |
Clears the list.
|
java.lang.Object |
clone() |
Clones the list of objects.
|
boolean |
equals(java.lang.Object obj) |
Tests this list for equality with another object.
|
protected java.lang.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(java.lang.Object object) |
Returns the index of the specified object, or -1 if the object is not in
the list.
|
protected void |
set(int index,
java.lang.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 java.lang.Object get(int index)
null.index - the object index.null.protected void set(int index,
java.lang.Object object)
index - the object index.object - the object (null permitted).public void clear()
public int size()
protected int indexOf(java.lang.Object object)
object - the object.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - if an item in the list does not
support cloning.