Note
invalid SortedList (as a result of broken comparison) doesn't send any notification to listeners on becoming valid again.
TransformationList
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | comparator
The comparator that denotes the order of this SortedList. |
| private Comparator | |
| private final SortHelper | |
| private int[] | |
| private int | |
| private SortedList. | |
| private final SortedList. |
| Access | Constructor and Description |
|---|---|
| public | SortedList(ObservableList<? extends E>
a list to wrap source, Comparator<? super E> a comparator to use or null for unordered List comparator)Creates a new SortedList wrapped around the source list. |
| public | SortedList(ObservableList<? extends E>
the source list source)Constructs a new unordered SortedList wrapper around the source list. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public final ObjectProperty | |
| private void | |
| private void | |
| private int | |
| public E | Returns: the element at the specified position in this listindex of the element to return index)Implements abstract java. Implements java. Returns the element at the specified position in this list. |
| public final Comparator | |
| public int | getSourceIndex(int index)
Implements abstract javafx. Maps the index of this list's element to an index in the direct source list. |
| public int | getViewIndex(int index)
Implements abstract javafx. Maps the index of the direct source list's element to an index in this list. |
| private void | |
| private void | |
| private void | |
| private void | |
| public final void | |
| public int | Returns: the number of elements in this listImplements abstract java. Implements java. Returns the number of elements in this list. |
| protected void | sourceChanged(ListChangeListener.
Implements abstract javafx. Called when a change from the source is triggered. |
| private void | |
| private void | |
| private void | |
| private void |
| comparator | back to summary |
|---|---|
| private ObjectProperty<Comparator<? super E>> comparator The comparator that denotes the order of this SortedList. Null for unordered SortedList. | |
| elementComparator | back to summary |
|---|---|
| private Comparator<SortedList. | |
| helper | back to summary |
|---|---|
| private final SortHelper helper | |
| perm | back to summary |
|---|---|
| private int[] perm | |
| size | back to summary |
|---|---|
| private int size | |
| sorted | back to summary |
|---|---|
| private SortedList. | |
| tempElement | back to summary |
|---|---|
| private final SortedList. | |
| SortedList | back to summary |
|---|---|
| public SortedList(ObservableList<? extends E> source, Comparator<? super E> comparator) Creates a new SortedList wrapped around the source list. The source list will be sorted using the comparator provided. If null is provided, the list stays unordered and is equal to the source list.
| |
| SortedList | back to summary |
|---|---|
| public SortedList(ObservableList<? extends E> source) Constructs a new unordered SortedList wrapper around the source list.
| |
| addRemove | back to summary |
|---|---|
| private void addRemove(ListChangeListener. | |
| comparatorProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| doSortWithPermutationChange | back to summary |
|---|---|
| private void doSortWithPermutationChange() | |
| ensureSize | back to summary |
|---|---|
| private void ensureSize(int size) | |
| findPosition | back to summary |
|---|---|
| private int findPosition(E e) | |
| get | back to summary |
|---|---|
| public E get(int index) Implements abstract java. Implements java. Returns the element at the specified position in this list.
| |
| getComparator | back to summary |
|---|---|
| public final Comparator | |
| getSourceIndex | back to summary |
|---|---|
| public int getSourceIndex(int index) Implements abstract javafx. Doc from javafx. Maps the index of this list's element to an index in the direct source list.
| |
| getViewIndex | back to summary |
|---|---|
| public int getViewIndex(int index) Implements abstract javafx. Doc from javafx. Maps the index of the direct source list's element to an index in this list.
| |
| insertToMapping | back to summary |
|---|---|
| private void insertToMapping(E e, int idx) | |
| removeAllFromMapping | back to summary |
|---|---|
| private void removeAllFromMapping() | |
| removeFromMapping | back to summary |
|---|---|
| private void removeFromMapping(int idx, E e) | |
| setAllToMapping | back to summary |
|---|---|
| private void setAllToMapping(List<? extends E> list, int to) | |
| setComparator | back to summary |
|---|---|
| public final void setComparator(Comparator<? super E> comparator) | |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Returns the number of elements in this list.
| |
| sourceChanged | back to summary |
|---|---|
| protected void sourceChanged(ListChangeListener. Implements abstract javafx. Doc from javafx. Called when a change from the source is triggered.
| |
| update | back to summary |
|---|---|
| private void update(ListChangeListener. | |
| updateIndices | back to summary |
|---|---|
| private void updateIndices(int from, int viewFrom, int difference) | |
| updatePermutationIndexes | back to summary |
|---|---|
| private void updatePermutationIndexes(ListChangeListener. | |
| updateUnsorted | back to summary |
|---|---|
| private void updateUnsorted(ListChangeListener. | |
| Access | Constructor and Description |
|---|---|
| public |
| Element | back to summary |
|---|---|
| public Element(E e, int index) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Comparator |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(SortedList.
Implements java. Compares its two arguments for order. |
| comparator | back to summary |
|---|---|
| private final Comparator<? super E> comparator | |
| ElementComparator | back to summary |
|---|---|
| public ElementComparator(Comparator<? super E> comparator) | |
| compare | back to summary |
|---|---|
| public int compare(SortedList. Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |