Class LocationObject

java.lang.Object
jadex.quickstart.cleanerworld.environment.impl.LocationObject
All Implemented Interfaces:
ILocationObject, Cloneable
Direct Known Subclasses:
Chargingstation, Cleaner, Pheromone, Waste, Wastebin

public abstract class LocationObject extends Object implements ILocationObject, Cloneable
Base class for all map objects.
  • Field Details

  • Constructor Details

    • LocationObject

      public LocationObject()
      Create a new LocationObject.
    • LocationObject

      public LocationObject(String id, Location location)
      Create a new LocationObject.
  • Method Details

    • getId

      public String getId()
      Get the id of this LocationObject.
      Specified by:
      getId in interface ILocationObject
      Returns:
      id
    • setId

      public void setId(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.
      Specified by:
      getLocation in interface ILocationObject
      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(Object o)
      Test if two instances are equal.
      Overrides:
      equals in class Object
      Returns:
      True, if equal.
    • hashCode

      public int hashCode()
      Get the hashcode for this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hashcode.
    • update

      public void update(LocationObject obj)
      Update this cleaner.
    • clone

      public LocationObject clone()
      Clone the object.
      Overrides:
      clone in class Object
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list. The listener is registered for all properties.
      Parameters:
      listener - The PropertyChangeListener to be added.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.
      Parameters:
      listener - The PropertyChangeListener to be removed.
    • getPropertyChangeHandler

      protected PropertyChangeSupport getPropertyChangeHandler()
      Get the property change handler for firing events.