com.threed.jpct
Class IntList

java.lang.Object
  extended by com.threed.jpct.IntList

public class IntList
extends java.lang.Object

A simple list that stores ints.


Constructor Summary
IntList()
           
 
Method Summary
 void add(int i)
          Adds an int to the list.
 void clear()
          Clears the list.
 void compact()
          Truncates unused parts from the internal storage list, so that the resulting list doesn't require more memory than it has to.
 int get(int pos)
          Gets the list's value at a position.
 int size()
          Returns the size of the list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntList

public IntList()
Method Detail

add

public void add(int i)
Adds an int to the list.

Parameters:
i - the int

clear

public void clear()
Clears the list.


get

public int get(int pos)
Gets the list's value at a position.

Parameters:
pos - the position
Returns:
the value

size

public int size()
Returns the size of the list.

Returns:
the size

compact

public void compact()
Truncates unused parts from the internal storage list, so that the resulting list doesn't require more memory than it has to. However, calling this method will cause a little memory usage peak.