public interface Interval extends Time
A time interval represents a period of time between two instants. Intervals are inclusive of the start instant and exclusive of the end. The end instant is always greater than or equal to the start instant.
Intervals have a fixed millisecond duration. This is the difference between the start and end instants. As a result, intervals are not comparable. To compare the length of two intervals, you should compare their durations.
*A huge part of the documentation of this class has been retrieved from the joda-time library.
http://joda-time.sourceforge.net
,
https://gvsig.org/web/projects/gvsig-desktop/docs/devel/org-gvsig-sensors/1-0.0/analysis-and-design/detailed-view/time-support/libraries/org-gvsig-timesupport-lib
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Instant instant)
Does this time interval contain the specified time instant.
|
Instant |
getEnd()
Gets the end of this time interval, which is exclusive, as an Instant.
|
Instant |
getStart()
Gets the start of this time interval, which is inclusive, as an Instant.
|
Duration |
toStandardDuration()
Gets the duration of the interval.
|
getChronology, intersects, isAbsolute, isInstant, isInterval, isRelative
boolean contains(Instant instant)
instant
- the time instant to compare to, null means nowtrue
if this time interval contains the time instantInstant getStart()
Instant getEnd()
Duration toStandardDuration()