org.jcon.data.performance
Class DynamicIntegerArray

java.lang.Object
  extended by org.jcon.data.performance.DynamicIntegerArray
Direct Known Subclasses:
IntegerStack

public class DynamicIntegerArray
extends java.lang.Object

A growable array of ints. Designed for performance, so watch your fingers - not guaranteed to zero out values if the array is grown via setSize; not guaranteed to behave if you mess directly with the size variable, etc. All the power is there if you need it, just don't shoot your foot off.


Field Summary
 int capacity
           
 int[] data
           
 int size
           
 
Constructor Summary
DynamicIntegerArray()
           
 
Method Summary
 void ensureCapacity(int newCapacity)
           
 void setSize(int newSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

public int size

capacity

public int capacity

data

public int[] data
Constructor Detail

DynamicIntegerArray

public DynamicIntegerArray()
Method Detail

ensureCapacity

public void ensureCapacity(int newCapacity)

setSize

public void setSize(int newSize)