Package com.globalmentor.model
Class OperationManager.ScheduledOperation
- java.lang.Object
-
- com.globalmentor.model.OperationManager.ScheduledOperation
-
- Enclosing class:
- OperationManager
protected static class OperationManager.ScheduledOperation extends java.lang.Object
Encapsulates an operation that has been scheduled, along with any delay or repeat.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description ScheduledOperation(Operation operation, Duration delayTime, boolean repeated)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
getDelayDuration()
Operation
getOperation()
Time
getScheduledTime()
boolean
isRepeated()
Time
resetScheduledTime()
Resets the scheduled time to the current time.
-
-
-
Constructor Detail
-
ScheduledOperation
public ScheduledOperation(Operation operation, Duration delayTime, boolean repeated)
Constructor.- Parameters:
operation
- The scheduled operation.delayTime
- The delay past the scheduled time before the operation should begin (which may be 0).repeated
- Whether this operation should be repeated.- Throws:
java.lang.NullPointerException
- if the given operation and/or delay time isnull
.
-
-
Method Detail
-
getOperation
public Operation getOperation()
- Returns:
- The scheduled operation.
-
getScheduledTime
public Time getScheduledTime()
- Returns:
- The time the operation was scheduled.
-
resetScheduledTime
public Time resetScheduledTime()
Resets the scheduled time to the current time.- Returns:
- The new scheduled time.
-
getDelayDuration
public Duration getDelayDuration()
- Returns:
- The delay past the scheduled time before the operation should begin (which may be 0).
-
isRepeated
public boolean isRepeated()
- Returns:
- Whether this operation should be repeated.
-
-