public static class ShortSortedSets.Singleton extends ShortSets.Singleton implements ShortSortedSet, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific sorted set.
element| Modifier | Constructor and Description |
|---|---|
protected |
Singleton(short element,
it.unimi.dsi.fastutil.shorts.ShortComparator comparator) |
| Modifier and Type | Method and Description |
|---|---|
it.unimi.dsi.fastutil.shorts.ShortComparator |
comparator() |
java.lang.Short |
first()
Deprecated.
Please use the corresponding type-specific method instead.
|
short |
firstShort()
Returns the first (lowest) element currently in this set.
|
ShortSortedSet |
headSet(short to)
Returns a view of the portion of this sorted set whose elements are strictly less than
toElement. |
ShortSortedSet |
headSet(java.lang.Short to)
Deprecated.
Please use the corresponding type-specific method instead.
|
it.unimi.dsi.fastutil.ints.IntSpliterator |
intSpliterator() |
it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator |
iterator(short from)
Returns a type-specific
BidirectionalIterator on the elements in
this set, starting from a given element of the domain (optional operation). |
java.lang.Short |
last()
Deprecated.
Please use the corresponding type-specific method instead.
|
short |
lastShort()
Returns the last (highest) element currently in this set.
|
it.unimi.dsi.fastutil.shorts.ShortSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
ShortSortedSet |
subSet(short from,
short to)
Returns a view of the portion of this sorted set whose elements range from
fromElement, inclusive, to toElement, exclusive. |
ShortSortedSet |
subSet(java.lang.Short from,
java.lang.Short to)
Deprecated.
Please use the corresponding type-specific method instead.
|
ShortSortedSet |
tailSet(short from)
Returns a view of the portion of this sorted set whose elements are greater than or equal to
fromElement. |
ShortSortedSet |
tailSet(java.lang.Short from)
Deprecated.
Please use the corresponding type-specific method instead.
|
addAll, addAll, clone, contains, forEach, forEach, intIterator, iterator, remove, removeAll, removeAll, removeIf, removeIf, retainAll, retainAll, size, toArray, toShortArrayequals, hashCode, remadd, add, contains, containsAll, containsAll, remove, toArray, toShortArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waititeratoradd, contains, of, of, of, of, of, rem, remove, removeadd, addAll, contains, containsAll, intIterator, intParallelStream, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArrayprotected Singleton(short element,
it.unimi.dsi.fastutil.shorts.ShortComparator comparator)
public it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator iterator(short from)
ShortSortedSetBidirectionalIterator 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 ShortSortedSetfrom - an element to start from.public it.unimi.dsi.fastutil.shorts.ShortComparator comparator()
ShortSortedSetcomparator in interface ShortSortedSetcomparator in interface java.util.SortedSet<java.lang.Short>public it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()
ShortSetSet spliterators must report at least Spliterator.DISTINCT.
See Set.spliterator() for more documentation on the requirements
of the returned spliterator.
spliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollectionspliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterablespliterator in interface ShortSetspliterator in interface ShortSortedSetspliterator in interface java.lang.Iterable<java.lang.Short>spliterator in interface java.util.Collection<java.lang.Short>spliterator in interface java.util.Set<java.lang.Short>spliterator in interface java.util.SortedSet<java.lang.Short>spliterator in class ShortSets.Singletonpublic ShortSortedSet subSet(short from, short to)
ShortSortedSetfromElement, inclusive, to toElement, exclusive.subSet in interface ShortSortedSetSortedSet.subSet(Object,Object)public ShortSortedSet headSet(short to)
ShortSortedSettoElement.headSet in interface ShortSortedSetSortedSet.headSet(Object)public ShortSortedSet tailSet(short from)
ShortSortedSetfromElement.tailSet in interface ShortSortedSetSortedSet.tailSet(Object)public short firstShort()
ShortSortedSetfirstShort in interface ShortSortedSetSortedSet.first()public short lastShort()
ShortSortedSetlastShort in interface ShortSortedSetSortedSet.last()public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
intSpliterator in interface it.unimi.dsi.fastutil.shorts.ShortCollectionintSpliterator in interface it.unimi.dsi.fastutil.shorts.ShortIterableintSpliterator in class ShortSets.Singleton@Deprecated public ShortSortedSet subSet(java.lang.Short from, java.lang.Short to)
subSet in interface ShortSortedSetsubSet in interface java.util.SortedSet<java.lang.Short>@Deprecated public ShortSortedSet headSet(java.lang.Short to)
headSet in interface ShortSortedSetheadSet in interface java.util.SortedSet<java.lang.Short>@Deprecated public ShortSortedSet tailSet(java.lang.Short from)
tailSet in interface ShortSortedSettailSet in interface java.util.SortedSet<java.lang.Short>@Deprecated public java.lang.Short first()
first in interface ShortSortedSetfirst in interface java.util.SortedSet<java.lang.Short>@Deprecated public java.lang.Short last()
last in interface ShortSortedSetlast in interface java.util.SortedSet<java.lang.Short>