oracle.sdoapi.geom
Class CoordPointImpl

java.lang.Object
  |
  +--oracle.sdoapi.geom.CoordPointImpl
All Implemented Interfaces:
java.lang.Cloneable, CoordPoint, java.io.Serializable

public class CoordPointImpl
extends java.lang.Object
implements CoordPoint

CoordPointImpl is a helper class that represents a coordinate point. A coordinate point is not a geometric entity, but it is a conceptual part of a non-point geometric object such as a line string.

Unlike a geometric point that contains additional information (like spatial reference system ID), a coordinate point only contains x, y, z coordinates for us to define geometry access/operation interfaces upon.

See Also:
Serialized Form

Field Summary
 double m_x
          m_x, m_y, and m_z represent the x, y, z coordinates of this coordinate point, and these are the only attributes that this point object has.
 double m_y
          m_x, m_y, and m_z represent the x, y, z coordinates of this coordinate point, and these are the only attributes that this point object has.
 double m_z
          m_x, m_y, and m_z represent the x, y, z coordinates of this coordinate point, and these are the only attributes that this point object has.
 
Constructor Summary
CoordPointImpl()
          Constructs a default coordinate point.
CoordPointImpl(CoordPoint point)
          Copy constructor.
CoordPointImpl(double x, double y)
          Constructs a coordinate point at (x, y, NaN).
CoordPointImpl(double x, double y, double z)
          Constructs a coordinate point at (x, y, z).
CoordPointImpl(Point point)
          Constructs a coordinate point at the given geometric point.
 
Method Summary
 java.lang.Object clone()
          Clones this coordinate point to generate another coordinate point object.
 boolean equals(CoordPoint point)
          Determines if this coordinate point is equal to the input coordinate point.
 double getOrd(int i)
          Gets the i-th ordinate of this coordinate point.
 double getX()
          Gets the x coordinate of this point.
 double getY()
          Gets the y coordinate of this point.
 double getZ()
          Gets the z coordinate of this point.
 void move(CoordPoint offsetPoint)
          Moves this coordinate point according to the input offsets.
 void move(double offsetX, double offsetY)
          Moves this coordinate point according to the input offsets.
 void move(double offsetX, double offsetY, double offsetZ)
          Moves this coordinate point according to the input offsets.
 void setCoord()
          Sets this coordinate point to (Double.NaN, Double.NaN, Double.NaN).
 void setCoord(CoordPoint point)
          Sets this coordinate point to the location of another coordinate point.
 void setCoord(double x, double y)
          Sets this coordinate point to (x, y, Double.NaN).
 void setCoord(double x, double y, double z)
          Sets this coordinate point to (x, y, z).
 void setCoord(Point point)
          Sets this coordinate point to the location of a geometric point.
 void setOrd(double ord, int i)
          Sets the i-th ordinate of this coordinate point.
 void setX(double x)
          Sets the x coordinate for this point.
 void setY(double y)
          Sets the y coordinate for this point.
 void setZ(double z)
          Sets the z coordinate for this point.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_x

public double m_x
m_x, m_y, and m_z represent the x, y, z coordinates of this coordinate point, and these are the only attributes that this point object has.

m_y

public double m_y
m_x, m_y, and m_z represent the x, y, z coordinates of this coordinate point, and these are the only attributes that this point object has.

m_z

public double m_z
m_x, m_y, and m_z represent the x, y, z coordinates of this coordinate point, and these are the only attributes that this point object has.
Constructor Detail

CoordPointImpl

public CoordPointImpl()
Constructs a default coordinate point.

CoordPointImpl

public CoordPointImpl(double x,
                      double y)
Constructs a coordinate point at (x, y, NaN).
Parameters:
x - x coordinate of the coordinate point
y - y coordinate of the coordinate point

CoordPointImpl

public CoordPointImpl(double x,
                      double y,
                      double z)
Constructs a coordinate point at (x, y, z).
Parameters:
x - x coordinate of the coordinate point
y - y coordinate of the coordinate point
z - z coordinate of the coordinate point

CoordPointImpl

public CoordPointImpl(CoordPoint point)
Copy constructor.

CoordPointImpl

