com.jgoodies.common.collect
public class ArrayListModel<E> extends ArrayList<E> implements ObservableList<E>
This class should be be final and it will be marked final in a future version, if its subclass in the JGoodies Binding has been removed.
Parameters:
Version: $Revision: 1.2 $
See Also: ObservableList
Constructor Summary | |
---|---|
ArrayListModel()
Constructs an empty list with an initial capacity of ten. | |
ArrayListModel(int initialCapacity)
Constructs an empty list with the specified initial capacity.
| |
ArrayListModel(Collection<? extends E> c)
Constructs a list containing the elements of the specified collection,
in the order they are returned by the collection's iterator.
|
Method Summary | |
---|---|
void | addListDataListener(ListDataListener l) |
void | fireContentsChanged(int index)
Notifies all registered {@code ListDataListeners} that the element
at the specified index has changed. |
Object | getElementAt(int index) |
ListDataListener[] | getListDataListeners()
Returns an array of all the list data listeners
registered on this {@code ArrayListModel}.
|
int | getSize() |
void | removeListDataListener(ListDataListener l) |
Parameters: initialCapacity the initial capacity of the list.
Throws: IllegalArgumentException if the specified initial capacity is negative
Parameters: c the collection whose elements are to be placed into this list.
Throws: NullPointerException if the specified collection is {@code null}
This method must be called after the element of the list changes.
Parameters: index the index of the element that has changed
See Also: EventListenerList
Returns: all of this model's {@code ListDataListener}s, or an empty array if no list data listeners are currently registered
See Also: addListDataListener removeListDataListener