Jadex 0.96

jadex.examples.cleanerworld.multi
Class Location

java.lang.Object
  extended by jadex.examples.cleanerworld.multi.LocationData
      extended by jadex.examples.cleanerworld.multi.Location
All Implemented Interfaces:
Serializable, Cloneable, nuggets.INugget

public class Location
extends LocationData
implements Cloneable

Editable Java class for concept Location of cleaner-generated ontology.

See Also:
Serialized Form

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
 Object clone()
          Clone the object.
 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.
 
Methods inherited from class jadex.examples.cleanerworld.multi.LocationData
_persist, _set, getX, getY, setX, setY, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TOLERANCE

public static final double DEFAULT_TOLERANCE
Distance, when two locations are considered near.

See Also:
Constant Field Values
Constructor Detail

Location

public Location()
Create a new Location.


Location

public Location(double x,
                double y)
Create a new Location.

Method Detail

getDistance

public double getDistance(Location other)
Caculate is a location is near this location.

Returns:
The distance.

isNear

public boolean isNear(Location other)
Check, if two locations are near to each other using the default tolerance.

Returns:
True, if two locations are near to each other.

isNear

public boolean isNear(Location other,
                      double tolerance)
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

public boolean equals(Object o)
Test if two instances are equal.

Overrides:
equals in class Object
Returns:
True, if equal.

clone

public Object clone()
Clone the object.

Overrides:
clone in class Object

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.