com.bbn.openmap.time
Class TimeBounds

java.lang.Object
  extended by com.bbn.openmap.time.TimeBounds
All Implemented Interfaces:
java.io.Serializable

public class TimeBounds
extends java.lang.Object
implements java.io.Serializable

A class for holding a range of times.

See Also:
Serialized Form

Field Summary
protected  long endTime
           
protected  long startTime
           
 
Constructor Summary
TimeBounds()
          Creates a TimeBounds object ready for times to be added to it.
TimeBounds(long start, long end)
           
 
Method Summary
 void addTimeToBounds(long timeStamp)
          Add a time to the bounds, resetting the start and end time as necessary.
 void addTimeToBounds(TimeBounds timeBounds)
          Add the start and end times of provided TimeBounds to this TimeBounds.
 boolean equals(java.lang.Object obj)
           
 long getEndTime()
           
 long getStartTime()
           
 int hashCode()
           
 boolean isUnset()
           
 void reset()
           
 void setTimes(long start, long end)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

startTime

protected long startTime

endTime

protected long endTime
Constructor Detail

TimeBounds

public TimeBounds()
Creates a TimeBounds object ready for times to be added to it. The starting time is set to Long.MAX_VALUE, the end time is set to Long.MIN_VALUE, so any time addition will cause start and end times to be replaced.


TimeBounds

public TimeBounds(long start,
                  long end)
Method Detail

setTimes

public void setTimes(long start,
                     long end)

getStartTime

public long getStartTime()

getEndTime

public long getEndTime()

reset

public void reset()

addTimeToBounds

public void addTimeToBounds(long timeStamp)
Add a time to the bounds, resetting the start and end time as necessary.

Parameters:
timeStamp - in milliseconds

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addTimeToBounds

public void addTimeToBounds(TimeBounds timeBounds)
Add the start and end times of provided TimeBounds to this TimeBounds.

Parameters:
timeBounds -

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

isUnset

public boolean isUnset()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details