public class LongList extends AbstractList<Long>
Has sum, mean, median, standardDeviation, reduceBy, variance.
modCount| 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(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(Object o) |
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(Object function)
This would be a good opportunity to reintroduce dynamic invoke
|
long |
reduceBy(Object function,
String name)
This would be a good opportunity to reintroduce dynamic invoke
|
Long |
set(int index,
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(Collection<?> inputList,
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(Collection<?> inputList, String propertyPath)
inputList - input listpropertyPath - property pathpublic Long get(int index)
public final long getInt(int index)
index - indexpublic boolean add(Long integer)
add in interface Collection<Long>add in interface List<Long>add in class AbstractList<Long>integer - new valuepublic boolean addLong(long integer)
integer - new valuepublic LongList add(long integer)
integer - new valuepublic boolean addArray(long... integers)
public long setLong(int index,
int element)
index - indexelement - new valuepublic int size()
size in interface Collection<Long>size in interface List<Long>size in class AbstractCollection<Long>public long sum()
public long[] toValueArray()
public long reduceBy(Object function)
function - functionpublic long reduceBy(Object function, 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(Object o)
equals in interface Collection<Long>equals in interface List<Long>equals in class AbstractList<Long>public int hashCode()
hashCode in interface Collection<Long>hashCode in interface List<Long>hashCode in class AbstractList<Long>public void clear()
clear in interface Collection<Long>clear in interface List<Long>clear in class AbstractList<Long>Copyright © 2014. All rights reserved.