Class FloatArrayList
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractFloatIterable
org.eclipse.collections.impl.list.mutable.primitive.FloatArrayList
- All Implemented Interfaces:
Externalizable,Serializable,MutableFloatCollection,FloatIterable,FloatList,MutableFloatList,OrderedFloatIterable,ReversibleFloatIterable,PrimitiveIterable
public class FloatArrayList
extends AbstractFloatIterable
implements MutableFloatList, Externalizable
FloatArrayList is similar to FastList, and is memory-optimized for float primitives.
This file was automatically generated from template file primitiveArrayList.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(float newItem) booleanaddAll(float... source) booleanaddAll(FloatIterable source) booleanaddAllAtIndex(int index, float... source) booleanaddAllAtIndex(int index, FloatIterable source) voidaddAtIndex(int index, float element) booleanallSatisfy(FloatPredicate predicate) booleananySatisfy(FloatPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(float value) boxed()chunk(int size) voidclear()<V> MutableList<V>collect(FloatToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(FloatToObjectFunction<? extends V> function, R target) booleancontains(float value) intcount(FloatPredicate predicate) floatdetectIfNone(FloatPredicate predicate, float ifNone) distinct()doubledotProduct(FloatList list) voideach(FloatProcedure procedure) voidensureCapacity(int minCapacity) booleanvoidforEachWithIndex(FloatIntProcedure procedure) floatget(int index) floatgetFirst()floatgetLast()inthashCode()intindexOf(float value) <T> TinjectInto(T injectedValue, ObjectFloatToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T, ? extends T> function) intlastIndexOf(float value) floatmax()floatmin()newEmpty()Creates a new empty FloatArrayList.static FloatArrayListnewList(FloatIterable source) static FloatArrayListnewListWith(float... elements) Creates a new list using the passedelementsargument as the backing store.static FloatArrayListnewWithNValues(int size, float value) voidreject(FloatPredicate predicate) <R extends MutableFloatCollection>
Rreject(FloatPredicate predicate, R target) booleanremove(float value) booleanremoveAll(float... source) booleanremoveAll(FloatIterable source) floatremoveAtIndex(int index) booleanremoveIf(FloatPredicate predicate) booleanretainAll(float... source) booleanretainAll(FloatIterable source) select(FloatPredicate predicate) <R extends MutableFloatCollection>
Rselect(FloatPredicate predicate, R target) floatset(int index, float element) intsize()sortThis()sortThis(FloatComparator comparator) subList(int fromIndex, int toIndex) doublesum()voidswap(int index1, int index2) float[]toArray()float[]toArray(float[] target) toStack()voidwith(float element) with(float element1, float element2) with(float element1, float element2, float element3) with(float element1, float element2, float element3, float... elements) withAll(FloatIterable elements) without(float element) withoutAll(FloatIterable elements) static FloatArrayListwrapCopy(float... array) Creates a new list by first copying the array passed in.void<T> MutableList<FloatObjectPair<T>>zipFloat(FloatIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractFloatIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.FloatIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.FloatList
forEachInBothMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableFloatList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
FloatArrayList
public FloatArrayList() -
FloatArrayList
public FloatArrayList(int initialCapacity) -
FloatArrayList
public FloatArrayList(float... array)
-
-
Method Details
-
newListWith
Creates a new list using the passedelementsargument as the backing store.!!! WARNING: This method uses the passed in array, so can be very unsafe if the original array is held onto anywhere else. !!!
-
newList
-
newWithNValues
-
wrapCopy
Creates a new list by first copying the array passed in. -
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableFloatCollection
-
contains
public boolean contains(float value) - Specified by:
containsin interfaceFloatIterable
-
get
public float get(int index) -
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
-
trimToSize
public void trimToSize() -
ensureCapacity
public void ensureCapacity(int minCapacity) -
add
public boolean add(float newItem) - Specified by:
addin interfaceMutableFloatCollection
-
addAll
public boolean addAll(float... source) - Specified by:
addAllin interfaceMutableFloatCollection
-
addAll
- Specified by:
addAllin interfaceMutableFloatCollection
-
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
- Specified by:
addAllAtIndexin interfaceMutableFloatList
-
remove
public boolean remove(float value) - Specified by:
removein interfaceMutableFloatCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableFloatCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableFloatCollection
-
removeAll
public boolean removeAll(float... source) - Specified by:
removeAllin interfaceMutableFloatCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableFloatCollection
-
retainAll
public boolean retainAll(float... source) - Specified by:
retainAllin interfaceMutableFloatCollection
-
removeAtIndex
public float removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableFloatList
-
set
public float set(int index, float element) - Specified by:
setin interfaceMutableFloatList
-
swap
public void swap(int index1, int index2) - Specified by:
swapin interfaceMutableFloatList
-
with
- Specified by:
within interfaceMutableFloatCollection- Specified by:
within interfaceMutableFloatList
-
without
- Specified by:
withoutin interfaceMutableFloatCollection- Specified by:
withoutin interfaceMutableFloatList
-
withAll
- Specified by:
withAllin interfaceMutableFloatCollection- Specified by:
withAllin interfaceMutableFloatList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableFloatCollection- Specified by:
withoutAllin interfaceMutableFloatList
-
with
-
with
-
with
-
floatIterator
- Specified by:
floatIteratorin interfaceFloatIterable- Specified by:
floatIteratorin interfaceMutableFloatCollection
-
each
- Specified by:
eachin interfaceFloatIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedFloatIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectFloatToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceFloatIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedFloatIterable- Specified by:
injectIntoWithIndexin interfaceReversibleFloatIterable
-
chunk
- Specified by:
chunkin interfaceFloatIterable
-
count
- Specified by:
countin interfaceFloatIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceFloatIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceFloatIterable
-
select
- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceFloatList- Specified by:
selectin interfaceMutableFloatCollection- Specified by:
selectin interfaceMutableFloatList- Specified by:
selectin interfaceOrderedFloatIterable- Specified by:
selectin interfaceReversibleFloatIterable
-
select
- Specified by:
selectin interfaceFloatIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceFloatList- Specified by:
rejectin interfaceMutableFloatCollection- Specified by:
rejectin interfaceMutableFloatList- Specified by:
rejectin interfaceOrderedFloatIterable- Specified by:
rejectin interfaceReversibleFloatIterable
-
reject
- Specified by:
rejectin interfaceFloatIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceFloatIterable
-
collect
- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceFloatList- Specified by:
collectin interfaceMutableFloatCollection- Specified by:
collectin interfaceMutableFloatList- Specified by:
collectin interfaceOrderedFloatIterable- Specified by:
collectin interfaceReversibleFloatIterable
-
collect
public <V,R extends Collection<V>> R collect(FloatToObjectFunction<? extends V> function, R target) - Specified by:
collectin interfaceFloatIterable- Since:
- 8.1.
-
max
public float max()- Specified by:
maxin interfaceFloatIterable
-
min
public float min()- Specified by:
minin interfaceFloatIterable
-
sum
public double sum()- Specified by:
sumin interfaceFloatIterable
-
dotProduct
- Specified by:
dotProductin interfaceFloatList
-
toArray
public float[] toArray()- Specified by:
toArrayin interfaceFloatIterable
-
toArray
public float[] toArray(float[] target) - Specified by:
toArrayin interfaceFloatIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableFloatCollection- Specified by:
asUnmodifiablein interfaceMutableFloatList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableFloatCollection- Specified by:
asSynchronizedin interfaceMutableFloatList
-
toImmutable
- Specified by:
toImmutablein interfaceFloatList- Specified by:
toImmutablein interfaceMutableFloatCollection- Specified by:
toImmutablein interfaceMutableFloatList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
asReversed
- Specified by:
asReversedin interfaceReversibleFloatIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableFloatList
-
sortThis
- Specified by:
sortThisin interfaceMutableFloatList
-
sortThis
- Specified by:
sortThisin interfaceMutableFloatList
-
toReversed
- Specified by:
toReversedin interfaceFloatList- Specified by:
toReversedin interfaceMutableFloatList- Specified by:
toReversedin interfaceReversibleFloatIterable
-
binarySearch
public int binarySearch(float value) - Specified by:
binarySearchin interfaceFloatList
-
distinct
- Specified by:
distinctin interfaceFloatList- Specified by:
distinctin interfaceMutableFloatList- Specified by:
distinctin interfaceReversibleFloatIterable
-
subList
- Specified by:
subListin interfaceFloatList- Specified by:
subListin interfaceMutableFloatList
-
zipFloat
- Specified by:
zipFloatin interfaceFloatList- Specified by:
zipFloatin interfaceMutableFloatList- Since:
- 9.1.
-
newEmpty
Creates a new empty FloatArrayList.- Specified by:
newEmptyin interfaceMutableFloatCollection- Specified by:
newEmptyin interfaceMutableFloatList- Since:
- 9.2.
-
zip
- Specified by:
zipin interfaceFloatList- Specified by:
zipin interfaceMutableFloatList- Since:
- 9.1.
-
boxed
- Specified by:
boxedin interfaceMutableFloatList
-
toStack
- Specified by:
toStackin interfaceOrderedFloatIterable
-