T - public class SortableListModel<T> extends AbstractListModel
listenerList| Constructor and Description |
|---|
SortableListModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T value)
Adds a value to the list model.
|
void |
addAll(Collection<T> newData)
Adds all the elements in the collection to the list model.
|
void |
clear()
Clears the list model.
|
void |
fireContentsChanged(Object source,
int index0,
int index1) |
SortedSet<T> |
getData()
Returns the data in this list model ordered.
|
T |
getElementAt(int i)
Returns the element at the specified index.
|
int |
getSize()
Returns the size of the list model.
|
boolean |
remove(T value)
Removes a value from the list model.
|
void |
setComparator(Comparator<T> comp)
Sets the comparator to be used to sort the list.
|
addListDataListener, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerpublic SortableListModel()
public int getSize()
public void setComparator(Comparator<T> comp)
comp - the comparator.public T getElementAt(int i)
i - the index of the element.public void add(T value)
value - the value to be added.public boolean remove(T value)
value - the value to be removed.true if the element was on the list and
false otherwise.public void clear()
public void addAll(Collection<T> newData)
newData - the collection containing the elements to be added.public void fireContentsChanged(Object source, int index0, int index1)
fireContentsChanged in class AbstractListModelCopyright © 2010-2015 ForgeRock AS. All Rights Reserved.