uwcse.location.core
Class ProximityMeasurement

java.lang.Object
  |
  +--uwcse.location.core.Measurement
        |
        +--uwcse.location.core.ProximityMeasurement

public class ProximityMeasurement
extends Measurement

The ProximityMeasurement class represents a sensor reading of two objects which are nearby one another based on the limited range of a physical phenomenon (e.g. reception of an infrared emission).

Version:
$Revision: 1.3 $
Author:
Jeffrey Hightower

Nested Class Summary
 
Nested classes inherited from class uwcse.location.core.Measurement
Measurement.TimestampComparator
 
Field Summary
protected  boolean m_isProximal
           
 
Fields inherited from class uwcse.location.core.Measurement
m_objectName, m_sensorName, m_timestamp
 
Constructor Summary
ProximityMeasurement()
          Create a ProximityMeasurement
ProximityMeasurement(String objectName, String sensorName)
          Create a proximity measurement for two proximal objects.
ProximityMeasurement(String objectName, String sensorName, boolean isProximal)
          Create a proximity measurement.
ProximityMeasurement(ProximityMeasurement pm)
          Creates a proximity measurement as a copy of the given one.
 
Method Summary
 Object clone()
          Create a deep copy of this CompassMeasurement.
 boolean equals(Object o)
          Test this object for semantic equality with another ProximityMeasurement.
 boolean isProximal()
          Returns true if this measurement indicates a valid proximity.
 String toString()
          Return a string representation of this ProximityMeasurement.
 
Methods inherited from class uwcse.location.core.Measurement
getObjectName, getSensorName, getTimestamp, hashCode, setObjectName, setSensorName, setTimestamp
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_isProximal

protected boolean m_isProximal
Constructor Detail

ProximityMeasurement

public ProximityMeasurement()
Create a ProximityMeasurement


ProximityMeasurement

public ProximityMeasurement(String objectName,
                            String sensorName)
Create a proximity measurement for two proximal objects.


ProximityMeasurement

public ProximityMeasurement(ProximityMeasurement pm)
Creates a proximity measurement as a copy of the given one.


ProximityMeasurement

public ProximityMeasurement(String objectName,
                            String sensorName,
                            boolean isProximal)
Create a proximity measurement.

Parameters:
isProximal - A boolean indicating valid proximity. Usually this should be set true unless this measurement's purpose is specifically to indicate that two objects are not proximal.
Method Detail

equals

public boolean equals(Object o)
Test this object for semantic equality with another ProximityMeasurement.

Overrides:
equals in class Measurement
Returns:
true if the object name, sensor name, and timestamp of both both Measurements are the same.

toString

public String toString()
Return a string representation of this ProximityMeasurement.

Overrides:
toString in class Measurement

clone

public Object clone()
Create a deep copy of this CompassMeasurement.

Overrides:
clone in class Measurement

isProximal

public boolean isProximal()
Returns true if this measurement indicates a valid proximity. Usually this will always be true unless this measurement's purpose is specifically to indicate that two objects are not proximal.



This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/

© Copyright 2004 University of Washington CSE