|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.Point2D
rle.core.board.RLPoint
public final class RLPoint
Immutable object for specifying single locations on the Board.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
---|
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Field Summary | |
---|---|
int |
x
The immutable x coordinate. |
int |
y
The immutable y coordinate. |
Constructor Summary | |
---|---|
RLPoint(int x,
int y)
|
Method Summary | |
---|---|
static RLPoint |
add(RLPoint p1,
RLPoint p2)
Return an RLPoint representing the sums of x and y's in p1 and p2. |
double |
distance(RLPoint p)
Return the distance to another point. |
boolean |
equals(java.lang.Object o)
|
double |
getX()
Returns the X coordinate of this Point2D in
double precision. |
double |
getY()
Returns the Y coordinate of this Point2D in
double precision. |
int |
hashCode()
|
static RLPoint |
point(int x,
int y)
Returns an RLPoint which may be from a cache. |
void |
setLocation(double x,
double y)
Throws an exception, because RLPoints are immutable. |
static RLPoint |
subtract(RLPoint p1,
RLPoint p2)
Return an RLPoint representing the difference of x and y's in p1 and p2. |
java.lang.String |
toString()
|
Methods inherited from class java.awt.geom.Point2D |
---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, setLocation |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int x
public final int y
Constructor Detail |
---|
public RLPoint(int x, int y)
Method Detail |
---|
public static RLPoint point(int x, int y)
public static RLPoint add(RLPoint p1, RLPoint p2)
public static RLPoint subtract(RLPoint p1, RLPoint p2)
public double distance(RLPoint p)
public double getX()
Point2D
in
double
precision.
getX
in class java.awt.geom.Point2D
Point2D
.public double getY()
Point2D
in
double
precision.
getY
in class java.awt.geom.Point2D
Point2D
.public boolean equals(java.lang.Object o)
equals
in class java.awt.geom.Point2D
public int hashCode()
hashCode
in class java.awt.geom.Point2D
public void setLocation(double x, double y)
setLocation
in class java.awt.geom.Point2D
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |