java.io.Externalizable
, java.io.Serializable
, MutableFloatCollection
, FloatIterable
, FloatList
, MutableFloatList
, OrderedFloatIterable
, ReversibleFloatIterable
, PrimitiveIterable
public class FloatArrayList extends AbstractFloatIterable implements MutableFloatList, java.io.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(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end) |
Prints a string representation of this collection onto the given
Appendable . |
LazyFloatIterable |
asReversed() |
|
MutableFloatList |
asSynchronized() |
|
MutableFloatList |
asUnmodifiable() |
|
int |
binarySearch(float value) |
|
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 java.util.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(java.lang.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() |
|
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(java.io.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 |
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(java.io.ObjectOutput out) |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, flatCollect, maxIfEmpty, median, medianIfEmpty, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
tap
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
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()
PrimitiveIterable
size
in interface PrimitiveIterable
public void clear()
clear
in interface MutableFloatCollection
public boolean contains(float value)
FloatIterable
contains
in interface FloatIterable
public float getFirst()
getFirst
in interface OrderedFloatIterable
public float getLast()
getLast
in interface ReversibleFloatIterable
public int indexOf(float value)
indexOf
in interface OrderedFloatIterable
public int lastIndexOf(float value)
lastIndexOf
in interface FloatList
public void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(float newItem)
add
in interface MutableFloatCollection
public boolean addAll(float... source)
addAll
in interface MutableFloatCollection
public boolean addAll(FloatIterable source)
addAll
in interface MutableFloatCollection
public void addAtIndex(int index, float element)
addAtIndex
in interface MutableFloatList
public boolean addAllAtIndex(int index, float... source)
addAllAtIndex
in interface MutableFloatList
public boolean addAllAtIndex(int index, FloatIterable source)
addAllAtIndex
in interface MutableFloatList
public boolean remove(float value)
remove
in interface MutableFloatCollection
public boolean removeAll(FloatIterable source)
removeAll
in interface MutableFloatCollection
public boolean removeAll(float... source)
removeAll
in interface MutableFloatCollection
public boolean retainAll(FloatIterable source)
retainAll
in interface MutableFloatCollection
Collection.retainAll(Collection)
public boolean retainAll(float... source)
retainAll
in interface MutableFloatCollection
Collection.retainAll(Collection)
public float removeAtIndex(int index)
removeAtIndex
in interface MutableFloatList
public float set(int index, float element)
set
in interface MutableFloatList
public FloatArrayList with(float element)
with
in interface MutableFloatCollection
with
in interface MutableFloatList
public FloatArrayList without(float element)
without
in interface MutableFloatCollection
without
in interface MutableFloatList
public FloatArrayList withAll(FloatIterable elements)
withAll
in interface MutableFloatCollection
withAll
in interface MutableFloatList
public FloatArrayList withoutAll(FloatIterable elements)
withoutAll
in interface MutableFloatCollection
withoutAll
in interface MutableFloatList
public 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()
FloatIterable
floatIterator
in interface FloatIterable
floatIterator
in interface MutableFloatCollection
public void forEach(FloatProcedure procedure)
FloatIterable
forEach
in interface FloatIterable
public void each(FloatProcedure procedure)
FloatIterable
each
in interface FloatIterable
public void forEachWithIndex(FloatIntProcedure procedure)
forEachWithIndex
in interface OrderedFloatIterable
public <T> T injectInto(T injectedValue, ObjectFloatToObjectFunction<? super T,? extends T> function)
injectInto
in interface FloatIterable
public <T> T injectIntoWithIndex(T injectedValue, ObjectFloatIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex
in interface OrderedFloatIterable
injectIntoWithIndex
in interface ReversibleFloatIterable
public int count(FloatPredicate predicate)
FloatIterable
count
in interface FloatIterable
public boolean anySatisfy(FloatPredicate predicate)
FloatIterable
anySatisfy
in interface FloatIterable
public boolean allSatisfy(FloatPredicate predicate)
FloatIterable
allSatisfy
in interface FloatIterable
public boolean noneSatisfy(FloatPredicate predicate)
FloatIterable
noneSatisfy
in interface FloatIterable
public FloatArrayList select(FloatPredicate predicate)
FloatIterable
select
in interface FloatIterable
select
in interface FloatList
select
in interface MutableFloatCollection
select
in interface MutableFloatList
select
in interface OrderedFloatIterable
select
in interface ReversibleFloatIterable
public <R extends MutableFloatCollection> R select(FloatPredicate predicate, R target)
FloatIterable
FloatIterable.select(FloatPredicate)
, only the results are added to the target MutableFloatCollection.select
in interface FloatIterable
public FloatArrayList reject(FloatPredicate predicate)
FloatIterable
reject
in interface FloatIterable
reject
in interface FloatList
reject
in interface MutableFloatCollection
reject
in interface MutableFloatList
reject
in interface OrderedFloatIterable
reject
in interface ReversibleFloatIterable
public <R extends MutableFloatCollection> R reject(FloatPredicate predicate, R target)
FloatIterable
FloatIterable.reject(FloatPredicate)
, only the results are added to the target MutableFloatCollection.reject
in interface FloatIterable
public float detectIfNone(FloatPredicate predicate, float ifNone)
detectIfNone
in interface FloatIterable
public <V> MutableList<V> collect(FloatToObjectFunction<? extends V> function)
FloatIterable
collect
in interface FloatIterable
collect
in interface FloatList
collect
in interface MutableFloatCollection
collect
in interface MutableFloatList
collect
in interface OrderedFloatIterable
collect
in interface ReversibleFloatIterable
public <V,R extends java.util.Collection<V>> R collect(FloatToObjectFunction<? extends V> function, R target)
FloatIterable
FloatIterable.collect(FloatToObjectFunction)
, only the results are added to the target Collection.collect
in interface FloatIterable
public float max()
max
in interface FloatIterable
public float min()
min
in interface FloatIterable
public double sum()
sum
in interface FloatIterable
public double dotProduct(FloatList list)
dotProduct
in interface FloatList
public float[] toArray()
FloatIterable
toArray
in interface FloatIterable
public boolean equals(java.lang.Object otherList)
FloatList
List.equals(Object)
.public int hashCode()
FloatList
List.hashCode()
.public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public MutableFloatList asUnmodifiable()
asUnmodifiable
in interface MutableFloatCollection
asUnmodifiable
in interface MutableFloatList
public MutableFloatList asSynchronized()
asSynchronized
in interface MutableFloatCollection
asSynchronized
in interface MutableFloatList
public ImmutableFloatList toImmutable()
MutableFloatList
toImmutable
in interface FloatList
toImmutable
in interface MutableFloatCollection
toImmutable
in interface MutableFloatList
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
java.io.IOException
public LazyFloatIterable asReversed()
asReversed
in interface ReversibleFloatIterable
public FloatArrayList reverseThis()
reverseThis
in interface MutableFloatList
public FloatArrayList sortThis()
MutableFloatList
sortThis
in interface MutableFloatList
public FloatArrayList toReversed()
toReversed
in interface FloatList
toReversed
in interface MutableFloatList
toReversed
in interface ReversibleFloatIterable
public int binarySearch(float value)
binarySearch
in interface FloatList
public MutableFloatList distinct()
distinct
in interface FloatList
distinct
in interface MutableFloatList
distinct
in interface ReversibleFloatIterable
public MutableFloatList subList(int fromIndex, int toIndex)
subList
in interface FloatList
subList
in interface MutableFloatList
List.subList(int fromIndex, int toIndex)
Copyright © 2004–2017. All rights reserved.