public static class ObjectSortedSets.SynchronizedSortedSet<K> extends ObjectSets.SynchronizedSet<K> implements ObjectSortedSet<K>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected it.unimi.dsi.fastutil.objects.ObjectCollection<K> |
collection |
protected ObjectSortedSet<K> |
sortedSet |
protected java.lang.Object |
sync |
| Modifier | Constructor and Description |
|---|---|
protected |
SynchronizedSortedSet(ObjectSortedSet<K> s) |
protected |
SynchronizedSortedSet(ObjectSortedSet<K> s,
java.lang.Object sync) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(K arg0) |
boolean |
addAll(java.util.Collection<? extends K> arg0) |
void |
clear() |
java.util.Comparator<? super K> |
comparator() |
boolean |
contains(java.lang.Object arg0) |
boolean |
containsAll(java.util.Collection<?> arg0) |
boolean |
equals(java.lang.Object arg0) |
K |
first() |
void |
forEach(java.util.function.Consumer<? super K> arg0) |
int |
hashCode() |
ObjectSortedSet<K> |
headSet(K to)
Returns a view of the portion of this sorted set whose elements are strictly less than
toElement. |
boolean |
isEmpty() |
it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K> |
iterator()
Returns a type-specific
BidirectionalIterator on the elements in
this set. |
it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K> |
iterator(K from)
Returns a type-specific
BidirectionalIterator on the elements in
this set, starting from a given element of the domain (optional operation). |
K |
last() |
java.util.stream.Stream<K> |
parallelStream() |
boolean |
removeAll(java.util.Collection<?> arg0) |
boolean |
removeIf(java.util.function.Predicate<? super K> arg0) |
boolean |
retainAll(java.util.Collection<?> arg0) |
int |
size() |
it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> |
spliterator() |
java.util.stream.Stream<K> |
stream() |
ObjectSortedSet<K> |
subSet(K from,
K to)
Returns a view of the portion of this sorted set whose elements range from
fromElement, inclusive, to toElement, exclusive. |
ObjectSortedSet<K> |
tailSet(K from)
Returns a view of the portion of this sorted set whose elements are greater than or equal to
fromElement. |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] arg0) |
java.lang.String |
toString() |
removeclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorprotected final ObjectSortedSet<K> sortedSet
protected final it.unimi.dsi.fastutil.objects.ObjectCollection<K> collection
protected final java.lang.Object sync
protected SynchronizedSortedSet(ObjectSortedSet<K> s, java.lang.Object sync)
protected SynchronizedSortedSet(ObjectSortedSet<K> s)
public java.util.Comparator<? super K> comparator()
comparator in interface java.util.SortedSet<K>public ObjectSortedSet<K> subSet(K from, K to)
ObjectSortedSetfromElement, inclusive, to toElement, exclusive.subSet in interface ObjectSortedSet<K>subSet in interface java.util.SortedSet<K>SortedSet.subSet(Object,Object)public ObjectSortedSet<K> headSet(K to)
ObjectSortedSettoElement.headSet in interface ObjectSortedSet<K>headSet in interface java.util.SortedSet<K>SortedSet.headSet(Object)public ObjectSortedSet<K> tailSet(K from)
ObjectSortedSetfromElement.tailSet in interface ObjectSortedSet<K>tailSet in interface java.util.SortedSet<K>SortedSet.tailSet(Object)public it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K> iterator()
ObjectSortedSetBidirectionalIterator on the elements in
this set.
This method returns a parameterised bidirectional iterator. The iterator can be moreover safely cast to a type-specific iterator.
iterator in interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterable<K>iterator in interface it.unimi.dsi.fastutil.objects.ObjectCollection<K>iterator in interface it.unimi.dsi.fastutil.objects.ObjectIterable<K>iterator in interface ObjectSet<K>iterator in interface ObjectSortedSet<K>iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in interface java.util.Set<K>public it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K> iterator(K from)
ObjectSortedSetBidirectionalIterator on the elements in
this set, starting from a given element of the domain (optional operation).
This method returns a type-specific bidirectional iterator with given
starting point. The starting point is any element comparable to the
elements of this set (even if it does not actually belong to the
set). The next element of the returned iterator is the least element of
the set that is greater than the starting point (if there are no
elements greater than the starting point, hasNext() will return
false). The previous element of the returned iterator is
the greatest element of the set that is smaller than or equal to the
starting point (if there are no elements smaller than or equal to the
starting point, hasPrevious() will return false).
Note that passing the last element of the set as starting point and
calling previous() you can traverse the
entire set in reverse order.
iterator in interface ObjectSortedSet<K>from - an element to start from.public boolean add(K arg0)
add in interface java.util.Collection<K>public boolean contains(java.lang.Object arg0)
contains in interface java.util.Collection<K>public int size()
size in interface java.util.Collection<K>public boolean isEmpty()
isEmpty in interface java.util.Collection<K>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<K>public <T> T[] toArray(T[] arg0)
toArray in interface java.util.Collection<K>public it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> spliterator()
spliterator in interface it.unimi.dsi.fastutil.objects.ObjectCollection<K>spliterator in interface it.unimi.dsi.fastutil.objects.ObjectIterable<K>spliterator in interface java.lang.Iterable<K>spliterator in interface java.util.Collection<K>public java.util.stream.Stream<K> stream()
stream in interface java.util.Collection<K>public java.util.stream.Stream<K> parallelStream()
parallelStream in interface java.util.Collection<K>public void forEach(java.util.function.Consumer<? super K> arg0)
forEach in interface java.lang.Iterable<K>public boolean addAll(java.util.Collection<? extends K> arg0)
addAll in interface java.util.Collection<K>public boolean containsAll(java.util.Collection<?> arg0)
containsAll in interface java.util.Collection<K>public boolean removeAll(java.util.Collection<?> arg0)
removeAll in interface java.util.Collection<K>public boolean retainAll(java.util.Collection<?> arg0)
retainAll in interface java.util.Collection<K>public boolean removeIf(java.util.function.Predicate<? super K> arg0)
removeIf in interface java.util.Collection<K>public void clear()
clear in interface java.util.Collection<K>public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<K>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object arg0)
equals in interface java.util.Collection<K>equals in class java.lang.Object