public interface RelativeInterval extends Interval, Cloneable
A RelativeInterval is defined like an interval between two RelativeInstant
s.
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(RelativeInstant instant)
Does this time interval contain the specified instant
|
boolean |
contains(RelativeInterval interval)
Does this time interval contain the specified interval
|
RelativeInstant |
getEnd()
Gets the end of this time interval, which is exclusive, as an Instant.
|
RelativeInstant |
getStart()
Gets the start of this time interval, which is inclusive, as an Instant.
|
boolean |
isAfter(RelativeInstant instant)
Is this time interval after the specified instant.
|
boolean |
isAfter(RelativeInterval interval)
Is this time interval entirely after the specified interval.
|
boolean |
isBefore(RelativeInstant instant)
Is this time interval before the specified instant.
|
boolean |
isBefore(RelativeInterval interval)
Is this time interval entirely before the specified interval.
|
boolean |
overlaps(RelativeInterval interval)
Does this time interval overlap the specified time interval.
|
Duration |
toDuration()
Gets the duration of this time interval.
|
long |
toDurationMillis()
Gets the duration of this time interval in milliseconds.
|
contains, toStandardDuration
getChronology, intersects, isAbsolute, isInstant, isInterval, isRelative
clone, cloneQuietly, cloneQuietly
boolean contains(RelativeInstant instant)
instant
- the instant, null means nowtrue
if this time interval contains the instantboolean contains(RelativeInterval interval)
instant
- the time interval to compare to, null means a zero
duration interval nowtrue
if this time interval contains the intervalboolean overlaps(RelativeInterval interval)
interval
- the time interval to compare to, null means a zero
length interval nowtrue
if the time intervals overlapboolean isAfter(RelativeInstant instant)
instant
- the instant to compare to, null means nowtrue
if this time interval is after the instantboolean isAfter(RelativeInterval interval)
interval
- the interval to compare to, null means nowtrue
if this time interval is after the interval specifiedboolean isBefore(RelativeInstant instant)
instant
- the instant to compare to, null means nowtrue
if this time interval is before the instantboolean isBefore(RelativeInterval interval)
interval
- the interval to compare to, null means nowtrue
if this time interval is before the interval specifiedDuration toDuration()
long toDurationMillis()
RelativeInstant getStart()
RelativeInstant getEnd()