Class Location


  • public class Location
    extends java.lang.Object
    Editable Java class for concept Location of hunterprey ontology.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int x
      The x-coordinate.
      protected int y
      The y-coordinate.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Test if two locations are equal.
      int getX()
      Get the x of this Location.
      int getY()
      Get the y of this Location.
      int hashCode()
      The hashcode is the 16 bit shifted x position plus the y position.
      void setX​(int x)
      Set the x of this Location.
      void setY​(int y)
      Set the y of this Location.
      • Methods inherited from class java.lang.Object

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

      • x

        protected int x
        The x-coordinate.
      • y

        protected int y
        The y-coordinate.
    • Constructor Detail

      • Location

        public Location()
        Create a new Location.
      • Location

        public Location​(int x,
                        int y)
        Create a new Location.
    • Method Detail

      • getX

        public int getX()
        Get the x of this Location. The x-coordinate.
        Returns:
        x
      • setX

        public void setX​(int x)
        Set the x of this Location. The x-coordinate.
        Parameters:
        x - the value to be set
      • getY

        public int getY()
        Get the y of this Location. The y-coordinate.
        Returns:
        y
      • setY

        public void setY​(int y)
        Set the y of this Location. The y-coordinate.
        Parameters:
        y - the value to be set
      • equals

        public boolean equals​(java.lang.Object o)
        Test if two locations are equal.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        The hashcode is the 16 bit shifted x position plus the y position.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hashcode.