public class SingleExecutionTime extends Object implements ExecutionTime
Modifier and Type | Method and Description |
---|---|
boolean |
isMatch(java.time.ZonedDateTime date)
Provide feedback if a given date matches the cron expression.
|
Optional<java.time.ZonedDateTime> |
lastExecution(java.time.ZonedDateTime date)
Provide nearest date for last execution.
|
Optional<java.time.ZonedDateTime> |
nextExecution(java.time.ZonedDateTime date)
Provide nearest date for next execution.
|
Optional<java.time.Duration> |
timeFromLastExecution(java.time.ZonedDateTime date)
Provide nearest time from last execution.
|
Optional<java.time.Duration> |
timeToNextExecution(java.time.ZonedDateTime date)
Provide nearest time for next execution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forCron
public Optional<java.time.ZonedDateTime> nextExecution(java.time.ZonedDateTime date)
nextExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public Optional<java.time.Duration> timeToNextExecution(java.time.ZonedDateTime date)
timeToNextExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public Optional<java.time.ZonedDateTime> lastExecution(java.time.ZonedDateTime date)
lastExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public Optional<java.time.Duration> timeFromLastExecution(java.time.ZonedDateTime date)
timeFromLastExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public boolean isMatch(java.time.ZonedDateTime date)
isMatch
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.Copyright © 2018. All rights reserved.