- All Implemented Interfaces:
Now
- Direct Known Subclasses:
TimeMachine
public class Moments
extends Object
implements Now
Core component to publish passage-of-time events.
- Author:
- Oliver Drotbohm
-
Constructor Summary
Constructors
-
Method Summary
(package private) void
Triggers event publication every hour.
(package private) void
Triggers event publication every midnight.
Returns the current point in time.
Returns the current date.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Moments
- Parameters:
clock
- must not be null.
events
- must not be null.
properties
- must not be null.
-
Method Details
-
everyHour
Triggers event publication every hour.
-
everyMidnight
Triggers event publication every midnight.
-
-
now
Description copied from interface: Now
Returns the current point in time.
- Specified by:
now
in interface Now
- Returns:
- will never be null.
-
today
Description copied from interface: Now
Returns the current date.
- Specified by:
today
in interface Now
- Returns:
- will never be null.