|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mapquest.MQObject
com.mapquest.Point
Encapsulates X and Y coordinates.
| Field Summary | |
static int |
CLASS_ID
|
static java.lang.String |
CLASS_NAME
|
| Fields inherited from class com.mapquest.MQObject |
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION |
| Constructor Summary | |
Point()
Default constructor. |
|
Point(int nX,
int nY)
Constructor when it is desired to set the X and Y coordinates. |
|
Point(Point pt)
Copy constructor. |
|
| Method Summary | |
boolean |
equals(java.lang.Object otherObject)
Compares this object to the specified object. |
int |
getClassId()
Returns the numeric id of this class. |
java.lang.String |
getClassName()
Returns the text name of this class. |
int |
getX()
Returns the X value of this point. |
int |
getY()
Returns the Y value of this point. |
int |
hashCode()
Returns a hash code for this Point. |
void |
init()
Initializes object. |
void |
setX(int sX)
Sets only the X value. |
void |
setXY(int nX,
int nY)
Sets the horizontal and vertical coordinates to the values passed in. |
void |
setY(int sY)
Sets only the Y value. |
boolean |
valid()
Returns a true if both the X and Y coordinates are set to a value other than the static "INVALID" value. |
| Methods inherited from class com.mapquest.MQObject |
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int CLASS_ID
public static final java.lang.String CLASS_NAME
| Constructor Detail |
public Point()
public Point(int nX,
int nY)
nX - The X coordinate of the point.nY - The Y coordinate of the point.public Point(Point pt)
pt - The Point object which is to be copied to this
Point object.| Method Detail |
public void init()
init in class MQObjectpublic int getClassId()
getClassId in class MQObjectpublic java.lang.String getClassName()
getClassName in class MQObject
public void setXY(int nX,
int nY)
nX - The X coordinate.nY - The Y coordinate.public void setX(int sX)
sX - The X value to which the point is to be set.public void setY(int sY)
sY - The Y value to which the point is to be set.public int getX()
public int getY()
public boolean valid()
true if both the X and Y
coordinates are not equal to the static "INVALID",
false otherwise.public boolean equals(java.lang.Object otherObject)
equals in class MQObjectotherObject - the object to compare this Point against.
public int hashCode()
hashCode in class MQObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||