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 longserialVersionUID
-
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 booleanaddAllAtIndex(int index, float... source)booleanaddAllAtIndex(int index, FloatIterable source)voidaddAtIndex(int index, float element)LazyFloatIterableasLazy()Returns a LazyFloatIterable adapter wrapping the source FloatIterable.LazyFloatIterableasReversed()MutableFloatListasSynchronized()MutableFloatListasUnmodifiable()intbinarySearch(float value)MutableList<java.lang.Float>boxed()<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.MutableFloatListdistinct()doubledotProduct(FloatList list)booleanequals(java.lang.Object otherList)Follows the same general contract asList.equals(Object).voidforEachInBoth(FloatList other, FloatFloatProcedure procedure)This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.voidforEachWithIndex(FloatIntProcedure procedure)floatget(int index)floatgetFirst()floatgetLast()private MutableFloatListgetMutableFloatList()inthashCode()Follows the same general contract asList.hashCode().intindexOf(float value)<T> TinjectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T,? extends T> function)intlastIndexOf(float value)MutableFloatListnewEmpty()Creates a new empty mutable version of the same List type.MutableFloatListreject(FloatPredicate predicate)Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.MutableFloatListrejectWithIndex(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.floatremoveAtIndex(int index)MutableFloatListreverseThis()MutableFloatListselect(FloatPredicate predicate)Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.MutableFloatListselectWithIndex(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.floatset(int index, float element)MutableFloatListshuffleThis()Randomly permutes this list mutating its contents and returns the same list (this).MutableFloatListshuffleThis(java.util.Random rnd)Randomly permutes this list mutating its contents and returns the same list (this).MutableFloatListsortThis()Sorts this list mutating its contents and returns the same mutable list (this).MutableFloatListsortThis(FloatComparator comparator)Sorts the internal data structure of this list and returns the list itself as a convenience.<T> MutableFloatListsortThisBy(FloatToObjectFunction<T> function)Sorts the internal data structure of this list based on the natural order of the key returned byfunction.<T> MutableFloatListsortThisBy(FloatToObjectFunction<T> function, java.util.Comparator<? super T> comparator)Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.MutableFloatListsubList(int fromIndex, int toIndex)ImmutableFloatListtoImmutable()Returns an immutable copy of this list.MutableFloatListtoReversed()MutableFloatStacktoStack()Converts the collection to a FloatStack.SynchronizedFloatListwith(float element)SynchronizedFloatListwithAll(FloatIterable elements)SynchronizedFloatListwithout(float element)SynchronizedFloatListwithoutAll(FloatIterable elements)<T> MutableList<FloatObjectPair<T>>zip(java.lang.Iterable<T> iterable)Returns aMutableListformed from thisMutableFloatListand aListIterableby combining corresponding elements in pairs.MutableList<FloatFloatPair>zipFloat(FloatIterable iterable)Returns aMutableListformed from thisMutableFloatListand anotherFloatListby 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:
getFirstin interfaceOrderedFloatIterable
-
getLast
public float getLast()
- Specified by:
getLastin interfaceReversibleFloatIterable
-
indexOf
public int indexOf(float value)
- Specified by:
indexOfin interfaceOrderedFloatIterable
-
lastIndexOf
public int lastIndexOf(float value)
- Specified by:
lastIndexOfin interfaceFloatList
-
addAtIndex
public void addAtIndex(int index, float element)- Specified by:
addAtIndexin interfaceMutableFloatList
-
addAllAtIndex
public boolean addAllAtIndex(int index, float... source)- Specified by:
addAllAtIndexin interfaceMutableFloatList
-
addAllAtIndex
public boolean addAllAtIndex(int index, FloatIterable source)- Specified by:
addAllAtIndexin interfaceMutableFloatList
-
removeAtIndex
public float removeAtIndex(int index)
- Specified by:
removeAtIndexin interfaceMutableFloatList
-
set
public float set(int index, float element)- Specified by:
setin interfaceMutableFloatList
-
with
public SynchronizedFloatList with(float element)
- Specified by:
within interfaceMutableFloatCollection- Specified by:
within interfaceMutableFloatList- Overrides:
within classAbstractSynchronizedFloatCollection
-
without
public SynchronizedFloatList without(float element)
- Specified by:
withoutin interfaceMutableFloatCollection- Specified by:
withoutin interfaceMutableFloatList- Overrides:
withoutin classAbstractSynchronizedFloatCollection
-
withAll
public SynchronizedFloatList withAll(FloatIterable elements)
- Specified by:
withAllin interfaceMutableFloatCollection- Specified by:
withAllin interfaceMutableFloatList- Overrides:
withAllin classAbstractSynchronizedFloatCollection
-
withoutAll
public SynchronizedFloatList withoutAll(FloatIterable elements)
- Specified by:
withoutAllin interfaceMutableFloatCollection- Specified by:
withoutAllin interfaceMutableFloatList- Overrides:
withoutAllin classAbstractSynchronizedFloatCollection
-
select
public MutableFloatList select(FloatPredicate predicate)
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceFloatList- Specified by:
selectin interfaceMutableFloatCollection- Specified by:
selectin interfaceMutableFloatList- Specified by:
selectin interfaceOrderedFloatIterable- Specified by:
selectin interfaceReversibleFloatIterable- Overrides:
selectin classAbstractSynchronizedFloatCollection
-
boxed
public MutableList<java.lang.Float> boxed()
- Specified by:
boxedin interfaceMutableFloatList
-
reject
public MutableFloatList reject(FloatPredicate predicate)
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceFloatList- Specified by:
rejectin interfaceMutableFloatCollection- Specified by:
rejectin interfaceMutableFloatList- Specified by:
rejectin interfaceOrderedFloatIterable- Specified by:
rejectin interfaceReversibleFloatIterable- Overrides:
rejectin classAbstractSynchronizedFloatCollection
-
collect
public <V> MutableList<V> collect(FloatToObjectFunction<? extends V> function)
Description copied from interface:FloatIterableReturns 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:
collectin interfaceFloatIterable- Specified by:
collectin interfaceFloatList- Specified by:
collectin interfaceMutableFloatCollection- Specified by:
collectin interfaceMutableFloatList- Specified by:
collectin interfaceOrderedFloatIterable- Specified by:
collectin interfaceReversibleFloatIterable- Overrides:
collectin classAbstractSynchronizedFloatCollection
-
sortThis
public MutableFloatList sortThis()
Description copied from interface:MutableFloatListSorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThisin interfaceMutableFloatList
-
sortThis
public MutableFloatList sortThis(FloatComparator comparator)
Description copied from interface:MutableFloatListSorts the internal data structure of this list and returns the list itself as a convenience.- Specified by:
sortThisin interfaceMutableFloatList
-
sortThisBy
public <T> MutableFloatList sortThisBy(FloatToObjectFunction<T> function)
Description copied from interface:MutableFloatListSorts the internal data structure of this list based on the natural order of the key returned byfunction.- Specified by:
sortThisByin interfaceMutableFloatList
-
sortThisBy
public <T> MutableFloatList sortThisBy(FloatToObjectFunction<T> function, java.util.Comparator<? super T> comparator)
Description copied from interface:MutableFloatListSorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.- Specified by:
sortThisByin interfaceMutableFloatList
-
shuffleThis
public MutableFloatList shuffleThis()
Description copied from interface:MutableFloatListRandomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness.- Specified by:
shuffleThisin interfaceMutableFloatList
-
shuffleThis
public MutableFloatList shuffleThis(java.util.Random rnd)
Description copied from interface:MutableFloatListRandomly 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:
shuffleThisin interfaceMutableFloatList
-
binarySearch
public int binarySearch(float value)
- Specified by:
binarySearchin interfaceFloatList
-
dotProduct
public double dotProduct(FloatList list)
- Specified by:
dotProductin interfaceFloatList
-
equals
public boolean equals(java.lang.Object otherList)
Description copied from interface:FloatListFollows the same general contract asList.equals(Object).
-
hashCode
public int hashCode()
Description copied from interface:FloatListFollows the same general contract asList.hashCode().
-
asLazy
public LazyFloatIterable asLazy()
Description copied from interface:FloatIterableReturns a LazyFloatIterable adapter wrapping the source FloatIterable.- Specified by:
asLazyin interfaceFloatIterable- Overrides:
asLazyin classAbstractSynchronizedFloatCollection
-
asUnmodifiable
public MutableFloatList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableFloatCollection- Specified by:
asUnmodifiablein interfaceMutableFloatList- Overrides:
asUnmodifiablein classAbstractSynchronizedFloatCollection
-
asSynchronized
public MutableFloatList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableFloatCollection- Specified by:
asSynchronizedin interfaceMutableFloatList- Overrides:
asSynchronizedin classAbstractSynchronizedFloatCollection
-
toImmutable
public ImmutableFloatList toImmutable()
Description copied from interface:MutableFloatListReturns an immutable copy of this list.- Specified by:
toImmutablein interfaceFloatList- Specified by:
toImmutablein interfaceMutableFloatCollection- Specified by:
toImmutablein interfaceMutableFloatList- Overrides:
toImmutablein classAbstractSynchronizedFloatCollection
-
newEmpty
public MutableFloatList newEmpty()
Description copied from interface:MutableFloatListCreates a new empty mutable version of the same List type.- Specified by:
newEmptyin interfaceMutableFloatCollection- Specified by:
newEmptyin interfaceMutableFloatList- Since:
- 9.2.
-
reverseThis
public MutableFloatList reverseThis()
- Specified by:
reverseThisin interfaceMutableFloatList
-
toReversed
public MutableFloatList toReversed()
- Specified by:
toReversedin interfaceFloatList- Specified by:
toReversedin interfaceMutableFloatList- Specified by:
toReversedin interfaceReversibleFloatIterable
-
asReversed
public LazyFloatIterable asReversed()
- Specified by:
asReversedin interfaceReversibleFloatIterable
-
forEachInBoth
public void forEachInBoth(FloatList other, FloatFloatProcedure procedure)
Description copied from interface:FloatListThis method iterates over two CharList instances of the same size together using the specified CharCharProcedure.- Specified by:
forEachInBothin interfaceFloatList
-
forEachWithIndex
public void forEachWithIndex(FloatIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedFloatIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndexin interfaceOrderedFloatIterable- Specified by:
injectIntoWithIndexin interfaceReversibleFloatIterable
-
distinct
public MutableFloatList distinct()
- Specified by:
distinctin interfaceFloatList- Specified by:
distinctin interfaceMutableFloatList- Specified by:
distinctin interfaceReversibleFloatIterable- Since:
- 6.0.
-
subList
public MutableFloatList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceFloatList- Specified by:
subListin interfaceMutableFloatList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipFloat
public MutableList<FloatFloatPair> zipFloat(FloatIterable iterable)
Description copied from interface:MutableFloatListReturns aMutableListformed from thisMutableFloatListand anotherFloatListby combining corresponding elements in pairs. If one of the twoFloatLists is longer than the other, its remaining elements are ignored.- Specified by:
zipFloatin interfaceFloatList- Specified by:
zipFloatin interfaceMutableFloatList- Since:
- 9.1.
-
zip
public <T> MutableList<FloatObjectPair<T>> zip(java.lang.Iterable<T> iterable)
Description copied from interface:MutableFloatListReturns aMutableListformed from thisMutableFloatListand aListIterableby combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.- Specified by:
zipin interfaceFloatList- Specified by:
zipin 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:
selectWithIndexin interfaceFloatList- Specified by:
selectWithIndexin interfaceMutableFloatList- Specified by:
selectWithIndexin interfaceOrderedFloatIterable- Specified by:
selectWithIndexin 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:
selectWithIndexin 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:
rejectWithIndexin interfaceFloatList- Specified by:
rejectWithIndexin interfaceMutableFloatList- Specified by:
rejectWithIndexin interfaceOrderedFloatIterable- Specified by:
rejectWithIndexin 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:
rejectWithIndexin 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:
collectWithIndexin interfaceFloatList- Specified by:
collectWithIndexin interfaceMutableFloatList- Specified by:
collectWithIndexin interfaceOrderedFloatIterable- Specified by:
collectWithIndexin 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:
collectWithIndexin interfaceOrderedFloatIterable- Since:
- 9.1.
-
toStack
public MutableFloatStack toStack()
Description copied from interface:OrderedFloatIterableConverts the collection to a FloatStack.- Specified by:
toStackin interfaceOrderedFloatIterable
-
-