Example usage for Java java.time OffsetTime fields, constructors, methods, implement or subclass
The text is from its open source code.
OffsetTime | MIN The minimum supported OffsetTime , '00:00:00+18:00'. |
OffsetTime | MAX The maximum supported OffsetTime , '23:59:59.999999999-18:00'. |
Temporal | adjustInto(Temporal temporal) Adjusts the specified temporal object to have the same offset and time as this object. |
OffsetDateTime | atDate(LocalDate date) Combines this time with a date to create an OffsetDateTime . |
int | compareTo(OffsetTime other) Compares this OffsetTime to another time. |
boolean | equals(Object obj) Checks if this time is equal to another time. |
String | format(DateTimeFormatter formatter) Formats this time using the specified formatter. |
OffsetTime | from(TemporalAccessor temporal) Obtains an instance of OffsetTime from a temporal object. |
int | get(TemporalField field) Gets the value of the specified field from this time as an int . |
int | getHour() Gets the hour-of-day field. |
long | getLong(TemporalField field) Gets the value of the specified field from this time as a long . |
int | getMinute() Gets the minute-of-hour field. |
int | getNano() Gets the nano-of-second field. |
ZoneOffset | getOffset() Gets the zone offset, such as '+01:00'. |
int | getSecond() Gets the second-of-minute field. |
int | hashCode() A hash code for this time. |
boolean | isAfter(OffsetTime other) Checks if the instant of this OffsetTime is after that of the specified time applying both times to a common date. |
boolean | isBefore(OffsetTime other) Checks if the instant of this OffsetTime is before that of the specified time applying both times to a common date. |
boolean | isEqual(OffsetTime other) Checks if the instant of this OffsetTime is equal to that of the specified time applying both times to a common date. |
boolean | isSupported(TemporalField field) Checks if the specified field is supported. |
boolean | isSupported(TemporalUnit unit) Checks if the specified unit is supported. |
OffsetTime | minus(TemporalAmount amountToSubtract) Returns a copy of this time with the specified amount subtracted. |
OffsetTime | minus(long amountToSubtract, TemporalUnit unit) Returns a copy of this time with the specified amount subtracted. |
OffsetTime | minusHours(long hours) Returns a copy of this OffsetTime with the specified number of hours subtracted. |
OffsetTime | minusMinutes(long minutes) Returns a copy of this OffsetTime with the specified number of minutes subtracted. |
OffsetTime | minusNanos(long nanos) Returns a copy of this OffsetTime with the specified number of nanoseconds subtracted. |
OffsetTime | minusSeconds(long seconds) Returns a copy of this OffsetTime with the specified number of seconds subtracted. |
OffsetTime | now() Obtains the current time from the system clock in the default time-zone. |
OffsetTime | now(ZoneId zone) Obtains the current time from the system clock in the specified time-zone. |
OffsetTime | now(Clock clock) Obtains the current time from the specified clock. |
OffsetTime | of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset) Obtains an instance of OffsetTime from an hour, minute, second and nanosecond. |
OffsetTime | of(LocalTime time, ZoneOffset offset) Obtains an instance of OffsetTime from a local time and an offset. |
OffsetTime | ofInstant(Instant instant, ZoneId zone) Obtains an instance of OffsetTime from an Instant and zone ID. |
OffsetTime | parse(CharSequence text) Obtains an instance of OffsetTime from a text string such as 10:15:30+01:00 . |
OffsetTime | parse(CharSequence text, DateTimeFormatter formatter) Obtains an instance of OffsetTime from a text string using a specific formatter. |
OffsetTime | plus(long amountToAdd, TemporalUnit unit) Returns a copy of this time with the specified amount added. |
OffsetTime | plus(TemporalAmount amountToAdd) Returns a copy of this time with the specified amount added. |
OffsetTime | plusHours(long hours) Returns a copy of this OffsetTime with the specified number of hours added. |
OffsetTime | plusMinutes(long minutes) Returns a copy of this OffsetTime with the specified number of minutes added. |
OffsetTime | plusNanos(long nanos) Returns a copy of this OffsetTime with the specified number of nanoseconds added. |
OffsetTime | plusSeconds(long seconds) Returns a copy of this OffsetTime with the specified number of seconds added. |
R | query(TemporalQuery Queries this time using the specified query. |
ValueRange | range(TemporalField field) Gets the range of valid values for the specified field. |
LocalTime | toLocalTime() Gets the LocalTime part of this date-time. |
String | toString() Outputs this time as a String , such as 10:15:30+01:00 . |
OffsetTime | truncatedTo(TemporalUnit unit) Returns a copy of this OffsetTime with the time truncated. |
long | until(Temporal endExclusive, TemporalUnit unit) Calculates the amount of time until another time in terms of the specified unit. |
OffsetTime | with(TemporalAdjuster adjuster) Returns an adjusted copy of this time. |
OffsetTime | with(LocalTime time, ZoneOffset offset) Returns a new time based on this one, returning this where possible. |
OffsetTime | with(TemporalField field, long newValue) Returns a copy of this time with the specified field set to a new value. |
OffsetTime | withHour(int hour) Returns a copy of this OffsetTime with the hour-of-day altered. |
OffsetTime | withMinute(int minute) Returns a copy of this OffsetTime with the minute-of-hour altered. |
OffsetTime | withNano(int nanoOfSecond) Returns a copy of this OffsetTime with the nano-of-second altered. |
OffsetTime | withOffsetSameInstant(ZoneOffset offset) Returns a copy of this OffsetTime with the specified offset ensuring that the result is at the same instant on an implied day. |
OffsetTime | withOffsetSameLocal(ZoneOffset offset) Returns a copy of this OffsetTime with the specified offset ensuring that the result has the same local time. |
OffsetTime | withSecond(int second) Returns a copy of this OffsetTime with the second-of-minute altered. |