public class IntList extends ArrayList<Integer>
ArrayList to help build an array of int
values.modCount| Constructor and Description |
|---|
IntList() |
| Modifier and Type | Method and Description |
|---|---|
ImmutableIntList |
asImmutable() |
static List<Integer> |
asList(int[] args)
Returns a list backed by an array of primitive
int values. |
static int[] |
toArray(List<Integer> integers)
Converts a list of
Integer objects to an array of primitive
ints. |
int[] |
toIntArray() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodepublic int[] toIntArray()
public static int[] toArray(List<Integer> integers)
Integer objects to an array of primitive
ints.integers - List of Integer objectsintspublic static List<Integer> asList(int[] args)
int values.
The behavior is analogous to Arrays.asList(Object[]). Changes
to the list are reflected in the array. The list cannot be extended.
args - Array of primitive int valuespublic ImmutableIntList asImmutable()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.