Class ShortSortedSets.UnmodifiableSortedSet
- All Implemented Interfaces:
it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterable,it.unimi.dsi.fastutil.shorts.ShortCollection,it.unimi.dsi.fastutil.shorts.ShortIterable,ShortSet,ShortSortedSet,Serializable,Iterable<Short>,Collection<Short>,SequencedCollection<Short>,SequencedSet<Short>,Set<Short>,SortedSet<Short>
- Enclosing class:
ShortSortedSets
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.shorts.ShortCollectionprotected final ShortSortedSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(short arg0) booleanDeprecated.booleanaddAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleanaddAll(Collection<? extends Short> arg0) voidclear()it.unimi.dsi.fastutil.shorts.ShortComparatorbooleancontains(short arg0) booleanDeprecated.booleancontainsAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleancontainsAll(Collection<?> arg0) first()Deprecated.Please use the corresponding type-specific method instead.shortReturns the first (lowest) element currently in this set.voidforEach(it.unimi.dsi.fastutil.shorts.ShortConsumer arg0) headSet(short 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.it.unimi.dsi.fastutil.ints.IntIteratorit.unimi.dsi.fastutil.ints.IntSpliteratorbooleanisEmpty()it.unimi.dsi.fastutil.shorts.ShortBidirectionalIteratoriterator()Returns a type-specificBidirectionalIteratoron the elements in this set.it.unimi.dsi.fastutil.shorts.ShortBidirectionalIteratoriterator(short 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.shortReturns the last (highest) element currently in this set.Deprecated.booleanDeprecated.booleanremoveAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleanremoveAll(Collection<?> arg0) booleanremoveIf(it.unimi.dsi.fastutil.shorts.ShortPredicate arg0) booleanretainAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) booleanretainAll(Collection<?> arg0) intsize()it.unimi.dsi.fastutil.shorts.ShortSpliteratorstream()Deprecated.subSet(short from, short 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(short 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()short[]toArray(short[] arg0) <T> T[]toArray(T[] arg0) short[]short[]toShortArray(short[] arg0) Deprecated.toString()Methods inherited from class it.unimi.dsi.fastutil.shorts.ShortSets.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 java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortSet
add, contains, rem, remove, removeMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortSortedSet
spliteratorMethods inherited from interface java.util.SortedSet
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
-
Field Details
-
sortedSet
-
collection
protected final it.unimi.dsi.fastutil.shorts.ShortCollection collection
-
-
Constructor Details
-
UnmodifiableSortedSet
-
-
Method Details
-
comparator
public it.unimi.dsi.fastutil.shorts.ShortComparator comparator()Description copied from interface:ShortSortedSet- Specified by:
comparatorin interfaceShortSortedSet- Specified by:
comparatorin interfaceSortedSet<Short>
-
subSet
Description copied from interface:ShortSortedSetReturns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.- Specified by:
subSetin interfaceShortSortedSet- See Also:
-
headSet
Description copied from interface:ShortSortedSetReturns a view of the portion of this sorted set whose elements are strictly less thantoElement.- Specified by:
headSetin interfaceShortSortedSet- See Also:
-
tailSet
Description copied from interface:ShortSortedSetReturns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.- Specified by:
tailSetin interfaceShortSortedSet- See Also:
-
iterator
public it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator iterator()Description copied from interface:ShortSortedSetReturns 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<Short>- Specified by:
iteratorin interfaceIterable<Short>- Specified by:
iteratorin interfaceSet<Short>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortBidirectionalIterable- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable- Specified by:
iteratorin interfaceShortSet- Specified by:
iteratorin interfaceShortSortedSet- Returns:
- a bidirectional iterator on the element in this set.
-
iterator
public it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator iterator(short from) Description copied from interface:ShortSortedSetReturns 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 interfaceShortSortedSet- Parameters:
from- an element to start from.- Returns:
- a bidirectional iterator on the element in this set, starting at the given element.
-
firstShort
public short firstShort()Description copied from interface:ShortSortedSetReturns the first (lowest) element currently in this set.- Specified by:
firstShortin interfaceShortSortedSet- See Also:
-
lastShort
public short lastShort()Description copied from interface:ShortSortedSetReturns the last (highest) element currently in this set.- Specified by:
lastShortin interfaceShortSortedSet- See Also:
-
first
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
firstin interfaceShortSortedSet- Specified by:
firstin interfaceSortedSet<Short>
-
last
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastin interfaceShortSortedSet- Specified by:
lastin interfaceSortedSet<Short>
-
subSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
subSetin interfaceShortSortedSet- Specified by:
subSetin interfaceSortedSet<Short>
-
headSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
headSetin interfaceShortSortedSet- Specified by:
headSetin interfaceSortedSet<Short>
-
tailSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tailSetin interfaceShortSortedSet- Specified by:
tailSetin interfaceSortedSet<Short>
-
add
public boolean add(short arg0) - Specified by:
addin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
size
public int size()- Specified by:
sizein interfaceCollection<Short>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Short>
-
contains
public boolean contains(short arg0) - Specified by:
containsin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
spliterator
public it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()- Specified by:
spliteratorin interfaceCollection<Short>- Specified by:
spliteratorin interfaceIterable<Short>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
stream
Deprecated.- Specified by:
streamin interfaceCollection<Short>- Specified by:
streamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
parallelStream
Deprecated.- Specified by:
parallelStreamin interfaceCollection<Short>- Specified by:
parallelStreamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Short>
-
toArray
public <T> T[] toArray(T[] arg0) - Specified by:
toArrayin interfaceCollection<Short>
-
toArray
- Specified by:
toArrayin interfaceCollection<Short>
-
forEach
public void forEach(it.unimi.dsi.fastutil.shorts.ShortConsumer arg0) - Specified by:
forEachin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
containsAll
- Specified by:
containsAllin interfaceCollection<Short>
-
addAll
- Specified by:
addAllin interfaceCollection<Short>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Short>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Short>
-
removeIf
public boolean removeIf(it.unimi.dsi.fastutil.shorts.ShortPredicate arg0) - Specified by:
removeIfin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
add
Deprecated.- Specified by:
addin interfaceCollection<Short>- Specified by:
addin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
contains
Deprecated.- Specified by:
containsin interfaceCollection<Short>- Specified by:
containsin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
remove
Deprecated.- Specified by:
removein interfaceCollection<Short>- Specified by:
removein interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toShortArray
public short[] toShortArray()- Specified by:
toShortArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toShortArray
Deprecated.- Specified by:
toShortArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toArray
public short[] toArray(short[] arg0) - Specified by:
toArrayin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
containsAll
public boolean containsAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
containsAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
addAll
public boolean addAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
addAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
removeAll
public boolean removeAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
removeAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
retainAll
public boolean retainAll(it.unimi.dsi.fastutil.shorts.ShortCollection arg0) - Specified by:
retainAllin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
intIterator
public it.unimi.dsi.fastutil.ints.IntIterator intIterator()- Specified by:
intIteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
intIteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
intSpliterator
public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()- Specified by:
intSpliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
intSpliteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable
-
intStream
- Specified by:
intStreamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
intParallelStream
- Specified by:
intParallelStreamin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection
-
toString
-