Package org.geotools.temporal.object
Class DefaultDateAndTime
- Object
-
- DefaultTemporalPosition
-
- DefaultDateAndTime
-
- All Implemented Interfaces:
CalendarDate
,ClockTime
,DateAndTime
,TemporalPosition
public class DefaultDateAndTime extends DefaultTemporalPosition implements DateAndTime
Provides a single data type for identifying a temporal position with a resolution of less than a day.- Author:
- Mehdi Sidhoum (Geomatys)
-
-
Constructor Summary
Constructors Constructor Description DefaultDateAndTime(TemporalReferenceSystem frame, IndeterminateValue indeterminatePosition, InternationalString calendarEraName, int[] calendarDate, Number[] clockTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
int[]
getCalendarDate()
Provides a sequence of integers in which the first integer identifies a specific instance of the unit used at the highest level of the calendar hierarchy, the second integer identifies a specific instance of the unit used at the next lower level in the hierarchy, and so on.InternationalString
getCalendarEraName()
Provides the name of the calendar era to which the date is referenced.Number[]
getClockTime()
A sequence of numbers with a structure similar to that ofCalendarDate
.int
hashCode()
void
setCalendarDate(int[] calendarDate)
void
setCalendarEraName(InternationalString calendarEraName)
void
setClockTime(Number... clockTime)
String
toString()
-
Methods inherited from class DefaultTemporalPosition
getFrame, getIndeterminatePosition, setFrame, setIndeterminatePosition
-
Methods inherited from interface TemporalPosition
getIndeterminatePosition
-
-
-
-
Constructor Detail
-
DefaultDateAndTime
public DefaultDateAndTime(TemporalReferenceSystem frame, IndeterminateValue indeterminatePosition, InternationalString calendarEraName, int[] calendarDate, Number[] clockTime)
-
-
Method Detail
-
getClockTime
public Number[] getClockTime()
A sequence of numbers with a structure similar to that ofCalendarDate
. The first number integer identifies a specific instance of the unit used at the highest level of the clock hierarchy, the second number identifies a specific instance of the unit used at the next lower level, and so on. All but the last number in the sequence shall be integers; the last number may be integer or real.- Specified by:
getClockTime
in interfaceClockTime
-
getCalendarEraName
public InternationalString getCalendarEraName()
Description copied from interface:CalendarDate
Provides the name of the calendar era to which the date is referenced.- Specified by:
getCalendarEraName
in interfaceCalendarDate
-
getCalendarDate
public int[] getCalendarDate()
Provides a sequence of integers in which the first integer identifies a specific instance of the unit used at the highest level of the calendar hierarchy, the second integer identifies a specific instance of the unit used at the next lower level in the hierarchy, and so on. The format defined in ISO 8601 for dates in the Gregorian calendar may be used for any date that is composed of values for year, month and day.- Specified by:
getCalendarDate
in interfaceCalendarDate
-
setCalendarEraName
public void setCalendarEraName(InternationalString calendarEraName)
-
setCalendarDate
public void setCalendarDate(int[] calendarDate)
-
setClockTime
public void setClockTime(Number... clockTime)
-
equals
public boolean equals(Object object)
- Overrides:
equals
in classDefaultTemporalPosition
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDefaultTemporalPosition
-
toString
public String toString()
- Overrides:
toString
in classDefaultTemporalPosition
-
-