Class Location
java.lang.Object
jadex.quickstart.cleanerworld.environment.impl.Location
Editable Java class for concept Location of cleaner-generated ontology.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Distance, when two locations are considered near. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone the object.boolean
Test if two instances are equal.double
getDistance
(ILocation other) Caculate is a location is near this location.double
getX()
Get the x of this Location.double
getY()
Get the y of this Location.int
hashCode()
Get the hashcode.boolean
Check, if two locations are near to each other using the default tolerance.boolean
Check, if two locations are near to each other.void
setX
(double x) Set the x of this Location.void
setY
(double y) Set the y of this Location.toString()
Get a string representation of this Location.
-
Field Details
-
DEFAULT_TOLERANCE
public static final double DEFAULT_TOLERANCEDistance, when two locations are considered near.- See Also:
-
-
Constructor Details
-
Location
public Location()Create a new Location. -
Location
public Location(double x, double y) Create a new Location.
-
-
Method Details
-
getX
public double getX()Get the x of this Location. The x-coordinate. -
setX
public void setX(double x) Set the x of this Location. The x-coordinate.- Parameters:
x
- the value to be set
-
getY
public double getY()Get the y of this Location. The y-coordinate. -
setY
public void setY(double y) Set the y of this Location. The y-coordinate.- Parameters:
y
- the value to be set
-
toString
Get a string representation of this Location. -
getDistance
Caculate is a location is near this location.- Specified by:
getDistance
in interfaceILocation
- Returns:
- The distance.
-
isNear
Check, if two locations are near to each other using the default tolerance. -
isNear
Check, if two locations are near to each other.- Parameters:
tolerance
- The distance, when two locations are considered near.- Returns:
- True, if two locations are near to each other.
-
equals
Test if two instances are equal. -
hashCode
public int hashCode()Get the hashcode. -
clone
Clone the object.
-