org.apache.commons.compress.harmony.pack200

## Class IntList

- java.lang.Object
- - org.apache.commons.compress.harmony.pack200.IntList

-     public class IntList
      extends Object

  IntList is based on `java.util.ArrayList`, but is written specifically for ints in order to reduce boxing and unboxing to Integers, reduce the memory required and improve performance of pack200.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntList()` Constructs a new instance of IntList with capacity for ten elements.
    `IntList(int capacity)` Constructs a new instance of IntList with the specified capacity.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(int object)` Adds the specified object at the end of this IntList.
    `void` | `add(int location, int object)`
    `void` | `addAll(IntList list)`
    `void` | `clear()`
    `int` | `get(int location)`
    `void` | `increment(int location)`
    `boolean` | `isEmpty()`
    `int` | `remove(int location)`
    `int` | `size()`
    `int[]` | `toArray()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IntList

          public IntList()

      Constructs a new instance of IntList with capacity for ten elements.

    - #### IntList

          public IntList(int capacity)

      Constructs a new instance of IntList with the specified capacity.
      Parameters:
        `capacity` - the initial capacity of this IntList

  - ### Method Detail

    - #### add

          public boolean add(int object)

      Adds the specified object at the end of this IntList.
      Parameters:
        `object` - the object to add
      Returns:
        true

    - #### add

          public void add(int location,
                          int object)

    - #### clear

          public void clear()

    - #### get

          public int get(int location)

    - #### increment

          public void increment(int location)

    - #### isEmpty

          public boolean isEmpty()

    - #### remove

          public int remove(int location)

    - #### size

          public int size()

    - #### toArray

          public int[] toArray()

    - #### addAll

          public void addAll(IntList list)

Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.