T - the generic typepublic class UniqueList<T extends Comparable<? super T>> extends ArrayList<T>
UniqueList is a successor of java.util.Vector to provide a collection
that contains no duplicate elements, more formally such that e1.compareTo(e2) == 0.
The collection is kept ordered whenever elements added or removed and besides uniqueness it is to provide fast element search based again on e1.compareTo(e2) values.
modCount| Constructor and Description |
|---|
UniqueList() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T obj) |
boolean |
add(T obj) |
protected boolean |
add(T obj,
Comparator<? super T> comp)
Adds the.
|
boolean |
addAll(Collection<? extends T> comp) |
addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic boolean add(T obj)
add in interface Collection<T extends Comparable<? super T>>add in interface List<T extends Comparable<? super T>>add in class ArrayList<T extends Comparable<? super T>>protected boolean add(T obj, Comparator<? super T> comp)
obj - the objcomp - the comppublic void add(int index,
T obj)
add in interface List<T extends Comparable<? super T>>add in class ArrayList<T extends Comparable<? super T>>public boolean addAll(Collection<? extends T> comp)
addAll in interface Collection<T extends Comparable<? super T>>addAll in interface List<T extends Comparable<? super T>>addAll in class ArrayList<T extends Comparable<? super T>>Copyright © 2009–2020 psi-probe. All rights reserved.