201 |
|
} |
202 |
|
long d = (getDelay(TimeUnit.NANOSECONDS) - |
203 |
|
other.getDelay(TimeUnit.NANOSECONDS)); |
204 |
< |
return (d == 0)? 0 : ((d < 0)? -1 : 1); |
204 |
> |
return (d == 0) ? 0 : ((d < 0) ? -1 : 1); |
205 |
|
} |
206 |
|
|
207 |
|
/** |
246 |
|
* @param periodic true if this task periodic, false if delayed |
247 |
|
*/ |
248 |
|
boolean canRunInCurrentRunState(boolean periodic) { |
249 |
< |
return isRunningOrShutdown(periodic? |
249 |
> |
return isRunningOrShutdown(periodic ? |
250 |
|
continueExistingPeriodicTasksAfterShutdown : |
251 |
|
executeExistingDelayedTasksAfterShutdown); |
252 |
|
} |
309 |
|
if (e instanceof RunnableScheduledFuture) { |
310 |
|
RunnableScheduledFuture<?> t = |
311 |
|
(RunnableScheduledFuture<?>)e; |
312 |
< |
if ((t.isPeriodic()? !keepPeriodic : !keepDelayed) || |
312 |
> |
if ((t.isPeriodic() ? !keepPeriodic : !keepDelayed) || |
313 |
|
t.isCancelled()) { // also remove if already cancelled |
314 |
|
if (q.remove(t)) |
315 |
|
t.cancel(false); |