T - type of elementspublic static class AsyncCollection.Keep<T> extends Object implements AsyncCollection<T>
AsyncCollection.Aggregator<T>, AsyncCollection.Keep<T>, AsyncCollection.Listen<T>, AsyncCollection.OneByOne<T>| Constructor and Description |
|---|
Keep() |
| Modifier and Type | Method and Description |
|---|---|
void |
done()
Called when no more elements will come.
|
List<T> |
getCurrentElements()
Return the list containing the elements kept so far.
|
boolean |
isDone()
Return true if the method done has been called already.
|
void |
newElements(Collection<T> elements)
Called when new elements are ready.
|
void |
ondone(Runnable listener)
Add a listener to be called when the done method is called.
|
void |
provideTo(AsyncCollection<T> col)
Send the elements of this collection to the given collection.
|
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>public void ondone(Runnable listener)
public void provideTo(AsyncCollection<T> col)
Copyright © 2018. All rights reserved.