toolbox
Class IntArray

java.lang.Object
  extended bytoolbox.IntArray

public class IntArray
extends java.lang.Object

A resizable array of integers (like a Vector for ints but faster)

Author:
Hendrik Dahlkamp

Field Summary
private  int capacityIncrement
           
private  int[] data
           
private  int elementCount
           
 
Constructor Summary
IntArray()
           
IntArray(int initialSize)
           
IntArray(int initialSize, int _capacityIncrement)
           
 
Method Summary
 void add(int value)
           
 void clear()
           
 boolean contains(int value)
           
 int elementAt(int index)
           
private  void ensureCapacityHelper(int minCapacity)
           
 int[] getElements()
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private int[] data

elementCount

private int elementCount

capacityIncrement

private int capacityIncrement
Constructor Detail

IntArray

public IntArray()

IntArray

public IntArray(int initialSize)

IntArray

public IntArray(int initialSize,
                int _capacityIncrement)
Method Detail

add

public void add(int value)

elementAt

public int elementAt(int index)

getElements

public int[] getElements()

ensureCapacityHelper

private void ensureCapacityHelper(int minCapacity)

contains

public boolean contains(int value)

clear

public void clear()

size

public int size()