org.openmali.vecmath2.pools
Class Vector2dPool

java.lang.Object
  extended by org.openmali.pooling.ObjectPool<Vector2d>
      extended by org.openmali.vecmath2.pools.Vector2dPool

public class Vector2dPool
extends ObjectPool<Vector2d>

An instance pool for Vector2d instances.


Constructor Summary
Vector2dPool(int initialSize)
           
 
Method Summary
 Vector2d alloc()
          
 Vector2d alloc(double x, double y)
           
protected  Vector2d newInstance()
          Creates a new instance of a pooled object.
 
Methods inherited from class org.openmali.pooling.ObjectPool
free, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vector2dPool

public Vector2dPool(int initialSize)
Method Detail

newInstance

protected Vector2d newInstance()
Creates a new instance of a pooled object.

Specified by:
newInstance in class ObjectPool<Vector2d>
Returns:
the new object instance

alloc

public Vector2d alloc()

Overrides:
alloc in class ObjectPool<Vector2d>

alloc

public Vector2d alloc(double x,
                      double y)