Class Point


  • public class Point
    extends java.lang.Object
    Represents a point on the 2D plane.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      float x  
      float y  
    • Constructor Summary

      Constructors 
      Constructor Description
      Point()
      Default constructor.
      Point​(float x, float y)
      Constructor.
      Point​(@NotNull Point other)
      Copy constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(@Nullable java.lang.Object obj)  
      int hashCode()  
      @NotNull java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • x

        public float x
      • y

        public float y
    • Constructor Detail

      • Point

        public Point​(float x,
                     float y)
        Constructor.
        Parameters:
        x - the x coordinate of the point.
        y - the y coordinate of the point.
      • Point

        public Point​(@NotNull
                     @NotNull Point other)
        Copy constructor.
        Parameters:
        other - copied object.
      • Point

        public Point()
        Default constructor.
    • Method Detail

      • equals

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

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

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