org.eigenbase.util
Class IntList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Integer>
              extended by org.eigenbase.util.IntList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Integer>, Collection<Integer>, List<Integer>, RandomAccess

public class IntList
extends ArrayList<Integer>

Extension to ArrayList to help build an array of int values.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/util/IntList.java#8 $
Author:
jhyde
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
IntList()
           
 
Method Summary
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()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

IntList

public IntList()
Method Detail

toIntArray

public int[] toIntArray()

toArray

public static int[] toArray(List<Integer> integers)
Converts a list of Integer objects to an array of primitive ints.

Parameters:
integers - List of Integer objects
Returns:
Array of primitive ints

asList

public static List<Integer> asList(int[] args)
Returns a list backed by an array of primitive int values.

The behavior is analogous to Arrays.asList(Object[]). Changes to the list are reflected in the array. The list cannot be extended.

Parameters:
args - Array of primitive int values
Returns:
List backed by array