cdx
Class MotionFactory

java.lang.Object
  extended by cdx.MotionFactory

public class MotionFactory
extends java.lang.Object

This class is used to pre-allocate Motion objects in mission memory.


Constructor Summary
MotionFactory(int size)
          Constructor
 
Method Summary
 void clear()
          Restore the index
 Motion getNewMotion()
          Return a pre-allocated instance of the Motionclass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotionFactory

public MotionFactory(int size)
Constructor

Parameters:
size - the capacity of this store
Method Detail

getNewMotion

public Motion getNewMotion()
Return a pre-allocated instance of the Motionclass. The program exits if exceeding the storage capacity


clear

public void clear()
Restore the index