Save This Page
Home » commons-collections-3.2.1-src » org.apache.commons » collections » primitives » [javadoc | source]
org.apache.commons.collections.primitives
public class: ArrayUnsignedIntList [javadoc | source]
java.lang.Object
   org.apache.commons.collections.primitives.AbstractLongCollection
      org.apache.commons.collections.primitives.RandomAccessLongList
         org.apache.commons.collections.primitives.ArrayUnsignedIntList

All Implemented Interfaces:
    Serializable, LongList, LongCollection

An IntList backed by an array of unsigned int values. This list stores int values in the range [ 0 , 65535 ] in 16-bits per element. Attempts to use elements outside this range may cause an IllegalArgumentException to be thrown.

This implementation supports all optional methods.

Field Summary
public static final  long MAX_VALUE    The maximum possible unsigned 32-bit value. 
public static final  long MIN_VALUE    The minimum possible unsigned 32-bit value. 
Constructor:
 public ArrayUnsignedIntList() 
 public ArrayUnsignedIntList(int initialCapacity) 
 public ArrayUnsignedIntList(LongCollection that) 
    Constructs a list containing the elements of the given collection, in the order they are returned by that collection's iterator.
    Parameters:
    that - the non-null collection of ints to add
    Throws:
    NullPointerException - if that is null
    Also see:
    AbstractLongCollection#addAll(LongCollection)
Method from org.apache.commons.collections.primitives.ArrayUnsignedIntList Summary:
add,   ensureCapacity,   get,   removeElementAt,   set,   size,   trimToSize
Methods from org.apache.commons.collections.primitives.RandomAccessLongList:
add,   add,   addAll,   equals,   get,   getModCount,   hashCode,   incrModCount,   indexOf,   iterator,   lastIndexOf,   listIterator,   listIterator,   removeElementAt,   set,   size,   subList,   toString
Methods from org.apache.commons.collections.primitives.AbstractLongCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   removeAll,   removeElement,   retainAll,   size,   toArray,   toArray
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.collections.primitives.ArrayUnsignedIntList Detail:
 public  void add(int index,
    long element) 
    Inserts the specified element at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right, increasing their indices. Throws IllegalArgumentException if element is less than #MIN_VALUE or greater than #MAX_VALUE .
 public  void ensureCapacity(int mincap) 
    Increases my capacity, if necessary, to ensure that I can hold at least the number of elements specified by the minimum capacity argument without growing.
 public long get(int index) 
    Returns the element at the specified position within me. By construction, the returned value will be between #MIN_VALUE and #MAX_VALUE , inclusive.
 public long removeElementAt(int index) 
    Removes the element at the specified position in (optional operation). Any subsequent elements are shifted to the left, subtracting one from their indices. Returns the element that was removed. By construction, the returned value will be between #MIN_VALUE and #MAX_VALUE , inclusive.
 public long set(int index,
    long element) 
 public int size() 
 public  void trimToSize() 
    Reduce my capacity, if necessary, to match my current size .