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

  • Field Summary

    Fields

    The maximum supported LocalTime, '23:59:59.999999999'.

    The time of midnight at the start of the day, '00:00'.

    The minimum supported LocalTime, '00:00'.

    The time of noon in the middle of the day, '12:00'.

  • Method Summary

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

    Combines this time with a date to create a LocalDateTime.

    Combines this time with an offset to create an OffsetTime.

    int

    Compares this time to another time.

    boolean

    Checks if this time is equal to another time.

    Formats this time using the specified formatter.

    Obtains an instance of LocalTime 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.

    int

    getSecond()

    Gets the second-of-minute field.

    int

    hashCode()

    A hash code for this time.

    boolean

    Checks if this time is after the specified time.

    boolean

    Checks if this time is before the specified time.

    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 hoursToSubtract)

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

    minusMinutes(long minutesToSubtract)

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

    minusNanos(long nanosToSubtract)

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

    minusSeconds(long secondsToSubtract)

    Returns a copy of this LocalTime 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)

    Obtains an instance of LocalTime from an hour and minute.

    of(int hour, int minute, int second)

    Obtains an instance of LocalTime from an hour, minute and second.

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

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

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

    ofNanoOfDay(long nanoOfDay)

    Obtains an instance of LocalTime from a nanos-of-day value.

    ofSecondOfDay(long secondOfDay)

    Obtains an instance of LocalTime from a second-of-day value.

    Obtains an instance of LocalTime from a text string such as 10:15.

    Obtains an instance of LocalTime 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 hoursToAdd)

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

    plusMinutes(long minutesToAdd)

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

    plusNanos(long nanosToAdd)

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

    plusSeconds(long secondstoAdd)

    Returns a copy of this LocalTime 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 LocalTime to the number of seconds since the epoch of 1970-01-01T00:00:00Z.

    long

    Extracts the time as nanos of day, from 0 to 24 * 60 * 60 * 1,000,000,000 - 1.

    int

    Extracts the time as seconds of day, from 0 to 24 * 60 * 60 - 1.

    toString()

    Outputs this time as a String, such as 10:15.

    Returns a copy of this LocalTime 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 LocalTime with the hour-of-day altered.

    withMinute(int minute)

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

    withNano(int nanoOfSecond)

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

    withSecond(int second)

    Returns a copy of this LocalTime 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

    • MIDNIGHT

    • NOON

  • Method Details

    • now

    • now

    • now

    • of

    • of

    • of

    • ofInstant

    • ofSecondOfDay

    • ofNanoOfDay

    • from

    • parse

    • parse

    • isSupported

    • isSupported

    • range

    • get

    • getLong

    • 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

    • atOffset

    • toSecondOfDay

    • toNanoOfDay

    • toEpochSecond

    • compareTo

    • isAfter

    • isBefore

    • equals

    • hashCode

    • toString