public class IntegerList extends Array<java.lang.Integer>
| Constructor and Description |
|---|
IntegerList()
Creates an empty IntegerList.
|
IntegerList(java.util.Collection<java.lang.Integer> coll)
Creates a IntegerList from the given collection.
|
IntegerList(java.lang.Integer... ary)
Creates a IntegerList from the given array.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
apply(Closure<java.lang.Integer,Pair<java.lang.Integer,java.lang.Integer>> closure)
Returns the value from the closure applied to all elements, or null if there are no elements
in this list.
|
static IntegerList |
empty()
Creates an empty IntegerList.
|
java.lang.Integer |
maximum()
Returns the maximum, or null if there are no elements in this list.
|
java.lang.Integer |
minimum()
Returns the minimum, or null if there are no elements in this list.
|
static IntegerList |
of(java.lang.Integer... args)
Creates a new IntegerList.
|
java.lang.Integer |
sum()
Returns the sum of all non-null elements, or 0 if there are no elements in the list.
|
append, compact, containsAny, containsAny, elements, first, get, get, getRandomElement, intersection, join, last, minus, of, plus, removeAll, set, sorted, takeFirst, takeLast, toStringArrayList, toStringList, uniqueadd, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitpublic IntegerList()
public IntegerList(java.util.Collection<java.lang.Integer> coll)
coll - the collection from which to initialize this listpublic IntegerList(java.lang.Integer... ary)
ary - the array from which to initialize this listpublic static IntegerList of(java.lang.Integer... args)
args - the integers to populate the new arraypublic static IntegerList empty()
public java.lang.Integer minimum()
public java.lang.Integer maximum()
public java.lang.Integer sum()
public java.lang.Integer apply(Closure<java.lang.Integer,Pair<java.lang.Integer,java.lang.Integer>> closure)
closure - the closure to be appied to each element