Class FloatLists.SynchronizedRandomAccessList
- All Implemented Interfaces:
FloatCollection,FloatIterable,FloatList,Serializable,Comparable<List<? extends Float>>,Iterable<Float>,Collection<Float>,List<Float>,RandomAccess,SequencedCollection<Float>
- Enclosing class:
FloatLists
- 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.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.booleanisEmpty()Deprecated.booleanrem(float k) Removes a single instance of the specified element from this collection, if it is present (optional operation).booleanDeprecated.booleanRemove from this collection all elements in the given type-specific collection.booleanremoveAll(Collection<?> c) 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.subList(int from, int to) Returns a type-specific view of the portion of this list from the indexfrom, inclusive, to the indexto, exclusive.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.FloatLists.SynchronizedList
add, add, addAll, addAll, addAll, addAll, addElements, addElements, compareTo, equals, get, getElements, getFloat, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeElements, removeFloat, removeIf, replaceAll, set, set, setElements, setElements, setElements, size, sort, sort, unstableSort, unstableSortMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.floats.FloatCollection
addAll, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, rem, removeAll, 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.FloatList
add, add, contains, remove, replaceAll, replaceAll, spliterator
-
Method Details
-
subList
Description copied from interface:FloatListReturns a type-specific view of the portion of this list from the indexfrom, inclusive, to the indexto, exclusive. -
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:
-
rem
public boolean rem(float k) Description copied from interface:FloatCollectionRemoves a single instance of the specified element from this collection, if it is present (optional operation).Note that this method should be called
remove(), but the clash with the similarly named index-based method in theListinterface forces us to use a distinguished name. For simplicity, the set interfaces reinstatesremove().- Specified by:
remin 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>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Float>
-
toString
-