public class FloatList extends AbstractList<Float>
Has sum, mean, median, standardDeviation, reduceBy, variance.
modCount
Constructor and Description |
---|
FloatList()
Create a new list with exactly 10 items in it.
|
FloatList(float[] values)
Create a new list with this many items in it.
|
FloatList(int capacity)
Create a new list with this many items in it.
|
Modifier and Type | Method and Description |
---|---|
FloatList |
add(float integer)
Add a new value to the list but don't employ a wrapper.
|
boolean |
add(Float integer)
Add a new value to the list.
|
boolean |
addArray(float... integers)
Add a new array to the list.
|
boolean |
addFloat(float value)
Add a new value to the list but don't employ a wrapper.
|
float |
atIndex(int index)
Get the value at index
|
float |
atIndex(int index,
float element)
Set a value in the list.
|
boolean |
equals(Object o) |
Float |
get(int index)
Get the value at index
|
float |
getFloat(int index)
Get the value at index but don't use a wrapper
|
int |
hashCode() |
float |
idx(int index)
Get the value at index
|
float |
idx(int index,
float element)
Set a value in the list.
|
float |
max()
max
|
float |
mean()
Mean
|
float |
median()
median
|
float |
min()
min
|
double |
reduceBy(Flt.ReduceBy reduceBy) |
double |
reduceBy(Object function)
This would be a good opportunity to reintroduce dynamic invoke
|
double |
reduceBy(Object function,
String name)
This would be a good opportunity to reintroduce dynamic invoke
|
Float |
set(int index,
Float element)
Set a value in the list.
|
float |
setFloat(int index,
float element)
Set in a new value no wrapper
|
int |
size()
Return the current size.
|
void |
sort()
sort
|
float |
standardDeviation()
standardDeviation
|
float |
sum()
Sums the values with bounds checking.
|
static FloatList |
toFloatList(Collection<?> inputList,
String propertyPath)
Creates a primitive list based on an input list and a property path
|
float[] |
toValueArray()
Get a copy of the array up to the end element.
|
float |
variance()
variance
|
add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
public FloatList(int capacity)
public FloatList()
public FloatList(float[] values)
public static FloatList toFloatList(Collection<?> inputList, String propertyPath)
inputList
- input listpropertyPath
- property pathpublic Float get(int index)
public float idx(int index)
index
- indexpublic float atIndex(int index)
index
- indexpublic final float getFloat(int index)
index
- indexpublic boolean add(Float integer)
add
in interface Collection<Float>
add
in interface List<Float>
add
in class AbstractList<Float>
integer
- new valuepublic boolean addFloat(float value)
value
- new valuepublic FloatList add(float integer)
integer
- new valuepublic boolean addArray(float... integers)
public float idx(int index, float element)
index
- indexelement
- new valuepublic float atIndex(int index, float element)
index
- indexelement
- new valuepublic float setFloat(int index, float element)
index
- indexelement
- new valuepublic int size()
size
in interface Collection<Float>
size
in interface List<Float>
size
in class AbstractCollection<Float>
public float sum()
public float[] toValueArray()
public double reduceBy(Object function)
function
- functionpublic double reduceBy(Object function, String name)
function
- functionpublic double reduceBy(Flt.ReduceBy reduceBy)
reduceBy
- reduceBy functionpublic float mean()
public float standardDeviation()
public float variance()
public float max()
public float min()
public float median()
public void sort()
public boolean equals(Object o)
equals
in interface Collection<Float>
equals
in interface List<Float>
equals
in class AbstractList<Float>
public int hashCode()
hashCode
in interface Collection<Float>
hashCode
in interface List<Float>
hashCode
in class AbstractList<Float>
Copyright © 2014. All rights reserved.