Interface WallTime
- All Known Implementing Classes:
PlainTime,PlainTimestamp
Defines a wall time on an analogue clock conforming to ISO-8601
in the range T00:00:00 - T24:00:00.
Note: Implementations must document if they support the special value T24:00:00 or not. This value denotes midnight at the end of the day, that is midnight T00:00 at the begin of the following day.
- Author:
- Meno Hochschild
-
Method Summary
-
Method Details
-
getHour
int getHour()Yields the hour of day.
- Returns:
- hour in range
0 - 24(the value24is only allowed if minute and second have the value0)
-
getMinute
int getMinute()Yields the minute of hour.
- Returns:
- minute in range
0 - 59
-
getSecond
int getSecond()Yields the second of minute.
Given this context and the fact that this interface describes an analogue clock without UTC reference, the special leapsecond value
60cannot be supported.- Returns:
- second in range
0 - 59
-
getNanosecond
int getNanosecond()Yields the nanosecond.
Implementations which are not capable of nanosecond precision will just yield
0or another suitable rounded value.- Returns:
- nanosecond in range
0 - 999,999,999
-
toString
String toString()Yields a canonical representation in ISO-format "Thh:mm" or "Thh:mm:ss".
If this object also knows subseconds then a fractional part of second part is possible.
-