T - T - public class SortedList<T> extends LinkedList<T>
modCount| Constructor and Description |
|---|
SortedList()
Construct a new instance with the list elements sorted in their
Comparable natural ordering. |
SortedList(Comparator<? super T> comparator)
Construct a new instance using the given comparator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T paramT)
Add a new entry to the list.
|
boolean |
addAll(Collection<? extends T> paramCollection)
Adds all elements in the specified collection to the list.
|
boolean |
containsElement(T paramT)
Check, if this list contains the given Element.
|
int |
getElementIndex(T paramT)
Check if this list contains the given Element and return his index.
|
add, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArrayiteratorequals, hashCode, listIterator, removeRange, subListcontainsAll, isEmpty, removeAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subListpublic SortedList()
Comparable natural ordering.public SortedList(Comparator<? super T> comparator)
comparator - public boolean add(T paramT)
public boolean addAll(Collection<? extends T> paramCollection)
addAll in interface Collection<T>addAll in interface List<T>addAll in class LinkedList<T>paramCollection - public boolean containsElement(T paramT)
LinkedList.contains(Object) method, since it is based on binary search.paramT - true, if the element is contained in this list;
false, otherwise.public int getElementIndex(T paramT)
LinkedList.contains(Object) method, since it is based on binary search.paramT - true, index >= 0 if the element is contained in this list, -1 otherwiseCopyright © 2014. All Rights Reserved.