Class LocationObject

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    Homebase, Target

    public class LocationObject
    extends java.lang.Object
    implements java.io.Serializable
    An object with a location.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String id
      Attribute for slot id.
      protected Location location
      The location of the object.
    • Constructor Summary

      Constructors 
      Constructor Description
      LocationObject()
      Create a new location object.
      LocationObject​(java.lang.String id, Location location)
      Create a new location object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Test if two instances are equal.
      java.lang.String getId()
      Get the id of this LocationObject.
      Location getLocation()
      Get the location of this LocationObject.
      int hashCode()
      Get the hashcode.
      void setId​(java.lang.String id)
      Set the id of this LocationObject.
      void setLocation​(Location location)
      Set the location of this LocationObject.
      java.lang.String toString()
      Get the string representation.
      • Methods inherited from class java.lang.Object

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

      • id

        protected java.lang.String id
        Attribute for slot id.
      • location

        protected Location location
        The location of the object.
    • Constructor Detail

      • LocationObject

        public LocationObject()
        Create a new location object. Empty bean contructor.
      • LocationObject

        public LocationObject​(java.lang.String id,
                              Location location)
        Create a new location object.
        Parameters:
        id - The id.
        location - The location.
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the id of this LocationObject.
        Returns:
        id
      • setId

        public void setId​(java.lang.String id)
        Set the id of this LocationObject.
        Parameters:
        id - the value to be set
      • getLocation

        public Location getLocation()
        Get the location of this LocationObject. The location of the object.
        Returns:
        location
      • setLocation

        public void setLocation​(Location location)
        Set the location of this LocationObject. The location of the object.
        Parameters:
        location - the value to be set
      • equals

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

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

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.