@NotThreadSafe public final class FloatArrayList extends Object implements MutableFloatList, Externalizable
FastList, and is memory-optimized for float primitives.
This file was automatically generated from template file primitiveArrayList.stg.| Constructor and Description |
|---|
FloatArrayList() |
FloatArrayList(float... array) |
FloatArrayList(int initialCapacity) |
| Modifier and Type | Method and 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) |
boolean |
anySatisfy(FloatPredicate predicate) |
void |
appendString(Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyFloatIterable |
asLazy() |
LazyFloatIterable |
asReversed() |
MutableFloatList |
asSynchronized() |
MutableFloatList |
asUnmodifiable() |
double |
average() |
void |
clear() |
<V> MutableList<V> |
collect(FloatToObjectFunction<? extends V> function) |
boolean |
contains(float value) |
boolean |
containsAll(float... source) |
boolean |
containsAll(FloatIterable source) |
int |
count(FloatPredicate predicate) |
float |
detectIfNone(FloatPredicate predicate,
float ifNone) |
double |
dotProduct(FloatList list) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object otherList)
Follows the same general contract as
List.equals(Object). |
FloatIterator |
floatIterator() |
void |
forEach(FloatProcedure procedure) |
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) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
int |
lastIndexOf(float value) |
String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
float |
max() |
float |
maxIfEmpty(float defaultValue) |
double |
median() |
float |
min() |
float |
minIfEmpty(float defaultValue) |
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) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
readExternal(ObjectInput in) |
FloatArrayList |
reject(FloatPredicate predicate) |
boolean |
remove(float value) |
boolean |
removeAll(float... source) |
boolean |
removeAll(FloatIterable source) |
float |
removeAtIndex(int index) |
boolean |
retainAll(float... source) |
boolean |
retainAll(FloatIterable source) |
FloatArrayList |
reverseThis() |
FloatArrayList |
select(FloatPredicate predicate) |
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() |
MutableFloatBag |
toBag() |
ImmutableFloatList |
toImmutable()
Returns an immutable copy of this list.
|
MutableFloatList |
toList() |
FloatArrayList |
toReversed() |
MutableFloatSet |
toSet() |
float[] |
toSortedArray() |
MutableFloatList |
toSortedList() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
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) |
public 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 boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableFloatCollectionpublic boolean contains(float value)
contains in interface FloatIterablepublic boolean containsAll(float... source)
containsAll in interface FloatIterablepublic boolean containsAll(FloatIterable source)
containsAll in interface FloatIterablepublic float getFirst()
getFirst in interface ReversibleFloatIterablepublic float getLast()
getLast in interface ReversibleFloatIterablepublic int indexOf(float value)
indexOf in interface ReversibleFloatIterablepublic 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 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 FloatIterator floatIterator()
floatIterator in interface FloatIterablepublic void forEach(FloatProcedure procedure)
forEach in interface FloatIterablepublic void forEachWithIndex(FloatIntProcedure procedure)
forEachWithIndex in interface ReversibleFloatIterablepublic <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 ReversibleFloatIterablepublic int count(FloatPredicate predicate)
count in interface FloatIterablepublic boolean anySatisfy(FloatPredicate predicate)
anySatisfy in interface FloatIterablepublic boolean allSatisfy(FloatPredicate predicate)
allSatisfy in interface FloatIterablepublic boolean noneSatisfy(FloatPredicate predicate)
noneSatisfy in interface FloatIterablepublic FloatArrayList select(FloatPredicate predicate)
select in interface MutableFloatCollectionselect in interface FloatIterableselect in interface FloatListselect in interface MutableFloatListselect in interface ReversibleFloatIterablepublic FloatArrayList reject(FloatPredicate predicate)
reject in interface MutableFloatCollectionreject in interface FloatIterablereject in interface FloatListreject in interface MutableFloatListreject in interface ReversibleFloatIterablepublic float detectIfNone(FloatPredicate predicate, float ifNone)
detectIfNone in interface FloatIterablepublic <V> MutableList<V> collect(FloatToObjectFunction<? extends V> function)
collect in interface MutableFloatCollectioncollect in interface FloatIterablecollect in interface FloatListcollect in interface MutableFloatListcollect in interface ReversibleFloatIterablepublic float max()
max in interface FloatIterablepublic float min()
min in interface FloatIterablepublic float minIfEmpty(float defaultValue)
minIfEmpty in interface FloatIterablepublic float maxIfEmpty(float defaultValue)
maxIfEmpty in interface FloatIterablepublic double sum()
sum in interface FloatIterablepublic double dotProduct(FloatList list)
dotProduct in interface FloatListpublic double average()
average in interface FloatIterablepublic double median()
median in interface FloatIterablepublic float[] toArray()
toArray in interface FloatIterablepublic float[] toSortedArray()
toSortedArray in interface FloatIterablepublic boolean equals(Object otherList)
FloatListList.equals(Object).public int hashCode()
FloatListList.hashCode().public String toString()
PrimitiveIterabletoString in interface PrimitiveIterabletoString in class Objectpublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic 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 toList()
toList in interface FloatIterablepublic MutableFloatList toSortedList()
toSortedList in interface FloatIterablepublic MutableFloatSet toSet()
toSet in interface FloatIterablepublic MutableFloatBag toBag()
toBag in interface FloatIterablepublic LazyFloatIterable asLazy()
asLazy in interface FloatIterablepublic MutableFloatList asUnmodifiable()
asUnmodifiable in interface MutableFloatCollectionasUnmodifiable in interface MutableFloatListpublic MutableFloatList asSynchronized()
asSynchronized in interface MutableFloatCollectionasSynchronized in interface MutableFloatListpublic ImmutableFloatList toImmutable()
MutableFloatListtoImmutable in interface MutableFloatCollectiontoImmutable in interface FloatListtoImmutable 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 MutableFloatList subList(int fromIndex, int toIndex)
subList in interface FloatListsubList in interface MutableFloatListList#subList(int fromIndex, int toIndex)}Copyright © 2004–2017. All rights reserved.