public abstract class AbstractXyTransform extends java.lang.Object implements XyTransform, Immutable
Example:
public class MyScalingTransform extends AbstractXyTransform {
private int scale;
public boolean isIdentity() {
return scale != 1.0;
}
protected XyPoint transformImp(XyPoint point) {
return XyPoint.times(scale);
}
}
Copyright 2007 Partner Software, Inc.
@author Paul Reavis
@author Rich Stepanski
@author Richard Fay
@version $Id$
| Constructor and Description |
|---|
AbstractXyTransform() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<XyPoint> |
transform(java.util.List<XyPoint> points)
Transform a list of XyPoints.
|
XyPoint[] |
transform(XyPoint... points)
Transform an array of XyPoints.
|
XyPoint |
transform(XyPoint point)
Transform a single (x, y) point.
|
protected abstract XyPoint |
transformImp(XyPoint point)
Subclasses must implement this to do the actual work of transformation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisIdentityprotected abstract XyPoint transformImp(XyPoint point)
transform(XyPoint), except that you
do NOT have to check for identity - that will be done automatically.public XyPoint transform(XyPoint point)
XyTransformtransform in interface XyTransformpoint - point to transform.public XyPoint[] transform(XyPoint... points)
XyTransformtransform in interface XyTransformpoints - points to transform.public java.util.List<XyPoint> transform(java.util.List<XyPoint> points)
XyTransformtransform in interface XyTransformpoints - points to transform.