T - the type of item for this list (e.g. Note, Match, etc.).public abstract class BaseList<T>
extends java.lang.Object
implements java.lang.Iterable<T>
BaseList must be supported in the CloneFactory.| Modifier | Constructor and Description |
|---|---|
protected |
BaseList()
Creates an empty
BaseList object. |
protected |
BaseList(BaseList<T> original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
T |
add(T object)
Adds an object to this list.
|
void |
clear()
Removes all objects in this list.
|
T |
get(int index)
Gets the object at a given index position.
|
boolean |
isEmpty()
Indicates if this list is empty.
|
java.util.Iterator<T> |
iterator() |
void |
remove(int index)
Removes from this list the object at the given index position.
|
void |
remove(T object)
Removes a given object from this list.
|
T |
set(int index,
T object)
Replaces an existing object by a new one at a given index position.
|
int |
size()
Gets the number of objects in this list.
|
protected BaseList()
BaseList object.public int size()
public boolean isEmpty()
public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>public void clear()
public T add(T object)
object - the object to add.public void remove(int index)
index - the index position.java.lang.IndexOutOfBoundsException - if the index is invalid.public void remove(T object)
object - the object to remove.public T get(int index)
index - the index position.java.lang.IndexOutOfBoundsException - if the index is invalid.