M - The type of the model object.public interface IListModel<M> extends List<M>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IListModel.IListModelListener
Interface for listeners receiving events when the list is modified.
|
static class |
IListModel.ListEventType |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEventListener(IListModel.IListModelListener listener)
Register a listener to receive events when the list is modified.
|
void |
removeAllListeners()
Removes all listeners.
|
boolean |
removeEventListener(IListModel.IListModelListener listener)
Removes a single event listener.
|
boolean |
removeRange(int start,
int end)
Removes a range of elements by index.
|
default void |
sort(Comparator<? super M> comparator)
Sorts the list in ascending order given the comparator.
|
void |
sort(Comparator<? super M> comparator,
boolean ascending)
Sorts the list given the comparator and the sort direction.
|
void |
swap(int index1,
int index2)
Swap two list entries by index.
|
void |
swap(M value1,
M value2)
Swap two list entries.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamboolean addEventListener(IListModel.IListModelListener listener)
listener - The listener to add.void removeAllListeners()
boolean removeEventListener(IListModel.IListModelListener listener)
listener - The listener to remove.boolean removeRange(int start,
int end)
start - Start of range (inclusive).end - End of range (inclusive).void swap(int index1,
int index2)
index1 - Index of first entry.index2 - Index of second entry.void swap(M value1, M value2)
value1 - The first entry.value2 - The second entry.void sort(Comparator<? super M> comparator, boolean ascending)
comparator - The comparator to use in sorting. If null, a comparator using the model
objects' native sort order will be applied.ascending - If true, sort list in ascending order; otherwise, in descending order.default void sort(Comparator<? super M> comparator)
Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.