Class LongSortedSets.UnmodifiableSortedSet
- All Implemented Interfaces:
it.unimi.dsi.fastutil.longs.LongBidirectionalIterable,it.unimi.dsi.fastutil.longs.LongCollection,it.unimi.dsi.fastutil.longs.LongIterable,LongSet,LongSortedSet,Serializable,Iterable<Long>,Collection<Long>,SequencedCollection<Long>,SequencedSet<Long>,Set<Long>,SortedSet<Long>
- Enclosing class:
LongSortedSets
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.longs.LongCollectionprotected final LongSortedSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(long arg0) booleanDeprecated.booleanaddAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) booleanaddAll(Collection<? extends Long> arg0) voidclear()it.unimi.dsi.fastutil.longs.LongComparatorbooleancontains(long arg0) booleanDeprecated.booleancontainsAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) booleancontainsAll(Collection<?> arg0) first()Deprecated.Please use the corresponding type-specific method instead.longReturns the first (lowest) element currently in this set.voidforEach(LongConsumer arg0) headSet(long to) Returns a view of the portion of this sorted set whose elements are strictly less thantoElement.Deprecated.Please use the corresponding type-specific method instead.booleanisEmpty()it.unimi.dsi.fastutil.longs.LongBidirectionalIteratoriterator()Returns a type-specificBidirectionalIteratoron the elements in this set.it.unimi.dsi.fastutil.longs.LongBidirectionalIteratoriterator(long from) Returns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).last()Deprecated.Please use the corresponding type-specific method instead.longlastLong()Returns the last (highest) element currently in this set.it.unimi.dsi.fastutil.longs.LongIteratorit.unimi.dsi.fastutil.longs.LongSpliteratorDeprecated.booleanDeprecated.booleanremoveAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) booleanremoveAll(Collection<?> arg0) booleanremoveIf(LongPredicate arg0) booleanretainAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) booleanretainAll(Collection<?> arg0) intsize()it.unimi.dsi.fastutil.longs.LongSpliteratorstream()Deprecated.subSet(long from, long to) Returns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.Deprecated.Please use the corresponding type-specific method instead.tailSet(long from) Returns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.Deprecated.Please use the corresponding type-specific method instead.Object[]toArray()long[]toArray(long[] arg0) <T> T[]toArray(T[] arg0) long[]long[]toLongArray(long[] arg0) Deprecated.toString()Methods inherited from class it.unimi.dsi.fastutil.longs.LongSets.UnmodifiableSet
equals, hashCode, rem, removeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.longs.LongSet
add, contains, rem, remove, removeMethods inherited from interface it.unimi.dsi.fastutil.longs.LongSortedSet
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
protected final it.unimi.dsi.fastutil.longs.LongCollection collection
-
-
Constructor Details
-
UnmodifiableSortedSet
-
-
Method Details
-
comparator
public it.unimi.dsi.fastutil.longs.LongComparator comparator()Description copied from interface:LongSortedSet- Specified by:
comparatorin interfaceLongSortedSet- Specified by:
comparatorin interfaceSortedSet<Long>
-
subSet
Description copied from interface:LongSortedSetReturns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.- Specified by:
subSetin interfaceLongSortedSet- See Also:
-
headSet
Description copied from interface:LongSortedSetReturns a view of the portion of this sorted set whose elements are strictly less thantoElement.- Specified by:
headSetin interfaceLongSortedSet- See Also:
-
tailSet
Description copied from interface:LongSortedSetReturns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.- Specified by:
tailSetin interfaceLongSortedSet- See Also:
-
iterator
public it.unimi.dsi.fastutil.longs.LongBidirectionalIterator iterator()Description copied from interface:LongSortedSetReturns 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<Long>- Specified by:
iteratorin interfaceIterable<Long>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongBidirectionalIterable- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable- Specified by:
iteratorin interfaceLongSet- Specified by:
iteratorin interfaceLongSortedSet- Specified by:
iteratorin interfaceSet<Long>- Returns:
- a bidirectional iterator on the element in this set.
-
iterator
public it.unimi.dsi.fastutil.longs.LongBidirectionalIterator iterator(long from) Description copied from interface:LongSortedSetReturns 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 interfaceLongSortedSet- Parameters:
from- an element to start from.- Returns:
- a bidirectional iterator on the element in this set, starting at the given element.
-
firstLong
public long firstLong()Description copied from interface:LongSortedSetReturns the first (lowest) element currently in this set.- Specified by:
firstLongin interfaceLongSortedSet- See Also:
-
lastLong
public long lastLong()Description copied from interface:LongSortedSetReturns the last (highest) element currently in this set.- Specified by:
lastLongin interfaceLongSortedSet- See Also:
-
first
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
firstin interfaceLongSortedSet- Specified by:
firstin interfaceSortedSet<Long>
-
last
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastin interfaceLongSortedSet- Specified by:
lastin interfaceSortedSet<Long>
-
subSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
subSetin interfaceLongSortedSet- Specified by:
subSetin interfaceSortedSet<Long>
-
headSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
headSetin interfaceLongSortedSet- Specified by:
headSetin interfaceSortedSet<Long>
-
tailSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tailSetin interfaceLongSortedSet- Specified by:
tailSetin interfaceSortedSet<Long>
-
add
public boolean add(long arg0) - Specified by:
addin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
size
public int size()- Specified by:
sizein interfaceCollection<Long>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Long>
-
contains
public boolean contains(long arg0) - Specified by:
containsin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
spliterator
public it.unimi.dsi.fastutil.longs.LongSpliterator spliterator()- Specified by:
spliteratorin interfaceCollection<Long>- Specified by:
spliteratorin interfaceIterable<Long>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable
-
stream
Deprecated.- Specified by:
streamin interfaceCollection<Long>- Specified by:
streamin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
parallelStream
Deprecated.- Specified by:
parallelStreamin interfaceCollection<Long>- Specified by:
parallelStreamin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Long>
-
toArray
public <T> T[] toArray(T[] arg0) - Specified by:
toArrayin interfaceCollection<Long>
-
toArray
- Specified by:
toArrayin interfaceCollection<Long>
-
forEach
- Specified by:
forEachin interfaceit.unimi.dsi.fastutil.longs.LongIterable
-
containsAll
- Specified by:
containsAllin interfaceCollection<Long>
-
addAll
- Specified by:
addAllin interfaceCollection<Long>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Long>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Long>
-
removeIf
- Specified by:
removeIfin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
add
Deprecated.- Specified by:
addin interfaceCollection<Long>- Specified by:
addin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
contains
Deprecated.- Specified by:
containsin interfaceCollection<Long>- Specified by:
containsin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
remove
Deprecated.- Specified by:
removein interfaceCollection<Long>- Specified by:
removein interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
toLongArray
public long[] toLongArray()- Specified by:
toLongArrayin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
toLongArray
Deprecated.- Specified by:
toLongArrayin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
toArray
public long[] toArray(long[] arg0) - Specified by:
toArrayin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
containsAll
public boolean containsAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) - Specified by:
containsAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) - Specified by:
addAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.longs.LongCollection arg0) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
longIterator
public it.unimi.dsi.fastutil.longs.LongIterator longIterator()- Specified by:
longIteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
longIteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable
-
longSpliterator
public it.unimi.dsi.fastutil.longs.LongSpliterator longSpliterator()- Specified by:
longSpliteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
longSpliteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable
-
longStream
- Specified by:
longStreamin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
longParallelStream
- Specified by:
longParallelStreamin interfaceit.unimi.dsi.fastutil.longs.LongCollection
-
toString
-