Class SynchronizedFloatList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.SynchronizedFloatList
-
- All Implemented Interfaces:
java.io.Serializable
,MutableFloatCollection
,FloatIterable
,FloatList
,MutableFloatList
,OrderedFloatIterable
,ReversibleFloatIterable
,PrimitiveIterable
public class SynchronizedFloatList extends AbstractSynchronizedFloatCollection implements MutableFloatList
A synchronized view of aMutableFloatList
. 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
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SynchronizedFloatList(MutableFloatList list)
SynchronizedFloatList(MutableFloatList list, java.lang.Object newLock)
-
Method Summary
All Methods Instance Methods Concrete Methods 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 java.util.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(java.lang.Object otherList)
Follows the same general contract asList.equals(Object)
.void
forEachInBoth(FloatList other, FloatFloatProcedure procedure)
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.void
forEachWithIndex(FloatIntProcedure procedure)
float
get(int index)
float
getFirst()
float
getLast()
private MutableFloatList
getMutableFloatList()
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.MutableFloatList
rejectWithIndex(FloatIntPredicate predicate)
Returns a new MutableFloatList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableFloatCollection>
RrejectWithIndex(FloatIntPredicate predicate, R target)
Returns a new MutableFloatCollection excluding all elements with corresponding indexes matching 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.MutableFloatList
selectWithIndex(FloatIntPredicate predicate)
Returns a new MutableFloatList including all elements with corresponding indexes matching the specified predicate.<R extends MutableFloatCollection>
RselectWithIndex(FloatIntPredicate predicate, R target)
Returns a new MutableFloatCollection including all elements with corresponding indexes matching 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(java.util.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, java.util.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(java.lang.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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, floatIterator, getFloatCollection, getLock, 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SynchronizedFloatList
public SynchronizedFloatList(MutableFloatList list)
-
SynchronizedFloatList
public SynchronizedFloatList(MutableFloatList list, java.lang.Object newLock)
-
-
Method Detail
-
getMutableFloatList
private MutableFloatList getMutableFloatList()
-
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
public boolean addAllAtIndex(int index, FloatIterable source)
- 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
public SynchronizedFloatList with(float element)
- Specified by:
with
in interfaceMutableFloatCollection
- Specified by:
with
in interfaceMutableFloatList
- Overrides:
with
in classAbstractSynchronizedFloatCollection
-
without
public SynchronizedFloatList without(float element)
- Specified by:
without
in interfaceMutableFloatCollection
- Specified by:
without
in interfaceMutableFloatList
- Overrides:
without
in classAbstractSynchronizedFloatCollection
-
withAll
public SynchronizedFloatList withAll(FloatIterable elements)
- Specified by:
withAll
in interfaceMutableFloatCollection
- Specified by:
withAll
in interfaceMutableFloatList
- Overrides:
withAll
in classAbstractSynchronizedFloatCollection
-
withoutAll
public SynchronizedFloatList withoutAll(FloatIterable elements)
- Specified by:
withoutAll
in interfaceMutableFloatCollection
- Specified by:
withoutAll
in interfaceMutableFloatList
- Overrides:
withoutAll
in classAbstractSynchronizedFloatCollection
-
select
public MutableFloatList select(FloatPredicate predicate)
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
public MutableFloatList reject(FloatPredicate predicate)
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
public <V> MutableList<V> collect(FloatToObjectFunction<? extends V> function)
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
public MutableFloatList 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
public MutableFloatList sortThis(FloatComparator comparator)
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
public <T> MutableFloatList sortThisBy(FloatToObjectFunction<T> function)
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, java.util.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
public MutableFloatList 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
public MutableFloatList shuffleThis(java.util.Random rnd)
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
public double dotProduct(FloatList list)
- Specified by:
dotProduct
in interfaceFloatList
-
equals
public boolean equals(java.lang.Object otherList)
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
public LazyFloatIterable asLazy()
Description copied from interface:FloatIterable
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.- Specified by:
asLazy
in interfaceFloatIterable
- Overrides:
asLazy
in classAbstractSynchronizedFloatCollection
-
asUnmodifiable
public MutableFloatList asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableFloatCollection
- Specified by:
asUnmodifiable
in interfaceMutableFloatList
- Overrides:
asUnmodifiable
in classAbstractSynchronizedFloatCollection
-
asSynchronized
public MutableFloatList asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableFloatCollection
- Specified by:
asSynchronized
in interfaceMutableFloatList
- Overrides:
asSynchronized
in classAbstractSynchronizedFloatCollection
-
toImmutable
public ImmutableFloatList 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
public MutableFloatList 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
public MutableFloatList reverseThis()
- Specified by:
reverseThis
in interfaceMutableFloatList
-
toReversed
public MutableFloatList toReversed()
- Specified by:
toReversed
in interfaceFloatList
- Specified by:
toReversed
in interfaceMutableFloatList
- Specified by:
toReversed
in interfaceReversibleFloatIterable
-
asReversed
public LazyFloatIterable asReversed()
- Specified by:
asReversed
in interfaceReversibleFloatIterable
-
forEachInBoth
public void forEachInBoth(FloatList other, FloatFloatProcedure procedure)
Description copied from interface:FloatList
This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.- Specified by:
forEachInBoth
in interfaceFloatList
-
forEachWithIndex
public void forEachWithIndex(FloatIntProcedure procedure)
- 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
public MutableFloatList distinct()
- Specified by:
distinct
in interfaceFloatList
- Specified by:
distinct
in interfaceMutableFloatList
- Specified by:
distinct
in interfaceReversibleFloatIterable
- Since:
- 6.0.
-
subList
public MutableFloatList subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceFloatList
- Specified by:
subList
in interfaceMutableFloatList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipFloat
public MutableList<FloatFloatPair> zipFloat(FloatIterable iterable)
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
public <T> MutableList<FloatObjectPair<T>> zip(java.lang.Iterable<T> iterable)
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.
-
selectWithIndex
public MutableFloatList selectWithIndex(FloatIntPredicate predicate)
Returns a new MutableFloatList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceFloatList
- Specified by:
selectWithIndex
in interfaceMutableFloatList
- Specified by:
selectWithIndex
in interfaceOrderedFloatIterable
- Specified by:
selectWithIndex
in interfaceReversibleFloatIterable
- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableFloatCollection> R selectWithIndex(FloatIntPredicate predicate, R target)
Returns a new MutableFloatCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedFloatIterable
- Since:
- 11.1.
-
rejectWithIndex
public MutableFloatList rejectWithIndex(FloatIntPredicate predicate)
Returns a new MutableFloatList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceFloatList
- Specified by:
rejectWithIndex
in interfaceMutableFloatList
- Specified by:
rejectWithIndex
in interfaceOrderedFloatIterable
- Specified by:
rejectWithIndex
in interfaceReversibleFloatIterable
- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableFloatCollection> R rejectWithIndex(FloatIntPredicate predicate, R target)
Returns a new MutableFloatCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedFloatIterable
- Since:
- 11.1.
-
collectWithIndex
public <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.- 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 java.util.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.
-
-