APIdia Launch Partner
Top Description Methods
com.sun.javafx.collections

public Interface SortableList<E>

extends ObservableList<E>
Known Direct Implementers
com.sun.javafx.collections.VetoableListDecorator, com.sun.javafx.collections.ObservableListWrapper, com.sun.javafx.collections.ObservableSequentialListWrapper
Type Parameters
<E>
the type of elements in this list
Imports
java.util.Comparator, javafx.collections.FXCollections, .ObservableList

A helper and marker interface used for ObservableLists that implement sorting algorithms that report the sort as one change.
See Also
FXCollections#sort(ObservableList, Comparator)

Method Summary

Modifier and TypeMethod and Description
public void
doSort(Comparator<? super E>
the comparator for the sorting; never null
comparator
)

Sorts the list and reports it as one change event.

public default void
sort(Comparator<? super E> comparator)

Overrides default java.util.List.sort.

Sorts this list according to the order induced by the specified Comparator (optional operation).

Inherited from javafx.collections.ObservableList:
addAlladdListenerfilteredremoveremoveAllremoveListenerreplaceRangeretainAllsetAllsetAllsortedsorted

Method Detail

doSortback to summary
public void doSort(Comparator<? super E> comparator)

Sorts the list and reports it as one change event.

Parameters
comparator:Comparator<? super E>

the comparator for the sorting; never null

sortback to summary
public default void sort(Comparator<? super E> comparator)

Overrides default java.util.List.sort.

Doc from java.util.List.sort.

Sorts this list according to the order induced by the specified Comparator (optional operation). The sort is stable: this method must not reorder equal elements.

All elements in this list must be mutually comparable using the specified comparator (that is, c.compare(e1, e2) must not throw a ClassCastException for any elements e1 and e2 in the list).

If the specified comparator is null then all elements in this list must implement the Comparable interface and the elements' natural ordering should be used.

This list must be modifiable, but need not be resizable.

Annotations
@SuppressWarnings:unchecked
@Override