JIDE 3.5.15

com.jidesoft.chart.util
Class Point2DPool

java.lang.Object
  extended by com.jidesoft.chart.util.Point2DPool

public class Point2DPool
extends Object

A Pool class that makes it possible to reuse instances of Point2D.Double. This specialized solution avoid the problems of additional object creation due to autoboxing in a more generic solution.


Method Summary
 Point2D borrow(double x, double y)
           
 void clear()
          Removes any available objects from the pool.
protected  Point2D create(double x, double y)
           
static Point2DPool instance()
           
 void replace(Point2D p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

protected Point2D create(double x,
                         double y)

borrow

public Point2D borrow(double x,
                      double y)

replace

public void replace(Point2D p)

clear

public void clear()
Removes any available objects from the pool. You probably don't need to call this, as the intention of pooling is to leave objects in the pool so that they can be reused.


instance

public static Point2DPool instance()

JIDE 3.5.15