|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.niffty.FinalPoint
This is an immutable version of Point where x and y cannot change. This is so that a class can give access to a point and know that other classes will not change it. To convert this to a Point which you can change, call newPoint.
newPoint()
Field Summary | |
int |
x
The x coordinate. |
int |
y
The y coordinate. |
Constructor Summary | |
FinalPoint(FinalPoint point,
int deltaX,
int deltaY)
Creates a new FinalPoint with the coordinates of point added to deltaX and deltaY. |
|
FinalPoint(int x,
int y)
Creates new FinalPoint with the given x and y. |
|
FinalPoint(java.awt.Point point)
Creates new FinalPoint from the given point. |
Method Summary | |
java.awt.Point |
newPoint()
This returns a new Point which you can modify with the same x and y as this. |
java.lang.String |
toString()
Return String of the form "(x,y)" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final int x
public final int y
Constructor Detail |
public FinalPoint(int x, int y)
public FinalPoint(java.awt.Point point)
public FinalPoint(FinalPoint point, int deltaX, int deltaY)
Method Detail |
public java.awt.Point newPoint()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |