Class PointImpl

  • All Implemented Interfaces:
    Point, java.io.Serializable

    public class PointImpl
    extends java.lang.Object
    implements java.io.Serializable, Point
    The type Point.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PointImpl​(double x, double y)
      Instantiates a new Point.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getX()
      Gets the X coordinate of this point.
      double getY()
      Gets the Y coordinate of this point.
      static PointImpl parsePoint​(java.lang.String pair)
      parse point: example of point as String "1,1".
      void setX​(double x)
      Sets the X coordinate of this point.
      void setY​(double y)
      Sets the Y coordinate of this point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PointImpl

        public PointImpl​(double x,
                         double y)
        Instantiates a new Point.
        Parameters:
        x - the x
        y - the y
    • Method Detail

      • parsePoint

        public static PointImpl parsePoint​(java.lang.String pair)
        parse point: example of point as String "1,1". It accepts doubles.
        Parameters:
        pair -
        Returns:
        PointImpl
      • getX

        public double getX()
        Description copied from interface: Point

        Gets the X coordinate of this point.

        Gets the X coordinate of this point.

        Specified by:
        getX in interface Point
        Returns:
        X coordinate of this point
      • setX

        public void setX​(double x)
        Description copied from interface: Point

        Sets the X coordinate of this point.

        Sets the X coordinate of this point.

        Specified by:
        setX in interface Point
        Parameters:
        x - the X coordinate of this point
      • getY

        public double getY()
        Description copied from interface: Point

        Gets the Y coordinate of this point.

        Gets the Y coordinate of this point.

        Specified by:
        getY in interface Point
        Returns:
        the Y coordinate of this point
      • setY

        public void setY​(double y)
        Description copied from interface: Point

        Sets the Y coordinate of this point.

        Sets the Y coordinate of this point.

        Specified by:
        setY in interface Point
        Parameters:
        y - the Y coordinate of this point