LocalTime is an immutable time class representing a time without a time zone.
LocalTime implements the {@link ReadablePartial} interface.To do this, the interface methods focus on the key fields - HourOfDay, MinuteOfHour, SecondOfMinute and MillisOfSecond. However, all time fields may in fact be queried.
Calculations on LocalTime are performed using a {@link Chronology}. This chronology will be set internally to be in the UTC time zone for all calculations.
Each individual field can be queried in two ways:
getHourOfDay()
hourOfDay().get()
The second technique also provides access to other useful methods on the field:
- numeric value
- text value
- short text value
- maximum/minimum values
- add/subtract
- set
- rounding
LocalTime is thread-safe and immutable, provided that the Chronology is as well. All standard Chronology classes supplied are thread-safe and immutable.
@author Stephen Colebourne
@since 1.3