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