Class FloatSortedSets.SynchronizedSortedSet
- All Implemented Interfaces:
FloatBidirectionalIterable,FloatCollection,FloatIterable,FloatSet,FloatSortedSet,Serializable,Iterable<Float>,Collection<Float>,SequencedCollection<Float>,SequencedSet<Float>,Set<Float>,SortedSet<Float>
- Enclosing class:
FloatSortedSets
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(float k) Ensures that this collection contains the specified element (optional operation).booleanDeprecated.booleanAdds all elements of the given type-specific collection to this collection.booleanaddAll(Collection<? extends Float> c) voidclear()booleancontains(float k) Returnstrueif this collection contains the specified element.booleanDeprecated.booleanChecks whether this collection contains all elements from the given type-specific collection.booleancontainsAll(Collection<?> c) Returns a widened primitive iterator on the elements of this collection.Return a parallel primitive stream over the elements, performing widening casts if needed.Returns widened primitive spliterator on the elements of this collection.Return a primitive stream over the elements, performing widening casts if needed.booleanfirst()Deprecated.Please use the corresponding type-specific method instead.floatReturns the first (lowest) element currently in this set.voidforEach(FloatConsumer action) Performs the given action for each element of this type-specificIterableuntil all elements have been processed or the action throws an exception.inthashCode()headSet(float 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()iterator()Returns a type-specific iterator on the elements of this collection.iterator(float 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.floatReturns the last (highest) element currently in this set.Deprecated.booleanDeprecated.booleanRemove from this collection all elements in the given type-specific collection.booleanremoveAll(Collection<?> c) booleanremoveIf(FloatPredicate filter) Remove from this collection all elements which satisfy the given predicate.booleanRetains in this collection only elements from the given type-specific collection.booleanretainAll(Collection<?> c) intsize()Returns a type-specific spliterator on the elements of this collection.stream()Deprecated.subSet(float from, float 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(float 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()float[]toArray(float[] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.<T> T[]toArray(T[] a) float[]Returns a primitive type array containing the items of this collection.float[]toFloatArray(float[] a) Deprecated.toString()Methods inherited from class it.unimi.dsi.fastutil.floats.FloatSets.SynchronizedSet
rem, removeMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection
add, addAll, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toFloatArray, toFloatArrayMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatSet
add, contains, rem, remove, removeMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatSortedSet
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
-
Method Details
-
comparator
Description copied from interface:FloatSortedSet- Specified by:
comparatorin interfaceFloatSortedSet- Specified by:
comparatorin interfaceSortedSet<Float>
-
subSet
Description copied from interface:FloatSortedSetReturns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.- Specified by:
subSetin interfaceFloatSortedSet- See Also:
-
headSet
Description copied from interface:FloatSortedSetReturns a view of the portion of this sorted set whose elements are strictly less thantoElement.- Specified by:
headSetin interfaceFloatSortedSet- See Also:
-
tailSet
Description copied from interface:FloatSortedSetReturns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.- Specified by:
tailSetin interfaceFloatSortedSet- See Also:
-
iterator
Description copied from interface:FloatCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<Float>- Specified by:
iteratorin interfaceFloatBidirectionalIterable- Specified by:
iteratorin interfaceFloatCollection- Specified by:
iteratorin interfaceFloatIterable- Specified by:
iteratorin interfaceFloatSet- Specified by:
iteratorin interfaceFloatSortedSet- Specified by:
iteratorin interfaceIterable<Float>- Specified by:
iteratorin interfaceSet<Float>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
iterator
Description copied from interface:FloatSortedSetReturns 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 interfaceFloatSortedSet- Parameters:
from- an element to start from.- Returns:
- a bidirectional iterator on the element in this set, starting at the given element.
-
firstFloat
public float firstFloat()Description copied from interface:FloatSortedSetReturns the first (lowest) element currently in this set.- Specified by:
firstFloatin interfaceFloatSortedSet- See Also:
-
lastFloat
public float lastFloat()Description copied from interface:FloatSortedSetReturns the last (highest) element currently in this set.- Specified by:
lastFloatin interfaceFloatSortedSet- See Also:
-
first
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
firstin interfaceFloatSortedSet- Specified by:
firstin interfaceSortedSet<Float>
-
last
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastin interfaceFloatSortedSet- Specified by:
lastin interfaceSortedSet<Float>
-
subSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
subSetin interfaceFloatSortedSet- Specified by:
subSetin interfaceSortedSet<Float>
-
headSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
headSetin interfaceFloatSortedSet- Specified by:
headSetin interfaceSortedSet<Float>
-
tailSet
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tailSetin interfaceFloatSortedSet- Specified by:
tailSetin interfaceSortedSet<Float>
-
add
public boolean add(float k) Description copied from interface:FloatCollectionEnsures that this collection contains the specified element (optional operation).- Specified by:
addin interfaceFloatCollection- See Also:
-
contains
public boolean contains(float k) Description copied from interface:FloatCollectionReturnstrueif this collection contains the specified element.- Specified by:
containsin interfaceFloatCollection- See Also:
-
size
public int size()- Specified by:
sizein interfaceCollection<Float>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Float>
-
toFloatArray
public float[] toFloatArray()Description copied from interface:FloatCollectionReturns a primitive type array containing the items of this collection.- Specified by:
toFloatArrayin interfaceFloatCollection- Returns:
- a primitive type array containing the items of this collection.
- See Also:
-
toArray
- Specified by:
toArrayin interfaceCollection<Float>
-
toFloatArray
Deprecated.Description copied from interface:FloatCollectionReturns a primitive type array containing the items of this collection.Note that, contrarily to
Collection.toArray(Object[]), this methods just writes all elements of this collection: no special value will be added after the last one.- Specified by:
toFloatArrayin interfaceFloatCollection- Parameters:
a- if this array is big enough, it will be used to store this collection.- Returns:
- a primitive type array containing the items of this collection.
- See Also:
-
toArray
public float[] toArray(float[] a) Description copied from interface:FloatCollectionReturns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.Note that, contrarily to
Collection.toArray(Object[]), this methods just writes all elements of this collection: no special value will be added after the last one.- Specified by:
toArrayin interfaceFloatCollection- Parameters:
a- if this array is big enough, it will be used to store this collection.- Returns:
- a primitive type array containing the items of this collection.
- See Also:
-
addAll
Description copied from interface:FloatCollectionAdds all elements of the given type-specific collection to this collection.- Specified by:
addAllin interfaceFloatCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
-
containsAll
Description copied from interface:FloatCollectionChecks whether this collection contains all elements from the given type-specific collection.- Specified by:
containsAllin interfaceFloatCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection contains all elements of the argument.- See Also:
-
removeAll
Description copied from interface:FloatCollectionRemove from this collection all elements in the given type-specific collection.- Specified by:
removeAllin interfaceFloatCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
-
retainAll
Description copied from interface:FloatCollectionRetains in this collection only elements from the given type-specific collection.- Specified by:
retainAllin interfaceFloatCollection- Parameters:
c- a type-specific collection.- Returns:
trueif this collection changed as a result of the call.- See Also:
-
add
Deprecated.Description copied from interface:FloatCollection- Specified by:
addin interfaceCollection<Float>- Specified by:
addin interfaceFloatCollection
-
contains
Deprecated.Description copied from interface:FloatCollection- Specified by:
containsin interfaceCollection<Float>- Specified by:
containsin interfaceFloatCollection
-
remove
Deprecated.Description copied from interface:FloatCollection- Specified by:
removein interfaceCollection<Float>- Specified by:
removein interfaceFloatCollection
-
doubleIterator
Description copied from interface:FloatCollectionReturns a widened primitive iterator on the elements of this collection.This method is provided for the purpose of APIs that expect only the JDK's primitive iterators, of which there are only
int,long, anddouble.- Specified by:
doubleIteratorin interfaceFloatCollection- Specified by:
doubleIteratorin interfaceFloatIterable- Returns:
- a widened primitive iterator on the elements of this collection.
-
doubleSpliterator
Description copied from interface:FloatCollectionReturns widened primitive spliterator on the elements of this collection.This method is provided for the purpose of APIs that expect only the JDK's primitive spliterators, of which there are only
int,long, anddouble.- Specified by:
doubleSpliteratorin interfaceFloatCollection- Specified by:
doubleSpliteratorin interfaceFloatIterable- Returns:
- a widened primitive spliterator on the elements of this collection.
-
doubleStream
Description copied from interface:FloatCollectionReturn a primitive stream over the elements, performing widening casts if needed.- Specified by:
doubleStreamin interfaceFloatCollection- Returns:
- a primitive stream over the elements.
- See Also:
-
doubleParallelStream
Description copied from interface:FloatCollectionReturn a parallel primitive stream over the elements, performing widening casts if needed.- Specified by:
doubleParallelStreamin interfaceFloatCollection- Returns:
- a parallel primitive stream over the elements.
- See Also:
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Float>
-
spliterator
Description copied from interface:FloatCollectionReturns 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<Float>- Specified by:
spliteratorin interfaceFloatCollection- Specified by:
spliteratorin interfaceFloatIterable- Specified by:
spliteratorin interfaceIterable<Float>- Returns:
- a type-specific spliterator on the elements of this collection.
-
stream
Deprecated.Description copied from interface:FloatCollection- Specified by:
streamin interfaceCollection<Float>- Specified by:
streamin interfaceFloatCollection
-
parallelStream
Deprecated.Description copied from interface:FloatCollection- Specified by:
parallelStreamin interfaceCollection<Float>- Specified by:
parallelStreamin interfaceFloatCollection
-
forEach
Description copied from interface:FloatIterablePerforms the given action for each element of this type-specificIterableuntil all elements have been processed or the action throws an exception.- Specified by:
forEachin interfaceFloatIterable- Parameters:
action- the action to be performed for each element.- See Also:
-
addAll
- Specified by:
addAllin interfaceCollection<Float>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Float>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Float>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Float>
-
removeIf
Description copied from interface:FloatCollectionRemove from this collection all elements which satisfy the given predicate.- Specified by:
removeIfin interfaceFloatCollection- Parameters:
filter- a predicate which returnstruefor elements to be removed.- Returns:
trueif any elements were removed.- See Also:
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Float>
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Float>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<Float>- Overrides:
equalsin classObject
-