com.jidesoft.chart.util
Class Point2DPool
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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()