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 doubleDistance, when two locations are considered near. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone the object.booleanTest if two instances are equal.doublegetDistance(ILocation other) Caculate is a location is near this location.doublegetX()Get the x of this Location.doublegetY()Get the y of this Location.inthashCode()Get the hashcode.booleanCheck, if two locations are near to each other using the default tolerance.booleanCheck, if two locations are near to each other.voidsetX(double x) Set the x of this Location.voidsetY(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:
getDistancein 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.
-