public static class FloatSortedSets.Singleton extends FloatSets.Singleton implements FloatSortedSet, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific sorted set.
Modifier and Type | Method and Description |
---|---|
FloatComparator |
comparator() |
DoubleSpliterator |
doubleSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
java.lang.Float |
first()
Deprecated.
Please use the corresponding type-specific method instead.
|
float |
firstFloat()
Returns the first (lowest) element currently in this set.
|
FloatSortedSet |
headSet(float to)
Returns a view of the portion of this sorted set whose elements are strictly less than
toElement . |
FloatSortedSet |
headSet(java.lang.Float to)
Deprecated.
Please use the corresponding type-specific method instead.
|
FloatBidirectionalIterator |
iterator(float from)
Returns a type-specific
BidirectionalIterator on the elements in
this set, starting from a given element of the domain (optional operation). |
java.lang.Float |
last()
Deprecated.
Please use the corresponding type-specific method instead.
|
float |
lastFloat()
Returns the last (highest) element currently in this set.
|
FloatSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
FloatSortedSet |
subSet(float from,
float to)
Returns a view of the portion of this sorted set whose elements range from
fromElement , inclusive, to toElement , exclusive. |
FloatSortedSet |
subSet(java.lang.Float from,
java.lang.Float to)
Deprecated.
Please use the corresponding type-specific method instead.
|
FloatSortedSet |
tailSet(float from)
Returns a view of the portion of this sorted set whose elements are greater than or equal to
fromElement . |
FloatSortedSet |
tailSet(java.lang.Float from)
Deprecated.
Please use the corresponding type-specific method instead.
|
addAll, addAll, clone, contains, doubleIterator, forEach, forEach, iterator, remove, removeAll, removeAll, removeIf, removeIf, retainAll, retainAll, size, toArray, toFloatArray
equals, hashCode, rem
add, add, contains, containsAll, containsAll, remove, toArray, toFloatArray, toString
iterator
add, contains, of, of, of, of, of, rem, remove, remove
add, addAll, contains, containsAll, doubleIterator, doubleParallelStream, doubleStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toFloatArray, toFloatArray
forEach, forEach, forEach
public FloatBidirectionalIterator iterator(float from)
FloatSortedSet
BidirectionalIterator
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 FloatSortedSet
from
- an element to start from.public FloatComparator comparator()
FloatSortedSet
comparator
in interface FloatSortedSet
comparator
in interface java.util.SortedSet<java.lang.Float>
public FloatSpliterator spliterator()
FloatSet
Set spliterators must report at least Spliterator.DISTINCT
.
See Set.spliterator()
for more documentation on the requirements
of the returned spliterator.
spliterator
in interface FloatCollection
spliterator
in interface FloatIterable
spliterator
in interface FloatSet
spliterator
in interface FloatSortedSet
spliterator
in interface java.lang.Iterable<java.lang.Float>
spliterator
in interface java.util.Collection<java.lang.Float>
spliterator
in interface java.util.Set<java.lang.Float>
spliterator
in interface java.util.SortedSet<java.lang.Float>
spliterator
in class FloatSets.Singleton
public FloatSortedSet subSet(float from, float to)
FloatSortedSet
fromElement
, inclusive, to toElement
, exclusive.subSet
in interface FloatSortedSet
SortedSet.subSet(Object,Object)
public FloatSortedSet headSet(float to)
FloatSortedSet
toElement
.headSet
in interface FloatSortedSet
SortedSet.headSet(Object)
public FloatSortedSet tailSet(float from)
FloatSortedSet
fromElement
.tailSet
in interface FloatSortedSet
SortedSet.tailSet(Object)
public float firstFloat()
FloatSortedSet
firstFloat
in interface FloatSortedSet
SortedSet.first()
public float lastFloat()
FloatSortedSet
lastFloat
in interface FloatSortedSet
SortedSet.last()
public DoubleSpliterator doubleSpliterator()
FloatCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int
, long
, and double
.
doubleSpliterator
in interface FloatCollection
doubleSpliterator
in interface FloatIterable
doubleSpliterator
in class FloatSets.Singleton
@Deprecated public FloatSortedSet subSet(java.lang.Float from, java.lang.Float to)
subSet
in interface FloatSortedSet
subSet
in interface java.util.SortedSet<java.lang.Float>
@Deprecated public FloatSortedSet headSet(java.lang.Float to)
headSet
in interface FloatSortedSet
headSet
in interface java.util.SortedSet<java.lang.Float>
@Deprecated public FloatSortedSet tailSet(java.lang.Float from)
tailSet
in interface FloatSortedSet
tailSet
in interface java.util.SortedSet<java.lang.Float>
@Deprecated public java.lang.Float first()
first
in interface FloatSortedSet
first
in interface java.util.SortedSet<java.lang.Float>
@Deprecated public java.lang.Float last()
last
in interface FloatSortedSet
last
in interface java.util.SortedSet<java.lang.Float>