public CoordPointImpl(Point point)
Constructs a coordinate point at the given geometric point.
Method Detail

getX

public final double getX()
Gets the x coordinate of this point.
Specified by:
getX in interface CoordPoint
Returns:
the x coordinate of this point

getY

public final double getY()
Gets the y coordinate of this point.
Specified by:
getY in interface CoordPoint
Returns:
the y coordinate of this point

getZ

public final double getZ()
Gets the z coordinate of this point.
Specified by:
getZ in interface CoordPoint
Returns:
the z coordinate of this point

getOrd

public final double getOrd(int i)
Gets the i-th ordinate of this coordinate point. This is a generic method that supports higher dimensional (higher than 3-D) data.
Specified by:
getOrd in interface CoordPoint
Parameters:
i - the 0-based index of the ordinates. For example, i = 0 means the first dimension (or x by convention), etc.
Returns:
the i-th coordinate of this coordinate point, or Double.NaN if the i-th ordinate is not available

setX

public final void setX(double x)
Sets the x coordinate for this point.
Specified by:
setX in interface CoordPoint
Parameters:
x - the new x coordinate of this point

setY

public final void setY(double y)
Sets the y coordinate for this point.
Specified by:
setY in interface CoordPoint
Parameters:
y - the new y coordinate of this point

setZ

public final void setZ(double z)
Sets the z coordinate for this point.
Specified by:
setZ in interface CoordPoint
Parameters:
z - the new z coordinate of this point

setOrd

public final void setOrd(double ord,
                         int i)
Sets the i-th ordinate of this coordinate point. This is a generic method that supports higher dimensional (higher than 3-D) data
Specified by:
setOrd in interface CoordPoint
Parameters:
ord - the new value of the i-th ordinate of this coordinate point
i - the 0-based index of the ordinates. For example, i = 0 means the first dimension (or x by convention), etc.

setCoord

public final void setCoord()
Sets this coordinate point to (Double.NaN, Double.NaN, Double.NaN).
Specified by:
setCoord in interface CoordPoint

setCoord

public final void setCoord(double x,
                           double y)
Sets this coordinate point to (x, y, Double.NaN).
Specified by:
setCoord in interface CoordPoint
Parameters:
x - x coordinate of the coordinate point
y - y coordinate of the coordinate point

setCoord

public final void setCoord(double x,
                           double y,
                           double z)
Sets this coordinate point to (x, y, z).
Specified by:
setCoord in interface CoordPoint
Parameters:
x - x coordinate of the coordinate point
y - y coordinate of the coordinate point
z - z coordinate of the coordinate point

setCoord

public final void setCoord(CoordPoint point)
Sets this coordinate point to the location of another coordinate point.
Specified by:
setCoord in interface CoordPoint

setCoord

public final void setCoord(Point point)
Sets this coordinate point to the location of a geometric point.
Specified by:
setCoord in interface CoordPoint

move

public final void move(double offsetX,
                       double offsetY)
Moves this coordinate point according to the input offsets.
Specified by:
move in interface CoordPoint
Parameters:
offsetX - offset along the x direction
offsetY - offset along the y direction

move

public final void move(double offsetX,
                       double offsetY,
                       double offsetZ)
Moves this coordinate point according to the input offsets.
Specified by:
move in interface CoordPoint
Parameters:
offsetX - offset along the x direction
offsetY - offset along the y direction
offsetZ - offset along the z direction

move

public final void move(CoordPoint offsetPoint)
Moves this coordinate point according to the input offsets.
Specified by:
move in interface CoordPoint
Parameters:
offsetPoint - the coordinate point that contains offset values

equals

public final boolean equals(CoordPoint point)
Determines if this coordinate point is equal to the input coordinate point.
Specified by:
equals in interface CoordPoint
Parameters:
point - the input coordinate point
Returns:
true if this point has the same coordinates as the input point; false otherwise

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
Description copied from interface: CoordPoint
Clones this coordinate point to generate another coordinate point object.
Specified by:
clone in interface CoordPoint
Overrides:
clone in class java.lang.Object
Following copied from interface: oracle.sdoapi.geom.CoordPoint
Returns:
a coordinate point object with the same content as in this coordinate point

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object