T - type of elementspublic static class CollectionListener.Keep<T> extends Object implements CollectionListener<T>
CollectionListener.Keep<T>| Modifier and Type | Field and Description |
|---|---|
protected Collection<T> |
col |
protected Throwable |
error |
protected LinkedList<Pair<CollectionListener<T>,Task<Void,NoException>>> |
listeners |
protected byte |
priority |
| Constructor and Description |
|---|
Keep(Collection<T> implementation,
byte listenersCallPriority)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(CollectionListener<T> listener)
Add a listener.
|
void |
elementsAdded(Collection<? extends T> elements)
Elements have been added.
|
void |
elementsChanged(Collection<? extends T> elements)
Elements have changed.
|
void |
elementsReady(Collection<? extends T> elements)
First elements are ready.
|
void |
elementsRemoved(Collection<? extends T> elements)
Elements have been removed.
|
void |
error(Throwable error)
An error occured while getting elements.
|
void |
removeListener(CollectionListener<T> listener)
Remove a listener.
|
protected Collection<T> col
protected byte priority
protected Throwable error
protected LinkedList<Pair<CollectionListener<T>,Task<Void,NoException>>> listeners
public Keep(Collection<T> implementation, byte listenersCallPriority)
public void elementsReady(Collection<? extends T> elements)
CollectionListenerelementsReady in interface CollectionListener<T>public void elementsAdded(Collection<? extends T> elements)
CollectionListenerelementsAdded in interface CollectionListener<T>public void elementsRemoved(Collection<? extends T> elements)
CollectionListenerelementsRemoved in interface CollectionListener<T>public void elementsChanged(Collection<? extends T> elements)
CollectionListenerelementsChanged in interface CollectionListener<T>public void error(Throwable error)
CollectionListenererror in interface CollectionListener<T>public void addListener(CollectionListener<T> listener)
public void removeListener(CollectionListener<T> listener)
Copyright © 2019. All rights reserved.