All Implemented Interfaces:
Serializable, Comparable<OffsetTime>, Temporal, TemporalAccessor, TemporalAdjuster

  • Field Summary

    Fields

    The maximum supported OffsetTime, '23:59:59.999999999-18:00'.

    The minimum supported OffsetTime, '00:00:00+18:00'.

  • Method Summary

    Adjusts the specified temporal object to have the same offset and time as this object.

    Combines this time with a date to create an OffsetDateTime.

    int

    Compares this OffsetTime to another time.

    boolean

    Checks if this time is equal to another time.

    Formats this time using the specified formatter.

    Obtains an instance of OffsetTime from a temporal object.

    int

    Gets the value of the specified field from this time as an int.

    int

    getHour()

    Gets the hour-of-day field.

    long

    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.

    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

    Checks if the instant of this OffsetTime is after that of the specified time applying both times to a common date.

    boolean

    Checks if the instant of this OffsetTime is before that of the specified time applying both times to a common date.

    boolean

    Checks if the instant of this OffsetTime is equal to that of the specified time applying both times to a common date.

    boolean

    Checks if the specified field is supported.

    boolean

    Checks if the specified unit is supported.

    Returns a copy of this time with the specified amount subtracted.

    Returns a copy of this time with the specified amount subtracted.

    minusHours(long hours)

    Returns a copy of this OffsetTime with the specified number of hours subtracted.

    minusMinutes(long minutes)

    Returns a copy of this OffsetTime with the specified number of minutes subtracted.

    minusNanos(long nanos)

    Returns a copy of this OffsetTime with the specified number of nanoseconds subtracted.

    minusSeconds(long seconds)

    Returns a copy of this OffsetTime with the specified number of seconds subtracted.

    now()

    Obtains the current time from the system clock in the default time-zone.

    Obtains the current time from the specified clock.

    Obtains the current time from the system clock in the specified time-zone.

    of(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)

    Obtains an instance of OffsetTime from an hour, minute, second and nanosecond.

    Obtains an instance of OffsetTime from a local time and an offset.

    Obtains an instance of OffsetTime from an Instant and zone ID.

    Obtains an instance of OffsetTime from a text string such as 10:15:30+01:00.

    Obtains an instance of OffsetTime from a text string using a specific formatter.

    Returns a copy of this time with the specified amount added.

    Returns a copy of this time with the specified amount added.

    plusHours(long hours)

    Returns a copy of this OffsetTime with the specified number of hours added.

    plusMinutes(long minutes)

    Returns a copy of this OffsetTime with the specified number of minutes added.

    plusNanos(long nanos)

    Returns a copy of this OffsetTime with the specified number of nanoseconds added.

    plusSeconds(long seconds)

    Returns a copy of this OffsetTime with the specified number of seconds added.

    <R> R

    Queries this time using the specified query.

    Gets the range of valid values for the specified field.

    long

    Converts this OffsetTime to the number of seconds since the epoch of 1970-01-01T00:00:00Z.

    Gets the LocalTime part of this date-time.

    toString()

    Outputs this time as a String, such as 10:15:30+01:00.

    Returns a copy of this OffsetTime with the time truncated.

    long

    Calculates the amount of time until another time in terms of the specified unit.

    Returns an adjusted copy of this time.

    Returns a copy of this time with the specified field set to a new value.

    withHour(int hour)

    Returns a copy of this OffsetTime with the hour-of-day altered.

    withMinute(int minute)

    Returns a copy of this OffsetTime with the minute-of-hour altered.

    withNano(int nanoOfSecond)

    Returns a copy of this OffsetTime with the nano-of-second altered.

    Returns a copy of this OffsetTime with the specified offset ensuring that the result is at the same instant on an implied day.

    Returns a copy of this OffsetTime with the specified offset ensuring that the result has the same local time.

    withSecond(int second)

    Returns a copy of this OffsetTime with the second-of-minute altered.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Field Details

    • MIN

    • MAX

  • Method Details

    • now

    • now

    • now

    • of

    • of

    • ofInstant

    • from

    • parse

    • parse

    • isSupported

    • isSupported

    • range

    • get

    • getLong

    • getOffset

    • withOffsetSameLocal

    • withOffsetSameInstant

    • toLocalTime

    • getHour

    • getMinute

    • getSecond

    • getNano

    • with

    • with

    • withHour

    • withMinute

    • withSecond

    • withNano

    • truncatedTo

    • plus

    • plus

    • plusHours

    • plusMinutes

    • plusSeconds

    • plusNanos

    • minus

    • minus

    • minusHours

    • minusMinutes

    • minusSeconds

    • minusNanos

    • query

    • adjustInto

    • until

    • format

    • atDate

    • toEpochSecond

    • compareTo

    • isAfter

    • isBefore

    • isEqual

    • equals

    • hashCode

    • toString