Class ReferenceSortedSets.SynchronizedSortedSet<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterable<K>,it.unimi.dsi.fastutil.objects.ObjectIterable<K>,it.unimi.dsi.fastutil.objects.ReferenceCollection<K>,ReferenceSet<K>,ReferenceSortedSet<K>,Serializable,Iterable<K>,Collection<K>,SequencedCollection<K>,SequencedSet<K>,Set<K>,SortedSet<K>
- Enclosing class:
ReferenceSortedSets
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.objects.ReferenceCollection<K> protected final ReferenceSortedSet<K> protected final Object -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSynchronizedSortedSet(ReferenceSortedSet<K> s, Object sync) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends K> arg0) voidclear()Comparator<? super K> booleanbooleancontainsAll(Collection<?> arg0) booleanfirst()voidinthashCode()Returns a view of the portion of this sorted set whose elements are strictly less thantoElement.booleanisEmpty()it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K> iterator()Returns a type-specificBidirectionalIteratoron the elements in this set.it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K> Returns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).last()booleanremoveAll(Collection<?> arg0) booleanbooleanretainAll(Collection<?> arg0) intsize()it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> stream()Returns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.Returns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.Object[]toArray()<T> T[]toArray(T[] arg0) toString()Methods inherited from class it.unimi.dsi.fastutil.objects.ReferenceSets.SynchronizedSet
removeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceSortedSet
spliteratorMethods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface java.util.SortedSet
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
-
Field Details
-
sortedSet
-
collection
-
sync
-
-
Constructor Details
-
SynchronizedSortedSet
-
SynchronizedSortedSet
-
-
Method Details
-
comparator
- Specified by:
comparatorin interfaceSortedSet<K>
-
subSet
Description copied from interface:ReferenceSortedSetReturns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive. -
headSet
Description copied from interface:ReferenceSortedSetReturns a view of the portion of this sorted set whose elements are strictly less thantoElement. -
tailSet
Description copied from interface:ReferenceSortedSetReturns a view of the portion of this sorted set whose elements are greater than or equal tofromElement. -
iterator
Description copied from interface:ReferenceSortedSetReturns a type-specificBidirectionalIteratoron the elements in this set.This method returns a parameterised bidirectional iterator. The iterator can be moreover safely cast to a type-specific iterator.
- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectBidirectionalIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ReferenceCollection<K>- Specified by:
iteratorin interfaceReferenceSet<K>- Specified by:
iteratorin interfaceReferenceSortedSet<K>- Specified by:
iteratorin interfaceSet<K>- Returns:
- a bidirectional iterator on the element in this set.
-
iterator
Description copied from interface:ReferenceSortedSetReturns a type-specificBidirectionalIteratoron 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 returnfalse). 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 returnfalse).Note that passing the last element of the set as starting point and calling
previous()you can traverse the entire set in reverse order.- Specified by:
iteratorin interfaceReferenceSortedSet<K>- Parameters:
from- an element to start from.- Returns:
- a bidirectional iterator on the element in this set, starting at the given element.
-
first
-
last
-
add
- Specified by:
addin interfaceCollection<K>
-
contains
- Specified by:
containsin interfaceCollection<K>
-
size
public int size()- Specified by:
sizein interfaceCollection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K>
-
toArray
- Specified by:
toArrayin interfaceCollection<K>
-
toArray
public <T> T[] toArray(T[] arg0) - Specified by:
toArrayin interfaceCollection<K>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ReferenceCollection<K>
-
stream
- Specified by:
streamin interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<K>
-
forEach
-
addAll
- Specified by:
addAllin interfaceCollection<K>
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K>
-
removeIf
- Specified by:
removeIfin interfaceCollection<K>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K>
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<K>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<K>- Overrides:
equalsin classObject
-