Class SynchronizedFloatList
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection
org.eclipse.collections.impl.list.mutable.primitive.SynchronizedFloatList
- All Implemented Interfaces:
Serializable
,MutableFloatCollection
,FloatIterable
,FloatList
,MutableFloatList
,OrderedFloatIterable
,ReversibleFloatIterable
,PrimitiveIterable
public class SynchronizedFloatList extends AbstractSynchronizedFloatCollection implements MutableFloatList
A synchronized view of a
MutableFloatList
. It is imperative that the user manually synchronize on the on the
collection when iterating over it using an iterator or stream.
This file was automatically generated from template file synchronizedPrimitiveList.stg.
- Since:
- 3.1.
- See Also:
MutableFloatList.asSynchronized()
,MutableList.asSynchronized()
, Serialized Form
-
Constructor Summary
Constructors Constructor Description SynchronizedFloatList(MutableFloatList list)
SynchronizedFloatList(MutableFloatList list, Object newLock)
-
Method Summary
Modifier and Type Method Description boolean
addAllAtIndex(int index, float... source)
boolean
addAllAtIndex(int index, FloatIterable source)
void
addAtIndex(int index, float element)
LazyFloatIterable
asLazy()
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.LazyFloatIterable
asReversed()
MutableFloatList
asSynchronized()
MutableFloatList
asUnmodifiable()
int
binarySearch(float value)
<V> MutableList<V>
collect(FloatToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.<V> MutableList<V>
collectWithIndex(FloatIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.<V, R extends Collection<V>>
RcollectWithIndex(FloatIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.MutableFloatList
distinct()
double
dotProduct(FloatList list)
boolean
equals(Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex(FloatIntProcedure procedure)
float
get(int index)
float
getFirst()
float
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf(float value)
<T> T
injectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(float value)
MutableFloatList
newEmpty()
Creates a new empty mutable version of the same List type.MutableFloatList
reject(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.float
removeAtIndex(int index)
MutableFloatList
reverseThis()
MutableFloatList
select(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.float
set(int index, float element)
MutableFloatList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).MutableFloatList
shuffleThis(Random rnd)
Randomly permutes this list mutating its contents and returns the same list (this).MutableFloatList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).MutableFloatList
sortThis(FloatComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.<T> MutableFloatList
sortThisBy(FloatToObjectFunction<T> function)
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
.<T> MutableFloatList
sortThisBy(FloatToObjectFunction<T> function, Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.MutableFloatList
subList(int fromIndex, int toIndex)
ImmutableFloatList
toImmutable()
Returns an immutable copy of this list.MutableFloatList
toReversed()
SynchronizedFloatList
with(float element)
SynchronizedFloatList
withAll(FloatIterable elements)
SynchronizedFloatList
without(float element)
SynchronizedFloatList
withoutAll(FloatIterable elements)
<T> MutableList<FloatObjectPair<T>>
zip(Iterable<T> iterable)
Returns aMutableList
formed from thisMutableFloatList
and aListIterable
by combining corresponding elements in pairs.MutableList<FloatFloatPair>
zipFloat(FloatIterable iterable)
Returns aMutableList
formed from thisMutableFloatList
and anotherFloatList
by combining corresponding elements in pairs.Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, floatIterator, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from interface org.eclipse.collections.api.FloatIterable
allSatisfy, anySatisfy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableFloatCollection
add, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableFloatList
swap, tap
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
Method Details
-
get
public float get(int index) -
getFirst
public float getFirst()- Specified by:
getFirst
in interfaceOrderedFloatIterable
-
getLast
public float getLast()- Specified by:
getLast
in interfaceReversibleFloatIterable
-
indexOf
public int indexOf(float value)- Specified by:
indexOf
in interfaceOrderedFloatIterable
-
lastIndexOf
public int lastIndexOf(float value)- Specified by:
lastIndexOf
in interfaceFloatList
-
addAtIndex
public void addAtIndex(int index, float element)- Specified by:
addAtIndex
in interfaceMutableFloatList
-
addAllAtIndex
public boolean addAllAtIndex(int index, float... source)- Specified by:
addAllAtIndex
in interfaceMutableFloatList
-
addAllAtIndex
- Specified by:
addAllAtIndex
in interfaceMutableFloatList
-
removeAtIndex
public float removeAtIndex(int index)- Specified by:
removeAtIndex
in interfaceMutableFloatList
-
set
public float set(int index, float element)- Specified by:
set
in interfaceMutableFloatList
-
with
- Specified by:
with
in interfaceMutableFloatCollection
- Specified by:
with
in interfaceMutableFloatList
- Overrides:
with
in classAbstractSynchronizedFloatCollection
-
without
- Specified by:
without
in interfaceMutableFloatCollection
- Specified by:
without
in interfaceMutableFloatList
- Overrides:
without
in classAbstractSynchronizedFloatCollection
-
withAll
- Specified by:
withAll
in interfaceMutableFloatCollection
- Specified by:
withAll
in interfaceMutableFloatList
- Overrides:
withAll
in classAbstractSynchronizedFloatCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableFloatCollection
- Specified by:
withoutAll
in interfaceMutableFloatList
- Overrides:
withoutAll
in classAbstractSynchronizedFloatCollection
-
select
Description copied from interface:FloatIterable
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
select
in interfaceFloatIterable
- Specified by:
select
in interfaceFloatList
- Specified by:
select
in interfaceMutableFloatCollection
- Specified by:
select
in interfaceMutableFloatList
- Specified by:
select
in interfaceOrderedFloatIterable
- Specified by:
select
in interfaceReversibleFloatIterable
- Overrides:
select
in classAbstractSynchronizedFloatCollection
-
reject
Description copied from interface:FloatIterable
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
reject
in interfaceFloatIterable
- Specified by:
reject
in interfaceFloatList
- Specified by:
reject
in interfaceMutableFloatCollection
- Specified by:
reject
in interfaceMutableFloatList
- Specified by:
reject
in interfaceOrderedFloatIterable
- Specified by:
reject
in interfaceReversibleFloatIterable
- Overrides:
reject
in classAbstractSynchronizedFloatCollection
-
collect
Description copied from interface:FloatIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceFloatIterable
- Specified by:
collect
in interfaceFloatList
- Specified by:
collect
in interfaceMutableFloatCollection
- Specified by:
collect
in interfaceMutableFloatList
- Specified by:
collect
in interfaceOrderedFloatIterable
- Specified by:
collect
in interfaceReversibleFloatIterable
- Overrides:
collect
in classAbstractSynchronizedFloatCollection
-
sortThis
Description copied from interface:MutableFloatList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableFloatList
-
sortThis
Description copied from interface:MutableFloatList
Sorts the internal data structure of this list and returns the list itself as a convenience.- Specified by:
sortThis
in interfaceMutableFloatList
-
sortThisBy
Description copied from interface:MutableFloatList
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
.- Specified by:
sortThisBy
in interfaceMutableFloatList
-
sortThisBy
public <T> MutableFloatList sortThisBy(FloatToObjectFunction<T> function, Comparator<? super T> comparator)Description copied from interface:MutableFloatList
Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.- Specified by:
sortThisBy
in interfaceMutableFloatList
-
shuffleThis
Description copied from interface:MutableFloatList
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness.- Specified by:
shuffleThis
in interfaceMutableFloatList
-
shuffleThis
Description copied from interface:MutableFloatList
Randomly permutes this list mutating its contents and returns the same list (this). Implements the Fisher-Yates shuffle algorithm using the provided source of randomness.- Specified by:
shuffleThis
in interfaceMutableFloatList
-
binarySearch
public int binarySearch(float value)- Specified by:
binarySearch
in interfaceFloatList
-
dotProduct
- Specified by:
dotProduct
in interfaceFloatList
-
equals
Description copied from interface:FloatList
Follows the same general contract asList.equals(Object)
. -
hashCode
public int hashCode()Description copied from interface:FloatList
Follows the same general contract asList.hashCode()
. -
asLazy
Description copied from interface:FloatIterable
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.- Specified by:
asLazy
in interfaceFloatIterable
- Overrides:
asLazy
in classAbstractSynchronizedFloatCollection
-
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableFloatCollection
- Specified by:
asUnmodifiable
in interfaceMutableFloatList
- Overrides:
asUnmodifiable
in classAbstractSynchronizedFloatCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableFloatCollection
- Specified by:
asSynchronized
in interfaceMutableFloatList
- Overrides:
asSynchronized
in classAbstractSynchronizedFloatCollection
-
toImmutable
Description copied from interface:MutableFloatList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceFloatList
- Specified by:
toImmutable
in interfaceMutableFloatCollection
- Specified by:
toImmutable
in interfaceMutableFloatList
- Overrides:
toImmutable
in classAbstractSynchronizedFloatCollection
-
newEmpty
Description copied from interface:MutableFloatList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableFloatCollection
- Specified by:
newEmpty
in interfaceMutableFloatList
- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThis
in interfaceMutableFloatList
-
toReversed
- Specified by:
toReversed
in interfaceFloatList
- Specified by:
toReversed
in interfaceMutableFloatList
- Specified by:
toReversed
in interfaceReversibleFloatIterable
-
asReversed
- Specified by:
asReversed
in interfaceReversibleFloatIterable
-
forEachWithIndex
- Specified by:
forEachWithIndex
in interfaceOrderedFloatIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndex
in interfaceOrderedFloatIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleFloatIterable
-
distinct
- Specified by:
distinct
in interfaceFloatList
- Specified by:
distinct
in interfaceMutableFloatList
- Specified by:
distinct
in interfaceReversibleFloatIterable
- Since:
- 6.0.
-
subList
- Specified by:
subList
in interfaceFloatList
- Specified by:
subList
in interfaceMutableFloatList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipFloat
Description copied from interface:MutableFloatList
Returns aMutableList
formed from thisMutableFloatList
and anotherFloatList
by combining corresponding elements in pairs. If one of the twoFloatList
s is longer than the other, its remaining elements are ignored.- Specified by:
zipFloat
in interfaceFloatList
- Specified by:
zipFloat
in interfaceMutableFloatList
- Since:
- 9.1.
-
zip
Description copied from interface:MutableFloatList
Returns aMutableList
formed from thisMutableFloatList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zip
in interfaceFloatList
- Specified by:
zip
in interfaceMutableFloatList
- Since:
- 9.1.
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceFloatList
- Specified by:
collectWithIndex
in interfaceMutableFloatList
- Specified by:
collectWithIndex
in interfaceOrderedFloatIterable
- Specified by:
collectWithIndex
in interfaceReversibleFloatIterable
- Since:
- 9.1.
-
collectWithIndex
public <V, R extends Collection<V>> R collectWithIndex(FloatIntToObjectFunction<? extends V> function, R target)Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedFloatIterable
- Since:
- 9.1.
-