Module net.morimekta.testing
Package net.morimekta.testing.concurrent
Class ImmediateScheduledExecutor.FakeTask<V>
- java.lang.Object
-
- net.morimekta.testing.concurrent.ImmediateScheduledExecutor.FakeTask<V>
-
- Type Parameters:
V
- The future return type.
- All Implemented Interfaces:
Comparable<Delayed>
,Runnable
,Delayed
,Future<V>
,ScheduledFuture<V>
- Enclosing class:
- ImmediateScheduledExecutor
public final class ImmediateScheduledExecutor.FakeTask<V> extends Object implements ScheduledFuture<V>, Runnable
A fake task / future instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
int
compareTo(Delayed delayed)
boolean
equals(Object o)
V
get()
V
get(long l, TimeUnit timeUnit)
long
getDelay(TimeUnit timeUnit)
int
hashCode()
boolean
isCancelled()
boolean
isDone()
void
run()
-
-
-
Method Detail
-
compareTo
public int compareTo(Delayed delayed)
- Specified by:
compareTo
in interfaceComparable<V>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-