public abstract class Transformation extends Object
Constructor and Description |
---|
Transformation(String name)
Constructs a transformation with the given name.
|
Modifier and Type | Method and Description |
---|---|
abstract Point2D |
apply(Point2D p)
Apply the transformation to a point to produce a new point leaving the
original point unchanged.
|
String |
getName()
Get the name of the transformation.
|
String |
toString()
Get a string representation of the transformation.
|
abstract void |
transform(Point2D p)
Transform a point changing its coordinates.
|
public Transformation(String name)
name
- the name of the transformationpublic final String getName()
public String toString()
toString
in class Object
Object.toString()
public abstract void transform(Point2D p)
p
- the point to transform