net.corda.node.utilities

## Class TestClock

- MutableClock
- - net.corda.node.utilities.TestClock

- All Implemented Interfaces:
    SerializeAsToken

      public class TestClock
      extends MutableClock
      implements SerializeAsToken

  A Clock that can have the date advanced for use in demos.

  See Also:
    Clock

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestClock(java.time.Clock delegateClock)` A Clock that can have the date advanced for use in demos.
    `TestClock()` A Clock that can have the date advanced for use in demos.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.time.ZoneId` | `getZone()`
    `java.time.Instant` | `instant()`
    `SerializationToken` | `toToken(SerializeAsTokenContext context)`
    `boolean` | `updateDate(java.time.LocalDate date)`
    `java.time.Clock` | `withZone(java.time.ZoneId zone)`

    - ### Methods inherited from class net.corda.node.utilities.MutableClock

      `getMutationCount, getMutations, notifyMutationObservers`

    - ### Methods inherited from interface net.corda.core.serialization.SerializeAsToken

      `toToken`

- - ### Constructor Detail

    - #### TestClock

          public TestClock(java.time.Clock delegateClock)

      A Clock that can have the date advanced for use in demos.

      See Also:
        Clock

    - #### TestClock

          public TestClock()

      A Clock that can have the date advanced for use in demos.

      See Also:
        Clock

  - ### Method Detail

    - #### toToken

          public SerializationToken toToken(SerializeAsTokenContext context)

    - #### updateDate

          public boolean updateDate(java.time.LocalDate date)

    - #### instant

          public java.time.Instant instant()

    - #### withZone

          public java.time.Clock withZone(java.time.ZoneId zone)

    - #### getZone

          public java.time.ZoneId getZone()