public class IntList
extends java.util.AbstractList<java.lang.Integer>
Has sum, mean, median, standardDeviation, reduceBy, variance.
| 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(java.lang.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(java.lang.Object o) |
java.lang.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(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.Integer |
set(int index,
java.lang.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(java.util.Collection<?> inputList,
java.lang.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(java.util.Collection<?> inputList, java.lang.String propertyPath)
inputList - input listpropertyPath - property pathpublic void clear()
clear in interface java.util.Collection<java.lang.Integer>clear in interface java.util.List<java.lang.Integer>clear in class java.util.AbstractList<java.lang.Integer>public java.lang.Integer get(int index)
get in interface java.util.List<java.lang.Integer>get in class java.util.AbstractList<java.lang.Integer>index - indexpublic final int getInt(int index)
index - indexpublic boolean add(java.lang.Integer integer)
add in interface java.util.Collection<java.lang.Integer>add in interface java.util.List<java.lang.Integer>add in class java.util.AbstractList<java.lang.Integer>integer - new valuepublic boolean addInt(int integer)
integer - new valuepublic IntList add(int integer)
integer - new valuepublic boolean addArray(int... integers)
public java.lang.Integer set(int index,
java.lang.Integer element)
set in interface java.util.List<java.lang.Integer>set in class java.util.AbstractList<java.lang.Integer>index - indexelement - new valuepublic int setInt(int index,
int element)
index - indexelement - new valuepublic int size()
size in interface java.util.Collection<java.lang.Integer>size in interface java.util.List<java.lang.Integer>size in class java.util.AbstractCollection<java.lang.Integer>public int sum()
public int[] toValueArray()
public long reduceBy(java.lang.Object function)
function - functionpublic long reduceBy(java.lang.Object function,
java.lang.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(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Integer>equals in interface java.util.List<java.lang.Integer>equals in class java.util.AbstractList<java.lang.Integer>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Integer>hashCode in interface java.util.List<java.lang.Integer>hashCode in class java.util.AbstractList<java.lang.Integer>Copyright © 2014. All Rights Reserved.