public class IntermediateFuture<E> extends Future<Collection<E>> implements IIntermediateFuture<E>
Constructor and Description |
---|
IntermediateFuture()
Create a future that is already done.
|
IntermediateFuture(Collection<E> results)
Create a future that is already done.
|
Modifier and Type | Method and Description |
---|---|
void |
addIntermediateResult(E result)
Add an intermediate result.
|
void |
addResultListener(IResultListener<Collection<E>> listener)
Add a result listener.
|
Collection |
getIntermediateResults()
Get the intermediate results that are available.
|
void |
setFinished()
Declare that the future is finished.
|
void |
setResult(Collection<E> result)
Set the result.
|
void |
setResultIfUndone(Collection<E> result)
Set the result.
|
get, get, getEmptyFuture, isDone, main, setException, setExceptionIfUndone
public IntermediateFuture()
result
- The result, if any.public IntermediateFuture(Collection<E> results)
result
- The result, if any.public Collection getIntermediateResults()
getIntermediateResults
in interface IIntermediateFuture<E>
public void addIntermediateResult(E result)
public void setResult(Collection<E> result)
setResult
in class Future<Collection<E>>
result
- The result.public void setResultIfUndone(Collection<E> result)
setResultIfUndone
in class Future<Collection<E>>
result
- The result.public void setFinished()
public void addResultListener(IResultListener<Collection<E>> listener)
addResultListener
in interface IFuture<Collection<E>>
addResultListener
in class Future<Collection<E>>
listsner
- The listener.Copyright © 2012. All Rights Reserved.