Package com.globalmentor.model
Class OperationManager.ScheduledOperation
java.lang.Object
com.globalmentor.model.OperationManager.ScheduledOperation
- Enclosing class:
- OperationManager
Encapsulates an operation that has been scheduled, along with any delay or repeat.
- Author:
- Garret Wilson
-
Constructor Summary
ConstructorDescriptionScheduledOperation
(Operation operation, Duration delayTime, boolean repeated) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Resets the scheduled time to the current time.
-
Constructor Details
-
ScheduledOperation
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:
NullPointerException
- if the given operation and/or delay time isnull
.
-
-
Method Details
-
getOperation
- Returns:
- The scheduled operation.
-
getScheduledTime
- Returns:
- The time the operation was scheduled.
-
resetScheduledTime
Resets the scheduled time to the current time.- Returns:
- The new scheduled time.
-
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.
-