Externalizable, Serializable, MutableFloatCollection, FloatIterable, FloatList, MutableFloatList, OrderedFloatIterable, ReversibleFloatIterable, PrimitiveIterablepublic class FloatArrayList extends AbstractFloatIterable implements MutableFloatList, Externalizable
FastList, and is memory-optimized for float primitives.
This file was automatically generated from template file primitiveArrayList.stg.| Constructor | Description |
|---|---|
FloatArrayList() |
|
FloatArrayList(float... array) |
|
FloatArrayList(int initialCapacity) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(float newItem) |
|
boolean |
addAll(float... source) |
|
boolean |
addAll(FloatIterable source) |
|
boolean |
addAllAtIndex(int index,
float... source) |
|
boolean |
addAllAtIndex(int index,
FloatIterable source) |
|
void |
addAtIndex(int index,
float element) |
|
boolean |
allSatisfy(FloatPredicate predicate) |
Returns true if all of the elements in the FloatIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(FloatPredicate predicate) |
Returns true if any of the elements in the FloatIterable return true for the
specified predicate, otherwise returns false.
|
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
Prints a string representation of this collection onto the given
Appendable. |
LazyFloatIterable |
asReversed() |
|
MutableFloatList |
asSynchronized() |
|
MutableFloatList |
asUnmodifiable() |
|
int |
binarySearch(float value) |
|
RichIterable<FloatIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
void |
clear() |
|
<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,R extends Collection<V>> |
collect(FloatToObjectFunction<? extends V> function,
R target) |
Same as
FloatIterable.collect(FloatToObjectFunction) , only the results are added to the target Collection. |
boolean |
contains(float value) |
Returns true if the value is contained in the FloatIterable, and false if it is not.
|
int |
count(FloatPredicate predicate) |
Returns a count of the number of elements in the FloatIterable that return true for the
specified predicate.
|
float |
detectIfNone(FloatPredicate predicate,
float ifNone) |
|
MutableFloatList |
distinct() |
|
double |
dotProduct(FloatList list) |
|
void |
each(FloatProcedure procedure) |
A synonym for forEach.
|
void |
ensureCapacity(int minCapacity) |
|
boolean |
equals(Object otherList) |
Follows the same general contract as
List.equals(Object). |
MutableFloatIterator |
floatIterator() |
Returns a primitive iterator that can be used to iterate over the FloatIterable in an
imperative style.
|
void |
forEach(FloatProcedure procedure) |
Applies the FloatProcedure to each element in the FloatIterable.
|
void |
forEachWithIndex(FloatIntProcedure procedure) |
|
float |
get(int index) |
|
float |
getFirst() |
|
float |
getLast() |
|
int |
hashCode() |
Follows the same general contract as
List.hashCode(). |
int |
indexOf(float value) |
|
<T> T |
injectInto(T injectedValue,
ObjectFloatToObjectFunction<? super T,? extends T> function) |
|
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectFloatIntToObjectFunction<? super T,? extends T> function) |
|
int |
lastIndexOf(float value) |
|
float |
max() |
|
float |
min() |
|
FloatArrayList |
newEmpty() |
Creates a new empty FloatArrayList.
|
static FloatArrayList |
newList(FloatIterable source) |
|
static FloatArrayList |
newListWith(float... elements) |
Creates a new list using the passed
elements argument as the backing store. |
static FloatArrayList |
newWithNValues(int size,
float value) |
|
boolean |
noneSatisfy(FloatPredicate predicate) |
Returns true if none of the elements in the FloatIterable return true for the
specified predicate, otherwise returns false.
|
void |
readExternal(ObjectInput in) |
|
FloatArrayList |
reject(FloatPredicate predicate) |
Returns a new FloatIterable with all of the elements in the FloatIterable that
return false for the specified predicate.
|
<R extends MutableFloatCollection> |
reject(FloatPredicate predicate,
R target) |
Same as
FloatIterable.reject(FloatPredicate) , only the results are added to the target MutableFloatCollection. |
boolean |
remove(float value) |
|
boolean |
removeAll(float... source) |
|
boolean |
removeAll(FloatIterable source) |
|
float |
removeAtIndex(int index) |
|
boolean |
removeIf(FloatPredicate predicate) |
|
boolean |
retainAll(float... source) |
|
boolean |
retainAll(FloatIterable source) |
|
FloatArrayList |
reverseThis() |
|
FloatArrayList |
select(FloatPredicate predicate) |
Returns a new FloatIterable with all of the elements in the FloatIterable that
return true for the specified predicate.
|
<R extends MutableFloatCollection> |
select(FloatPredicate predicate,
R target) |
Same as
FloatIterable.select(FloatPredicate) , only the results are added to the target MutableFloatCollection. |
float |
set(int index,
float element) |
|
int |
size() |
Returns the number of items in this iterable.
|
FloatArrayList |
sortThis() |
Sorts this list mutating its contents and returns the same mutable list (this).
|
MutableFloatList |
subList(int fromIndex,
int toIndex) |
|
double |
sum() |
|
float[] |
toArray() |
Converts the FloatIterable to a primitive float array.
|
ImmutableFloatList |
toImmutable() |
Returns an immutable copy of this list.
|
FloatArrayList |
toReversed() |
|
void |
trimToSize() |
|
FloatArrayList |
with(float element) |
|
FloatArrayList |
with(float element1,
float element2) |
|
FloatArrayList |
with(float element1,
float element2,
float element3) |
|
FloatArrayList |
with(float element1,
float element2,
float element3,
float... elements) |
|
FloatArrayList |
withAll(FloatIterable elements) |
|
FloatArrayList |
without(float element) |
|
FloatArrayList |
withoutAll(FloatIterable elements) |
|
void |
writeExternal(ObjectOutput out) |
|
<T> MutableList<FloatObjectPair<T>> |
zip(Iterable<T> iterable) |
Returns a
MutableList formed from this MutableFloatList and a ListIterable by
combining corresponding elements in pairs. |
MutableList<FloatFloatPair> |
zipFloat(FloatIterable iterable) |
Returns a
MutableList formed from this MutableFloatList and another FloatList by
combining corresponding elements in pairs. |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringasLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, flatCollect, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedListcollectWithIndex, tapcollectWithIndexappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic FloatArrayList()
public FloatArrayList(int initialCapacity)
public FloatArrayList(float... array)
public static FloatArrayList newListWith(float... elements)
elements argument 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. !!!
public static FloatArrayList newList(FloatIterable source)
public static FloatArrayList newWithNValues(int size, float value)
public int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic void clear()
clear in interface MutableFloatCollectionpublic boolean contains(float value)
FloatIterablecontains in interface FloatIterablepublic float getFirst()
getFirst in interface OrderedFloatIterablepublic float getLast()
getLast in interface ReversibleFloatIterablepublic int indexOf(float value)
indexOf in interface OrderedFloatIterablepublic int lastIndexOf(float value)
lastIndexOf in interface FloatListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(float newItem)
add in interface MutableFloatCollectionpublic boolean addAll(float... source)
addAll in interface MutableFloatCollectionpublic boolean addAll(FloatIterable source)
addAll in interface MutableFloatCollectionpublic void addAtIndex(int index,
float element)
addAtIndex in interface MutableFloatListpublic boolean addAllAtIndex(int index,
float... source)
addAllAtIndex in interface MutableFloatListpublic boolean addAllAtIndex(int index,
FloatIterable source)
addAllAtIndex in interface MutableFloatListpublic boolean remove(float value)
remove in interface MutableFloatCollectionpublic boolean removeIf(FloatPredicate predicate)
removeIf in interface MutableFloatCollectionpublic boolean removeAll(FloatIterable source)
removeAll in interface MutableFloatCollectionpublic boolean removeAll(float... source)
removeAll in interface MutableFloatCollectionpublic boolean retainAll(FloatIterable source)
retainAll in interface MutableFloatCollectionCollection.retainAll(Collection)public boolean retainAll(float... source)
retainAll in interface MutableFloatCollectionCollection.retainAll(Collection)public float removeAtIndex(int index)
removeAtIndex in interface MutableFloatListpublic float set(int index,
float element)
set in interface MutableFloatListpublic FloatArrayList with(float element)
with in interface MutableFloatCollectionwith in interface MutableFloatListpublic FloatArrayList without(float element)
without in interface MutableFloatCollectionwithout in interface MutableFloatListpublic FloatArrayList withAll(FloatIterable elements)
withAll in interface MutableFloatCollectionwithAll in interface MutableFloatListpublic FloatArrayList withoutAll(FloatIterable elements)
withoutAll in interface MutableFloatCollectionwithoutAll in interface MutableFloatListpublic FloatArrayList with(float element1, float element2)
public FloatArrayList with(float element1, float element2, float element3)
public FloatArrayList with(float element1, float element2, float element3, float... elements)
public MutableFloatIterator floatIterator()
FloatIterablefloatIterator in interface FloatIterablefloatIterator in interface MutableFloatCollectionpublic void forEach(FloatProcedure procedure)
FloatIterableforEach in interface FloatIterablepublic void each(FloatProcedure procedure)
FloatIterableeach in interface FloatIterablepublic void forEachWithIndex(FloatIntProcedure procedure)
forEachWithIndex in interface OrderedFloatIterablepublic <T> T injectInto(T injectedValue,
ObjectFloatToObjectFunction<? super T,? extends T> function)
injectInto in interface FloatIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectFloatIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedFloatIterableinjectIntoWithIndex in interface ReversibleFloatIterablepublic RichIterable<FloatIterable> chunk(int size)
FloatIterablechunk in interface FloatIterablesize - the number of elements per chunkRichIterable containing FloatIterables of size size, except the last will be
truncated if the elements don't divide evenly.public int count(FloatPredicate predicate)
FloatIterablecount in interface FloatIterablepublic boolean anySatisfy(FloatPredicate predicate)
FloatIterableanySatisfy in interface FloatIterablepublic boolean allSatisfy(FloatPredicate predicate)
FloatIterableallSatisfy in interface FloatIterablepublic boolean noneSatisfy(FloatPredicate predicate)
FloatIterablenoneSatisfy in interface FloatIterablepublic FloatArrayList select(FloatPredicate predicate)
FloatIterableselect in interface FloatIterableselect in interface FloatListselect in interface MutableFloatCollectionselect in interface MutableFloatListselect in interface OrderedFloatIterableselect in interface ReversibleFloatIterablepublic <R extends MutableFloatCollection> R select(FloatPredicate predicate, R target)
FloatIterableFloatIterable.select(FloatPredicate) , only the results are added to the target MutableFloatCollection.select in interface FloatIterablepublic FloatArrayList reject(FloatPredicate predicate)
FloatIterablereject in interface FloatIterablereject in interface FloatListreject in interface MutableFloatCollectionreject in interface MutableFloatListreject in interface OrderedFloatIterablereject in interface ReversibleFloatIterablepublic <R extends MutableFloatCollection> R reject(FloatPredicate predicate, R target)
FloatIterableFloatIterable.reject(FloatPredicate) , only the results are added to the target MutableFloatCollection.reject in interface FloatIterablepublic float detectIfNone(FloatPredicate predicate, float ifNone)
detectIfNone in interface FloatIterablepublic <V> MutableList<V> collect(FloatToObjectFunction<? extends V> function)
FloatIterablecollect in interface FloatIterablecollect in interface FloatListcollect in interface MutableFloatCollectioncollect in interface MutableFloatListcollect in interface OrderedFloatIterablecollect in interface ReversibleFloatIterablepublic <V,R extends Collection<V>> R collect(FloatToObjectFunction<? extends V> function, R target)
FloatIterableFloatIterable.collect(FloatToObjectFunction) , only the results are added to the target Collection.collect in interface FloatIterablepublic float max()
max in interface FloatIterablepublic float min()
min in interface FloatIterablepublic double sum()
sum in interface FloatIterablepublic double dotProduct(FloatList list)
dotProduct in interface FloatListpublic float[] toArray()
FloatIterabletoArray in interface FloatIterablepublic boolean equals(Object otherList)
FloatListList.equals(Object).public int hashCode()
FloatListList.hashCode().public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic MutableFloatList asUnmodifiable()
asUnmodifiable in interface MutableFloatCollectionasUnmodifiable in interface MutableFloatListpublic MutableFloatList asSynchronized()
asSynchronized in interface MutableFloatCollectionasSynchronized in interface MutableFloatListpublic ImmutableFloatList toImmutable()
MutableFloatListtoImmutable in interface FloatListtoImmutable in interface MutableFloatCollectiontoImmutable in interface MutableFloatListpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic LazyFloatIterable asReversed()
asReversed in interface ReversibleFloatIterablepublic FloatArrayList reverseThis()
reverseThis in interface MutableFloatListpublic FloatArrayList sortThis()
MutableFloatListsortThis in interface MutableFloatListpublic FloatArrayList toReversed()
toReversed in interface FloatListtoReversed in interface MutableFloatListtoReversed in interface ReversibleFloatIterablepublic int binarySearch(float value)
binarySearch in interface FloatListpublic MutableFloatList distinct()
distinct in interface FloatListdistinct in interface MutableFloatListdistinct in interface ReversibleFloatIterablepublic MutableFloatList subList(int fromIndex, int toIndex)
subList in interface FloatListsubList in interface MutableFloatListList.subList(int fromIndex, int toIndex)public MutableList<FloatFloatPair> zipFloat(FloatIterable iterable)
MutableFloatListMutableList formed from this MutableFloatList and another FloatList by
combining corresponding elements in pairs. If one of the two FloatLists is longer than the other, its
remaining elements are ignored.zipFloat in interface FloatListzipFloat in interface MutableFloatListpublic FloatArrayList newEmpty()
newEmpty in interface MutableFloatCollectionnewEmpty in interface MutableFloatListpublic <T> MutableList<FloatObjectPair<T>> zip(Iterable<T> iterable)
MutableFloatListMutableList formed from this MutableFloatList and a ListIterable by
combining corresponding elements in pairs. If one of the two Lists is longer than the other, its
remaining elements are ignored.zip in interface FloatListzip in interface MutableFloatListCopyright © 2004–2019. All rights reserved.