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
.void
setCurrentTimeSeconds(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:ClockFactory
Creates aClock
.- Specified by:
createClock
in interfaceClockFactory
- Parameters:
translator
- Translate the seconds since Epoch toClock
time.- Returns:
Clock
.
-
-