Package org.gvsig.timesupport
Interface Time
- All Known Subinterfaces:
AbsoluteInstant,AbsoluteInterval,EditableRelativeInstant,Instant,Interval,RelativeInstant,RelativeInterval
public interface Time
This object is in the top level of the time hierarchy. All the temporal objects have to inherit of this interface.
- Version:
- $Id$
- Author:
- gvSIG Team
-
Method Summary
Modifier and TypeMethodDescriptionGets the chronology of the instant.booleanintersects(Time time) Does this time intersects with the time passed.booleanChecks if the time is an absolute temporal type, that is an object that doesn't has a time zone.booleanChecks if the time is an instant, that is an object that represents a position in a time scale.booleanChecks if the time is an interval, that is an object that represents a period of time between two instants.booleanChecks if the time is a relative temporal type, that is an object that has a Chronology that establish how a time object can be converted into other object with date time fields.
-
Method Details
-
intersects
Does this time intersects with the time passed.- Parameters:
time- an instant to check against, null means now- Returns:
trueif the time intersects with the time passed in
-
isRelative
boolean isRelative()Checks if the time is a relative temporal type, that is an object that has a Chronology that establish how a time object can be converted into other object with date time fields.- Returns:
trueinvalid input: '<'/code) if the time object is relative
-
isAbsolute
boolean isAbsolute()Checks if the time is an absolute temporal type, that is an object that doesn't has a time zone.- Returns:
trueif the time object is absolute
-
isInterval
boolean isInterval()Checks if the time is an interval, that is an object that represents a period of time between two instants.- Returns:
trueif the time object is an interval
-
isInstant
boolean isInstant()Checks if the time is an instant, that is an object that represents a position in a time scale. In practice, an instant is an interval whose duration is less than the resolution of the time scale.- Returns:
trueif the time object is an instant.
-
getChronology
Chronology getChronology()Gets the chronology of the instant. The Chronology provides conversion from the millisecond value to meaningful fields in a particular calendar system.- Returns:
- the Chronology, never null
-