it.cutruzzula.lwkt.geometry
Class Point

java.lang.Object
  extended by it.cutruzzula.lwkt.geometry.AbstractGeometry
      extended by it.cutruzzula.lwkt.geometry.Point

public class Point
extends AbstractGeometry

The class represents a POINT object.


Constructor Summary
Point(double x, double y)
          Constructor for 2D point.
Point(double x, double y, double z)
          Constructor for 3D point.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getType()
          Method to get the geometry type.
 double getX()
          Method to get the x coordinate.
 double getY()
          Method to get the y coordinate.
 double getZ()
          Method to get the z dimension.
 
Methods inherited from class it.cutruzzula.lwkt.geometry.AbstractGeometry
getDimensions
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Point

public Point(double x,
             double y)
Constructor for 2D point.

Parameters:
x - The x coordinate
y - The y coordinate

Point

public Point(double x,
             double y,
             double z)
Constructor for 3D point.

Parameters:
x - The x coordinate
y - The y coordinate
z - The z dimension
Method Detail

getX

public double getX()
Method to get the x coordinate.

Returns:
The x coordinate

getY

public double getY()
Method to get the y coordinate.

Returns:
The y coordinate

getZ

public double getZ()
Method to get the z dimension.

Returns:
The z dimension

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getType

public java.lang.String getType()
Method to get the geometry type.

Specified by:
getType in class AbstractGeometry
Returns:
"POINT" constant