Class IntegerList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Integer>, Collection<Integer>, List<Integer>, Random­Access, Sequenced­Collection<Integer>

public class IntegerList extends AbstractList<Integer> implements RandomAccess, Serializable, Cloneable
A list of unsigned integer values. This class packs the values in the minimal amount of bits required for storing unsigned integers of the given maximal value.

This class is not thread-safe. Synchronizations (if wanted) are user's responsibility.

Since:
0.7
See Also:
  • Constructor Details

    • IntegerList

      public IntegerList(int initialCapacity, int maximalValue)
      Creates an initially empty list with the given initial capacity.
      Parameters:
      initial­Capacity - the initial capacity.
      maximal­Value - the maximal value to be allowed, inclusive.
    • IntegerList

      public IntegerList(int initialCapacity, int maximalValue, boolean fill)
      Creates a new list with the given initial size. The value of all elements are initialized to 0.
      Parameters:
      initial­Capacity - the initial capacity.
      maximal­Value - the maximal value to be allowed, inclusive.
      fill - if true, the initial size is set to the initial capacity with all values set to 0.
  • Method Details