public class GMLCoordinates
extends java.lang.Object
Constructor and Description |
---|
GMLCoordinates(double x,
double y)
Create a new GMLCoordinates object.
|
GMLCoordinates(GMLCoordinates other)
Copy constructor.
|
GMLCoordinates(java.lang.String s)
Create a new GMLCoordinates object from a String of the form "x,y".
|
Modifier and Type | Method and Description |
---|---|
double |
getX()
Get the X coordinate.
|
double |
getY()
Get the Y coordinate.
|
void |
setX(double newX)
Set the X coordinate.
|
void |
setY(double newY)
Set the Y coordinate.
|
java.lang.String |
toString() |
public GMLCoordinates(double x, double y)
x
- The X coordinate.y
- The Y coordinate.public GMLCoordinates(GMLCoordinates other)
other
- The GMLCoordinates to copy.public GMLCoordinates(java.lang.String s)
s
- The String to read.java.lang.IllegalArgumentException
- If the string is invalid.public double getX()
public double getY()
public void setX(double newX)
newX
- The new X coordinate.public void setY(double newY)
newY
- The new Y coordinate.public java.lang.String toString()
toString
in class java.lang.Object