|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - public interface SortedList<E>
Extension of the List interface for sorted lists.
List,
SortedSet| Method Summary | |
|---|---|
boolean |
add(E element)
This does add the given element at the right order position. |
void |
add(int index,
E element)
The add(int, Object) ignores the given index position and acts similar to the add(Object) method |
Comparator<? super E> |
comparator()
Returns the Comparator used by this SortedList |
E |
first()
Returns the first (lowest) element currently in this SortedList. |
SortedList<E> |
headList(E toElement)
Returns a view to the current SortedList which starts at the beginning and ends by the given element which itself is
excluded from the head list. |
E |
last()
Returns the last (highest) element currently in this SortedList. |
E |
set(int index,
E element)
Uses List.remove(int) to remove the element from the given index position an returns it. |
SortedList<E> |
subList(E fromElement,
E toElement)
Returns a sublist view of the current SortedList starting by the given fromElement which will be included in
the sublist and ending by the given toElement which will be excluded from the sublist. |
SortedList<E> |
subList(int fromIndex,
int toIndex)
Similar to List#subList(int, int) |
SortedList<E> |
tailList(E fromElement)
Returns a view to the current SortedList starting by the given element up to the end including the given element. |
| Methods inherited from interface java.util.List |
|---|
addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
|---|
Comparator<? super E> comparator()
Comparator used by this SortedList
SortedList<E> subList(E fromElement,
E toElement)
SortedList starting by the given fromElement which will be included in
the sublist and ending by the given toElement which will be excluded from the sublist.
fromElement - lower point (inclusive)toElement - higher pint (exclusive)SortedList<E> headList(E toElement)
SortedList which starts at the beginning and ends by the given element which itself is
excluded from the head list.
toElement - end element (exclusive)
SortedList<E> tailList(E fromElement)
SortedList starting by the given element up to the end including the given element.
fromElement -
E first()
SortedList.
E last()
SortedList.
SortedList<E> subList(int fromIndex,
int toIndex)
subList in interface List<E>boolean add(E element)
Collection
interface, since the new element is not appended to the Collection.
add in interface Collection<E>add in interface List<E>
void add(int index,
E element)
add(int, Object) ignores the given index position and acts similar to the add(Object) method
add in interface List<E>
E set(int index,
E element)
List.remove(int) to remove the element from the given index position an returns it. The newly given element will NOT
be inserted at the given index position, instead it will be inserted at its right sort position similar to calling the
add(Object) method on it.
set in interface List<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||