Class ReferenceSortedSets.SynchronizedSortedSet<K>
- All Implemented Interfaces:
ObjectBidirectionalIterable<K>,ObjectIterable<K>,ReferenceCollection<K>,ReferenceSet<K>,ReferenceSortedSet<K>,Serializable,Iterable<K>,Collection<K>,Set<K>,SortedSet<K>
- Enclosing class:
- ReferenceSortedSets
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends K> c) voidclear()Comparator<? super K>booleanbooleancontainsAll(Collection<?> c) booleanfirst()voidinthashCode()Returns a view of the portion of this sorted set whose elements are strictly less thantoElement.booleanisEmpty()iterator()Returns a type-specific iterator on the elements of this collection.Returns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).last()booleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()Returns a type-specific spliterator on the elements of this collection.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[] a) toString()Methods inherited from class it.unimi.dsi.fastutil.objects.ReferenceSets.SynchronizedSet
removeMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceSortedSet
spliterator
-
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:ReferenceCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceObjectBidirectionalIterable<K>- Specified by:
iteratorin interfaceObjectIterable<K>- Specified by:
iteratorin interfaceReferenceCollection<K>- Specified by:
iteratorin interfaceReferenceSet<K>- Specified by:
iteratorin interfaceReferenceSortedSet<K>- Specified by:
iteratorin interfaceSet<K>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
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[] a) - Specified by:
toArrayin interfaceCollection<K>
-
spliterator
Description copied from interface:ReferenceCollectionReturns a type-specific spliterator on the elements of this collection.See
Collection.spliterator()for more documentation on the requirements of the returned spliterator.- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceObjectIterable<K>- Specified by:
spliteratorin interfaceReferenceCollection<K>- Returns:
- a type-specific spliterator on the elements of this collection.
-
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
-