Package org.jivesoftware.util
Class ImmediateFuture<T>
- java.lang.Object
-
- org.jivesoftware.util.ImmediateFuture<T>
-
-
Constructor Summary
Constructors Constructor Description ImmediateFuture()
Creates a Future that returns null immediatelyImmediateFuture(T value)
Creates a Future that returns the supplied value immediately
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
T
get()
T
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
-
-
-
Constructor Detail
-
ImmediateFuture
public ImmediateFuture()
Creates a Future that returns null immediately
-
ImmediateFuture
public ImmediateFuture(T value)
Creates a Future that returns the supplied value immediately- Parameters:
value
- the value to return
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<T>
-
-