Package com.apama.jmon
Class Location
- java.lang.Object
-
- com.apama.jmon.Event
-
- com.apama.jmon.Location
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class Location extends Event implements java.lang.Cloneable
The Location class provides a Java representation of the MonitorScript location type. It defines a rectangular region by specifying the coordinates of two diagonally opposite corners.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()booleanequals(java.lang.Object obj)Override Object.equals() to check equality based upon the field values of the instance.Locationexpand(double distance)Returns a new Location with the dimensions of this Location expanded by the given distance in each direction (4 directions).inthashCode()Override Object.hashCode() to provide a hash code that is based upon the field values of the instance.java.lang.StringtoString()Override Object.toString() to provide output compatible with the Apama standard representation of location.-
Methods inherited from class com.apama.jmon.Event
emit, emit, enqueue, enqueueTo, enqueueTo, enqueueTo, getFieldAttributes, getMapFieldTypes, getName, getName, getTime, isExternal, route
-
-
-
-
Constructor Detail
-
Location
public Location()
Default constructor - creates a point location at [0,0]. Simply calls this(0.0, 0.0, 0.0, 0.0)
-
Location
public Location(double x1, double y1, double x2, double y2)Full argument constructor to create a rectangular region. To create a point (region with zero area), simply specify parameters where x1==x2 and y1==y2.
-
-
Method Detail
-
expand
public Location expand(double distance)
Returns a new Location with the dimensions of this Location expanded by the given distance in each direction (4 directions).- Parameters:
distance- The distance to expand by in each direction.- Returns:
- A new Location instance expanded as specified.
-
toString
public java.lang.String toString()
Override Object.toString() to provide output compatible with the Apama standard representation of location.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:EventOverride Object.equals() to check equality based upon the field values of the instance.
-
-