|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPoint
Point is an abstract class which can be used to store any dimensional system. A mathematical operation on a Point; add, multiply, and abs, can be performed using instance or static methods.
Constructor Summary | |
Point()
|
Method Summary | |
abstract void |
abs()
Instance method to calculate the absolute value of the Point, abstract and must be defined by any subclasses of Point. |
static Point |
abs(Point p)
Static method to calculate and return a new Point equal to the absolute value of the Point p. |
abstract void |
add(Point delta)
Instance method to add a Point to the current Point, abstract and must be defined by any subclasses of Point. |
static Point |
add(Point a,
Point b)
Static method to add two Points. |
static Point |
add(Point a,
Point b,
Point c)
Static method to add three Points. |
static Point |
add(Point a,
Point b,
Point c,
Point d)
Static method to add four Points. |
java.lang.Object |
clone()
Overrides the object.clone() method to enable Point cloning outside of Point package. |
abstract double |
coordinate(int i)
Instance method to return the coordinate of the Point at index i, abstract and must be defined by any subclasses of Point. |
abstract int |
dimension()
Instance method to return the dimension of the Point, abstract and must be defined by any subclasses of Point. |
abstract double |
max()
Method to return the maximum of the Point, abstract and must be defined by any subclasses of Point. |
abstract double |
min()
Method to return the minimum of the Point, abstract and must be defined by any subclasses of Point. |
abstract void |
multiply(double c)
Instance method to multiply the current Point by a double, abstract and must be defined by any subclasses of Point. |
static Point |
multiply(Point p,
double c)
Static method to multiply a Point by a double. |
abstract void |
round(int n)
Instance method to round the Point's accuracy to n decimal places, abstract and must be defined by any subclasses of Point. |
abstract java.lang.String |
toString()
Instance method to return the contents of the Point in human readable form, abstract and must be defined by any subclasses of Point. |
abstract void |
truncate(int n)
Instance method to truncate the Point's accuracy to n decimal places, abstract and must be defined by any subclasses of Point. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Point()
Method Detail |
public abstract int dimension()
public abstract double coordinate(int i)
public abstract void add(Point delta)
public abstract void multiply(double c)
public abstract double max()
public abstract double min()
public abstract void abs()
public abstract java.lang.String toString()
public abstract void truncate(int n)
public abstract void round(int n)
public java.lang.Object clone()
public static Point multiply(Point p, double c)
public static Point add(Point a, Point b)
public static Point add(Point a, Point b, Point c)
public static Point add(Point a, Point b, Point c, Point d)
public static Point abs(Point p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |