org.openmali.vecmath2.pools
Class Point2dPool

java.lang.Object
  extended by org.openmali.pooling.ObjectPool<Point2d>
      extended by org.openmali.vecmath2.pools.Point2dPool

public class Point2dPool
extends ObjectPool<Point2d>

An instance pool for Point2d instances.


Constructor Summary
Point2dPool(int initialSize)
           
 
Method Summary
 Point2d alloc()
          
 Point2d alloc(double x, double y)
           
protected  Point2d 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

Point2dPool

public Point2dPool(int initialSize)
Method Detail

newInstance

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

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

alloc

public Point2d alloc()

Overrides:
alloc in class ObjectPool<Point2d>

alloc

public Point2d alloc(double x,
                     double y)