E
- public interface SortableList<E>
extends java.util.List<E>
Modifier and Type | Method and Description |
---|---|
void |
sort()
Sort using default comparator
|
void |
sort(java.util.Comparator<? super E> comparator)
Sort using comparator
|
void sort()
java.lang.ClassCastException
- if some of the elements cannot be cast to Comparablejava.lang.UnsupportedOperationException
- if list's iterator doesn't support setvoid sort(java.util.Comparator<? super E> comparator)
sort
in interface java.util.List<E>
comparator
- the comparator to usejava.lang.ClassCastException
- if the list contains elements that are not
mutually comparable using the specified comparator.java.lang.UnsupportedOperationException
- if the specified list's
list-iterator does not support the set operation.