public interface TimeInfo
This interface defines methods to examine a time. Time is organized intro "hours," "minutes," and "seconds." A time system may offer a different designation for these divisions which may or may not vary in duration.
Modifier and Type | Method and Description |
---|---|
DisplayText |
getDescription()
Gets a description of this time system.
|
DisplayText |
getDisplayLabel()
Gets a short label for this time system.
|
DisplayText |
getDisplayName()
Gets the display name for this time system.
|
DisplayText |
getHourAbbrev()
Gets the abbreviation for "hours."
|
DisplayText |
getHourInitial()
Gets the initial for "hours."
|
DisplayText |
getHourName()
Gets the display name for "hours."
|
DisplayText |
getMinuteAbbrev()
Gets the abbreviation for "minutes."
|
DisplayText |
getMinuteInitial()
Gets the initial for "minutes."
|
DisplayText |
getMinuteName()
Gets the display name for "minutes."
|
long |
getNumHours()
Gets the number of hours in a day.
|
long |
getNumHoursForDay(long year,
long month,
long day)
Gets the number of hours for a given day.
|
long |
getNumMinutes()
Gets the number of minutes in an hour.
|
long |
getNumMinutesForHour(long year,
long month,
long day,
long hour)
Gets the minutes for a given hour.
|
long |
getNumSeconds()
Gets the number of seconds in a minute.
|
long |
getNumSecondsForMinute(long year,
long month,
long day,
long hour,
long minute)
Gets the seconds for a given minute.
|
DisplayText |
getSecondAbbrev()
Gets the abbreviation for "seconds."
|
DisplayText |
getSecondInitial()
Gets the initial for "seconds."
|
DisplayText |
getSecondName()
Gets the display name for "seconds."
|
Type |
getTimeType()
Gets the time type.
|
boolean |
hasVariableHours()
Tests if this time system has a variable number of hours in a day.
|
boolean |
hasVariableMinutes()
Tests if this time system has a variable number of minutes in an hour.
|
boolean |
hasVariableSeconds()
Tests if this time system has a variable number of seconds in a
minute.
|
Type getTimeType()
mandatory
- This method must be implemented. DisplayText getDisplayName()
mandatory
- This method must be implemented. DisplayText getDisplayLabel()
mandatory
- This method must be implemented. DisplayText getDescription()
mandatory
- This method must be implemented. DisplayText getHourName()
mandatory
- This method must be implemented. DisplayText getHourAbbrev()
mandatory
- This method must be implemented. DisplayText getHourInitial()
mandatory
- This method must be implemented. boolean hasVariableHours()
true
if the number of hours per day varies,
false
if the number of hours per day is
constantmandatory
- This method must be implemented. long getNumHours()
mandatory
- This method must be implemented. long getNumHoursForDay(long year, long month, long day) throws OperationFailedException
year
- a yearmonth
- a DateTime
month codeday
- a DateTime
day codeIllegalStateException
- year
is greater
than CalendarInfo.getLastYearBeforeCommonEra()
and less then CalendarInfo.getFirstYearInCommonEra()
, or month
is greater than or equal to
CalendarInfo.getNumMonthsForYear(year)
, or
day
is greater than or equal to
CalendarInfo.getDaysInMonth(year, month)
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. DisplayText getMinuteName()
mandatory
- This method must be implemented. DisplayText getMinuteAbbrev()
mandatory
- This method must be implemented. DisplayText getMinuteInitial()
mandatory
- This method must be implemented. boolean hasVariableMinutes()
true
if the number of minutes per hour varies,
false
if the number of minutes per hour is
constantmandatory
- This method must be implemented. long getNumMinutes()
mandatory
- This method must be implemented. long getNumMinutesForHour(long year, long month, long day, long hour) throws OperationFailedException
year
- a yearmonth
- a DateTime
month codeday
- a DateTime
day codehour
- an hourIllegalStateException
- year
is greater
than CalendarInfo.getLastYearBeforeCommonEra()
and less then CalendarInfo.getFirstYearInCommonEra(),
or month
is greater than or equal to
CalendarInfo.getNumMonthsForYear(year)
, or
day
is greater than or equal to
CalendarInfo.getDaysInMonth(year, month)
, or
hour
is greater than or equal to
getNumHoursInDay(year, month, day)
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. DisplayText getSecondName()
mandatory
- This method must be implemented. DisplayText getSecondAbbrev()
mandatory
- This method must be implemented. DisplayText getSecondInitial()
mandatory
- This method must be implemented. boolean hasVariableSeconds()
true
if the number of seconds per minute
varies, false
if the number of seconds per
minute is constantmandatory
- This method must be implemented. long getNumSeconds()
mandatory
- This method must be implemented. long getNumSecondsForMinute(long year, long month, long day, long hour, long minute) throws OperationFailedException
year
- a yearmonth
- a DateTime
month codeday
- a DateTime
day codehour
- an hourminute
- a minuteIllegalStateException
- year
is greater
than getLastYearBeforeCommonEra()
and less then
getFirstYearInCommonEra()
, or month
is greater than or equal to
CalendarInfo.getNumMonthsForYear(year)
, or day
is greater than or equal to
CalendarInfo.getDaysInMonth(year, month)
, or
hour
is greater than or equal to
getNumHoursInDay(year, month, day)
, or minute
is greater than or equal to
getNumMinutesInhour(year, month, day, hour)
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented.