Class Point


  • public class Point
    extends java.lang.Object
    Represents a Point on the screen.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      java.lang.String toString()  
      int x()
      get the x coordinate.
      int y()
      get the y coordinate.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Point

        public Point​(int x,
                     int y)
        Instantiates a new point.
        Parameters:
        x - the x coordinate
        y - the y coordinate
    • Method Detail

      • x

        public int x()
        get the x coordinate.
        Returns:
        the x coordinate
      • y

        public int y()
        get the y coordinate.
        Returns:
        the int
      • toString

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

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object