Class CoordinateXY

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Coordinate>

    public class CoordinateXY
    extends Coordinate
    Coordinate subclass supporting XY ordinate.

    This data object is suitable for use with coordinate sequences dimension 3, measures 1. The Coordinate.Z field is visible, but intended to be ignored.

    Since:
    1.16
    See Also:
    Serialized Form
    • Constructor Detail

      • CoordinateXY

        public CoordinateXY()
        Default constructor
      • CoordinateXY

        public CoordinateXY​(double x,
                            double y)
      • CoordinateXY

        public CoordinateXY​(Coordinate coord)
    • Method Detail

      • getZ

        public double getZ()
        The z-ordinate is not supported
        Overrides:
        getZ in class Coordinate
      • setZ

        public void setZ​(double z)
        The z-ordinate is not supported
        Overrides:
        setZ in class Coordinate
      • setCoordinate

        public void setCoordinate​(Coordinate other)
        Description copied from class: Coordinate
        Sets this Coordinates (x,y,z) values to that of other.
        Overrides:
        setCoordinate in class Coordinate
        Parameters:
        other - the Coordinate to copy
      • getOrdinate

        public double getOrdinate​(int ordinateIndex)
        Description copied from class: Coordinate
        Gets the ordinate value for the given index. The base implementation supports values for the index are Coordinate.X, Coordinate.Y, and Coordinate.Z.
        Overrides:
        getOrdinate in class Coordinate
        Parameters:
        ordinateIndex - the ordinate index
        Returns:
        the value of the ordinate
      • setOrdinate

        public void setOrdinate​(int ordinateIndex,
                                double value)
        Description copied from class: Coordinate
        Sets the ordinate for the given index to a given value. The base implementation supported values for the index are Coordinate.X, Coordinate.Y, and Coordinate.Z.
        Overrides:
        setOrdinate in class Coordinate
        Parameters:
        ordinateIndex - the ordinate index
        value - the value to set
      • toString

        public java.lang.String toString()
        Description copied from class: Coordinate
        Returns a String of the form (x,y,z) .
        Overrides:
        toString in class Coordinate
        Returns:
        a String of the form (x,y,z)