public class ObjectList<T>
extends java.util.ArrayList<T>
| Modifier and Type | Field and Description |
|---|---|
int |
objId
The ID of this object.
|
Identifier |
parent
The parent of the list of data model objects is the name of the the list containing
group.
|
SortOrder.Order |
sortOrder
The chosen sort order of the list.
|
| Constructor and Description |
|---|
ObjectList(Identifier parent)
Constructor for a new list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int idx,
T obj)
Add an element to the list.
|
boolean |
add(T obj)
Add an element to the list.
|
int |
getNoItems()
The number of contained data items.
|
void |
sort(SortOrder.Comparator<? super T> comparator)
Sort the list with help of an external comparator.
|
java.lang.String |
toString()
Get the string representation of the list; it's its parent's name.
|
addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic final int objId
public final Identifier parent
public SortOrder.Order sortOrder
public ObjectList(Identifier parent)
parent - The name of the containing group.public int getNoItems()
<list.noItems>.ArrayList.size.public boolean add(T obj)
public void add(int idx,
T obj)
public void sort(SortOrder.Comparator<? super T> comparator)
comparator - The externally provided comparator, suitable to compare two list
elements.public java.lang.String toString()
<objectList>.toString in class java.util.AbstractCollection<T>