Package net.officefloor.frame.test
Class MockClockFactory
- java.lang.Object
-
- net.officefloor.frame.test.MockClockFactory
-
- All Implemented Interfaces:
ClockFactory
public class MockClockFactory extends java.lang.Object implements ClockFactory
MockClockFactory.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MockClockFactory()Instantiate with current time.MockClockFactory(long currentTimeSeconds)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Clock<T>createClock(java.util.function.Function<java.lang.Long,T> translator)Creates aClock.voidsetCurrentTimeSeconds(long currentTimeSeconds)Specifies the current time.
-
-
-
Method Detail
-
setCurrentTimeSeconds
public void setCurrentTimeSeconds(long currentTimeSeconds)
Specifies the current time.- Parameters:
currentTimeSeconds- Current time in seconds since Epoch.
-
createClock
public <T> Clock<T> createClock(java.util.function.Function<java.lang.Long,T> translator)
Description copied from interface:ClockFactoryCreates aClock.- Specified by:
createClockin interfaceClockFactory- Parameters:
translator- Translate the seconds since Epoch toClocktime.- Returns:
Clock.
-
-