cdx
Class ArrayListFactory

java.lang.Object
  extended by cdx.ArrayListFactory

public class ArrayListFactory
extends java.lang.Object

This class is used to pre-allocate ArrayLists in mission memory. The number of objects and the length of ArrayList are initilised in Construct.


Constructor Summary
ArrayListFactory(int size, int capacity)
          Constructor with the number of ArrayList and the length for each ArrayList.
 
Method Summary
 void clear()
          Clear the content of all ArrayLists.
 ArrayList getNewList()
          Return an ArrayList from the store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayListFactory

public ArrayListFactory(int size,
                        int capacity)
Constructor with the number of ArrayList and the length for each ArrayList.

Parameters:
size - the number of ArrayLists
capacity - the length of an ArrayList
Method Detail

getNewList

public ArrayList getNewList()
Return an ArrayList from the store. The system exists if exceeding the store capacity

Returns:
an ArrayList or null

clear

public void clear()
Clear the content of all ArrayLists.