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