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