T
- The element type to insert into the listpublic class SortedList<T>
extends java.util.ArrayList<T>
Constructor and Description |
---|
SortedList(java.util.Comparator<? super T> comparator)
The constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T e)
Adds this element to the list at the proper sorting position.
|
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
public SortedList(java.util.Comparator<? super T> comparator)
comparator
- The comparator used to sort the listpublic boolean add(T e)