T - type of elementspublic static class AsyncCollection.Listen<T> extends Object implements AsyncCollection<T>
AsyncCollection.Aggregator<T>, AsyncCollection.Keep<T>, AsyncCollection.Listen<T>, AsyncCollection.OneByOne<T>| Constructor and Description |
|---|
Listen(Listener<Collection<T>> onElementsReady,
Runnable onDone)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
done()
Called when no more elements will come.
|
boolean |
isDone()
Return true if the method done has been called already.
|
void |
newElements(Collection<T> elements)
Called when new elements are ready.
|
public Listen(Listener<Collection<T>> onElementsReady, Runnable onDone)
public void newElements(Collection<T> elements)
AsyncCollectionnewElements in interface AsyncCollection<T>public void done()
AsyncCollectiondone in interface AsyncCollection<T>public boolean isDone()
AsyncCollectionisDone in interface AsyncCollection<T>Copyright © 2017. All rights reserved.