All Implemented Interfaces:
InstantSource

  • Constructor Summary

    Constructors

    protected

    Clock()

    Constructor accessible by subclasses.

  • Method Summary

    boolean

    Checks if this clock is equal to another clock.

    Obtains a clock that always returns the same instant.

    getZone()

    Gets the time-zone being used to create dates and times.

    int

    hashCode()

    A hash code for this clock.

    instant()

    Gets the current instant of the clock.

    long

    millis()

    Gets the current millisecond instant of the clock.

    Obtains a clock that returns instants from the specified clock with the specified duration added.

    Obtains a clock that returns the current instant using the best available system clock.

    Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the default time-zone.

    systemUTC()

    Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the UTC time-zone.

    Obtains a clock that returns instants from the specified clock truncated to the nearest occurrence of the specified duration.

    Obtains a clock that returns the current instant ticking in whole milliseconds using the best available system clock.

    Obtains a clock that returns the current instant ticking in whole minutes using the best available system clock.

    Obtains a clock that returns the current instant ticking in whole seconds using the best available system clock.

    Returns a copy of this clock with a different time-zone.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, toString, 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.

    Returns a string representation of the object.

    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.

  • Constructor Details

    • Clock

  • Method Details

    • systemUTC

    • systemDefaultZone

    • system

    • tickMillis

    • tickSeconds

    • tickMinutes

    • tick

    • fixed

    • offset

    • getZone

    • withZone

    • millis

    • instant

    • equals

    • hashCode