Class LocationObject
- java.lang.Object
-
- jadex.bdi.examples.marsworld_classic.LocationObject
-
- All Implemented Interfaces:
java.io.Serializable
public class LocationObject extends java.lang.Object implements java.io.Serializable
An object with a location.- See Also:
- Serialized Form
-
-
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.
-
-
-
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 classjava.lang.Object
- Returns:
- True, if equal.
-
hashCode
public int hashCode()
Get the hashcode.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-