|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.examples.marsworld.LocationData
jadex.examples.marsworld.Location
public class Location
This class represents a location in the environment.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface nuggets.INugget |
---|
nuggets.INugget.Helper |
Field Summary | |
---|---|
static double |
DEFAULT_TOLERANCE
Distance, when two locations are considered near. |
Constructor Summary | |
---|---|
Location()
Create a new location. |
|
Location(double x,
double y)
Create a new location. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Test if two instances are equal. |
double |
getDistance(Location other)
Caculate is a location is near this location. |
boolean |
isNear(Location other)
Check, if two locations are near to each other using the default tolerance. |
boolean |
isNear(Location other,
double tolerance)
Check, if two locations are near to each other. |
String |
toString()
Convert the location to a string representation. |
Methods inherited from class jadex.examples.marsworld.LocationData |
---|
_persist, _set, getX, getY, setX, setY |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface nuggets.INugget |
---|
_persist, _set |
Field Detail |
---|
public static final double DEFAULT_TOLERANCE
Constructor Detail |
---|
public Location()
public Location(double x, double y)
x
- The x coordinate.y
- The y coordinate.Method Detail |
---|
public double getDistance(Location other)
public boolean isNear(Location other)
public boolean isNear(Location other, double tolerance)
tolerance
- The distance, when two locations are considered near.
public String toString()
toString
in class LocationData
public boolean equals(Object o)
equals
in class Object
|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.