org.placelab.client.tracker
Class CompoundEstimate

java.lang.Object
  extended byorg.placelab.client.tracker.CompoundEstimate
All Implemented Interfaces:
Estimate

public class CompoundEstimate
extends java.lang.Object
implements Estimate

CompoundEstimates are produced by CompoundTracker objects. They contain all the Estimate objects produced by the Trackers contained in the CompoundTracker.


Constructor Summary
CompoundEstimate(Estimate e)
          Typically, only the CompoundTracker will create CompoundEstimates
 
Method Summary
 void addEstimate(Estimate e)
          The CompoundTracker uses this to add Estimates.
 void construct(long timestamp, Coordinate position, java.lang.String stdDevString)
           
 Coordinate getCoord()
          Throws UnsupportedOperationException because CompoundEstimates don't have a position.
 java.util.Vector getEstimates()
          Get all the Estimate objects in this CompoundEstimate.
 java.lang.String getStdDevAsString()
          Throws UnsupportedOperationException because CompoundEstimates don't have a position.
 int getStdDevInMeters()
          Throws UnsupportedOperationException because CompoundEstimates don't have a position.
 long getTimestamp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundEstimate

public CompoundEstimate(Estimate e)
Typically, only the CompoundTracker will create CompoundEstimates

Method Detail

addEstimate

public void addEstimate(Estimate e)
The CompoundTracker uses this to add Estimates. This is not needed by consumers of the Estimate


getEstimates

public java.util.Vector getEstimates()
Get all the Estimate objects in this CompoundEstimate. The Estimates are returned in the order corresponding to the order in which the Trackers were added to the CompoundTracker. So, for instance, if you put a CentroidTracker and then a PositionTracker in the CompoundTracker, the CompoundEstimates produced would be a BeaconMeasurement and a PositionMeasurement, in that order.


getCoord

public Coordinate getCoord()
Throws UnsupportedOperationException because CompoundEstimates don't have a position. Instead, use getEstimates() and call getPosition on each Estimate returned.

Specified by:
getCoord in interface Estimate

getStdDevAsString

public java.lang.String getStdDevAsString()
Throws UnsupportedOperationException because CompoundEstimates don't have a position. Instead, use getEstimates() and call getStdDevAsString on each Estimate returned.

Specified by:
getStdDevAsString in interface Estimate

getStdDevInMeters

public int getStdDevInMeters()
Throws UnsupportedOperationException because CompoundEstimates don't have a position. Instead, use getEstimates() and call getStdDevInMeters on each Estimate returned.

Specified by:
getStdDevInMeters in interface Estimate

getTimestamp

public long getTimestamp()
Specified by:
getTimestamp in interface Estimate
Returns:
the time when this Estimate was computed

construct

public void construct(long timestamp,
                      Coordinate position,
                      java.lang.String stdDevString)
Specified by:
construct in interface Estimate