V - the element type contained in this listpublic class SortedCollection<V> extends Object implements Collection<V>
This class is thread-safe, with the same caveats for ConcurrentSkipListMap.
| Constructor and Description |
|---|
SortedCollection(Collection<? extends V> c,
Ordering<V> ordering) |
SortedCollection(Ordering<V> ordering) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(V value) |
boolean |
addAll(Collection<? extends V> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
V |
first() |
boolean |
isEmpty() |
Iterator<V> |
iterator() |
protected boolean |
mustAdd(V item) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streampublic SortedCollection(Collection<? extends V> c, Ordering<V> ordering)
c - the collection from which to initialize this SortedCollectionordering - the ordering used for sorting the elementspublic boolean add(V value)
add in interface Collection<V>protected boolean mustAdd(V item)
public boolean remove(Object o)
remove in interface Collection<V>public void clear()
clear in interface Collection<V>public int size()
size in interface Collection<V>public boolean isEmpty()
isEmpty in interface Collection<V>public boolean contains(Object o)
contains in interface Collection<V>public Object[] toArray()
toArray in interface Collection<V>public <T> T[] toArray(T[] a)
toArray in interface Collection<V>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<V>public boolean addAll(Collection<? extends V> c)
addAll in interface Collection<V>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<V>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<V>public V first()
Copyright © 2017 Glasnost. All Rights Reserved.