Interface TimeService

All Known Implementing Classes:
ClockTimeService
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TimeService
A service for working with "current" time. The idea is to make it possible to switch in different implementations, e.g., for testing.
Author:
RealLifeDeveloper
  • Method Summary

    Modifier and Type
    Method
    Description
    now()
    Gives the current time as a java.time.ZonedDateTime object.
  • Method Details

    • now

      Gives the current time as a java.time.ZonedDateTime object.
      Returns:
      the current time