| org.cougaar.util.TimeSpan
All known Subclasses: org.cougaar.glm.ldm.oplan.TimeSpan, org.cougaar.mlm.ui.data.UIQuantityScheduleElement, org.cougaar.logistics.ui.inventory.data.InventoryScheduleElement,
TimeSpan | public interface TimeSpan (Code) | | An abstraction of an object which starts at a known point
in time and ends before a known point in time.
Note that the interval is closed with respect to the
start point, open with respect to the end point and start must
be strictly less than end.
An interval where start==end is illegal, as it would indicate a
negative 1 millisecond duration. A point in time must be represented
with end = start+EPSILON.
A TimeSpan that does not have well-defined start and end times is
also illegal. For example a set of TimeSpans might also be a
TimeSpan (e.g. Schedule) (with start and end times bounding the
start and end times of all the members of the set). If the set were
empty, there would be no well-defined start and end times. Such a
TimeSpan would be illegal.
The values are usually interpreted to mean milliseconds in java time,
though there is nothing which actually requires these semantics.
Note that while the interface is not required to be serializable,
most implementations (including the static inner classes here)
will actually be so.
See Also: TimeSpans See Also: for a collection of factory methods. |
Field Summary | |
long | EPSILON The minimum Time increment. | TimeSpan | FOREVER | long | MAX_VALUE A value to indicate unbounded EndTime.
The actual value was chosen so that (MAX_VALUE-MIN_VALUE) is still a long. | long | MIN_VALUE A value to indicate unbounded StartTime. |
Method Summary | |
long | getEndTime() The first point in time after start to be considered
not part of the interval. | long | getStartTime() The first point in time to be considered part of the
interval. |
EPSILON | long EPSILON(Code) | | The minimum Time increment. *
|
FOREVER | TimeSpan FOREVER(Code) | | a TimeSpan representing all representable time *
|
MAX_VALUE | long MAX_VALUE(Code) | | A value to indicate unbounded EndTime.
The actual value was chosen so that (MAX_VALUE-MIN_VALUE) is still a long.
|
MIN_VALUE | long MIN_VALUE(Code) | | A value to indicate unbounded StartTime.
The actual value was chosen so that (MAX_VALUE-MIN_VALUE) is still a long.
|
getEndTime | long getEndTime()(Code) | | The first point in time after start to be considered
not part of the interval.
MAX_VALUE IFF unbounded. |
getStartTime | long getStartTime()(Code) | | The first point in time to be considered part of the
interval.
MIN_VALUE IFF unbounded. |
|
|