Class FixedEngineClock

  • All Implemented Interfaces:
    EngineClock

    public class FixedEngineClock
    extends java.lang.Object
    implements EngineClock
    This is a fixed clock with some methods to change this fixed time Only used for testing purpose
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedEngineClock​(java.time.Instant now)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTime​(long amountToAdd, java.time.temporal.TemporalUnit unit)  
      java.time.Instant now()  
      void setNow​(java.time.Instant now)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FixedEngineClock

        public FixedEngineClock​(java.time.Instant now)
    • Method Detail

      • now

        public java.time.Instant now()
        Specified by:
        now in interface EngineClock
      • setNow

        public void setNow​(java.time.Instant now)
      • addTime

        public void addTime​(long amountToAdd,
                            java.time.temporal.TemporalUnit unit)