public interface AbsoluteInstant extends Instant, Cloneable
It defines a partial time that does not support every datetime field,
and is thus a local time. It cannot be compared to a RelativeInstant
,
as it does not fully specify an instant in time.
The time it does specify is a local time, and does not include a time zone. An AbsoluteInstant supports a subset of the fields on the chronology.
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 |
---|---|
int |
getDays()
Gets the number of days of this absolute instant.
|
AbsoluteInstantType |
getFieldType(int index)
Gets the field type at the specified index.
|
int |
getHours()
Gets the number of hours of this absolute instant.
|
int |
getMillis()
Gets the number of millis of this absolute instant.
|
int |
getMinutes()
Gets the number of minutes of this absolute instant.
|
int |
getMonths()
Gets the number of months of this absolute instant.
|
int |
getSeconds()
Gets the number of seconds of this absolute instant.
|
int |
getValue(int index)
Gets the value of the field at the specifed index.
|
int |
getWeeks()
Gets the number of weeks of this absolute instant.
|
int |
getYears()
Gets the number of years of this absolute instant.
|
AbsoluteInstant |
minus(AbsoluteInterval interval)
Gets a copy of this instance with the specified period take away.
|
AbsoluteInstant |
plus(AbsoluteInterval interval)
Gets a copy of this instance with the specified period added.
|
int |
size()
Gets the number of fields in this absolute instant.
|
Duration |
toStandardDuration()
Gets the duration of the instant.
|
getChronology, intersects, isAbsolute, isInstant, isInterval, isRelative
clone, cloneQuietly, cloneQuietly
int size()
AbsoluteInstantType getFieldType(int index)
index
- the index to retrieveint getValue(int index)
index
- the indexjava.lang.IndexOutOfBoundsException
- if the index is invalidint getYears()
int getMonths()
int getWeeks()
int getDays()
int getHours()
int getMinutes()
int getSeconds()
int getMillis()
Duration toStandardDuration()
AbsoluteInstant minus(AbsoluteInterval interval)
this
is returned. *period
- the period to reduce this instant byjava.lang.ArithmeticException
- if the new instant exceeds the capacity of a longAbsoluteInstant plus(AbsoluteInterval interval)
this
is returned.period
- the duration to add to this one, null means zerojava.lang.ArithmeticException
- if the new instant exceeds the capacity of a long