org.onebusaway.transit_data_federation.model
Class TargetTime

java.lang.Object
  extended by org.onebusaway.transit_data_federation.model.TargetTime
All Implemented Interfaces:
Serializable

public final class TargetTime
extends Object
implements Serializable

Typically, when it comes to real-time information, you want to query the system right now. However, to assist with debugging, we make it possible to specify what time 'now' actually is. This makes it easier to replay real-time information from the past and query the state of the system at that time. Thus, we have two times: currentTime - the definition of now targetTime - the time you want to query a particular value For example, if I want to know where a bus will be five minutes from now, my currentTime really will be now and my targetTime will be +5 minutes. By the same token, if I'm pretending it's 1am on Oct 12th and I want to know where the bus will be in five minutes, currentTime will be Oct 12th 1am and targetTime will be Oct 12th 1:05 am.

Author:
bdferris
See Also:
Serialized Form

Constructor Summary
TargetTime()
           
TargetTime(long targetTime)
           
TargetTime(long targetTime, long currentTime)
           
 
Method Summary
 boolean equals(Object obj)
           
 long getCurrentTime()
           
 long getTargetTime()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetTime

public TargetTime()

TargetTime

public TargetTime(long targetTime)

TargetTime

public TargetTime(long targetTime,
                  long currentTime)
Method Detail

getCurrentTime

public long getCurrentTime()

getTargetTime

public long getTargetTime()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012 OneBusAway. All Rights Reserved.