public class IntList extends java.lang.Object
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 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.
|
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() |
public IntList()
public IntList(int capacity)
capacity
- the initial capacity of this IntListpublic boolean add(int object)
object
- the object to addpublic void add(int location, int object)
public void clear()
public int get(int location)
public void increment(int location)
public boolean isEmpty()
public int remove(int location)
public int size()
public int[] toArray()