com.bbn.openmap.time
Class TimeBounds
java.lang.Object
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
Constructor Summary |
TimeBounds()
Creates a TimeBounds object ready for times to be added to it. |
TimeBounds(long start,
long end)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
startTime
protected long startTime
endTime
protected long endTime
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)
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