T - class of items in this listSerializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess, ListModelCertificateStorepublic class ArrayListModel<T> extends ArrayList<T> implements ListModel
inspired by FilterGUIListModel>.
TODO implement addAll().
TODO implement all constructor combinations
| Modifier and Type | Field | Description |
|---|---|---|
protected ArrayList<ListDataListener> |
listeners |
|
protected Object |
source |
modCount| Constructor | Description |
|---|---|
ArrayListModel() |
Constructs an empty list with an initial capacity
|
ArrayListModel(int initialCapacity,
Object source) |
Constructs an empty list with the specified initial capacity.
|
ArrayListModel(Object source) |
Constructs an empty list with an initial capacity
|
ArrayListModel(Collection<? extends T> c,
Object source) |
Constructs a list containing the elements of the specified collection, in the order
they are returned by the collection's iterator.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(int index,
T o) |
|
boolean |
add(T o) |
|
void |
addListDataListener(ListDataListener l) |
|
void |
clear() |
|
T |
getElementAt(int index) |
|
int |
getSize() |
|
protected void |
notifyAdded(int start,
int end) |
|
protected void |
notifyChanged(int index) |
|
protected void |
notifyRemoved(int start,
int end) |
|
T |
remove(int index) |
|
boolean |
remove(Object o) |
|
void |
removeListDataListener(ListDataListener l) |
|
void |
removeRange(int from,
int to) |
|
T |
set(int index,
T el) |
containsAll, toStringequals, hashCodeaddAll, addAll, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeparallelStream, streamcontainsAll, equals, hashCodeprotected Object source
protected ArrayList<ListDataListener> listeners
public ArrayListModel()
public ArrayListModel(Object source)
source - the source Object for eventspublic ArrayListModel(Collection<? extends T> c, Object source)
c - the collection whose elements are to be placed into this listsource - the source Object for eventspublic ArrayListModel(int initialCapacity,
Object source)
initialCapacity - the initial capaity of the listsource - the source Object for eventspublic T getElementAt(int index)
getElementAt in interface ListModel<T>public void addListDataListener(ListDataListener l)
addListDataListener in interface ListModel<T>public void removeListDataListener(ListDataListener l)
removeListDataListener in interface ListModel<T>protected void notifyAdded(int start,
int end)
protected void notifyRemoved(int start,
int end)
protected void notifyChanged(int index)
public boolean add(T o)
public void add(int index,
T o)
public T remove(int index)
public boolean remove(Object o)
public void removeRange(int from,
int to)
removeRange in class ArrayList<T>public void clear()
Copyright © 2010-2018 Nikhef / Stichting FOM. All Rights Reserved.