Class Location


  • public class Location
    extends java.lang.Object
    A location on the map.
    • Constructor Summary

      Constructors 
      Constructor Description
      Location​(int x, int y, int layer)
      Creates a new location.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(@Nullable java.lang.Object obj)  
      int getLayer()
      Returns the layer.
      int getX()
      Returns the x-coordinate.
      int getY()
      Returns the y-coordinate.
      int hashCode()  
      @NotNull java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Location

        public Location​(int x,
                        int y,
                        int layer)
        Creates a new location.
        Parameters:
        x - the x-coordinate
        y - the y-coordinate
        layer - the layer
    • Method Detail

      • getX

        public int getX()
        Returns the x-coordinate.
        Returns:
        the x-coordinate
      • getY

        public int getY()
        Returns the y-coordinate.
        Returns:
        the y-coordinate
      • getLayer

        public int getLayer()
        Returns the layer.
        Returns:
        the layer
      • 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