public final class CallbackList extends Object implements Collection<EventCallback>
Entries in the list cannot be removed, but new entries can be added.
A misbehavior callback (one that throws an exception) will not halt the processing of other callbacks.
Constructor and Description |
---|
CallbackList() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(EventCallback callback) |
boolean |
addAll(Collection<? extends EventCallback> c) |
void |
cancelAll()
Cancel all callbacks.
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
isEmpty() |
Iterator<EventCallback> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
void |
runAll()
Execute all callbacks in the correct order.
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public void runAll()
public void cancelAll()
public int size()
size
in interface Collection<EventCallback>
public boolean isEmpty()
isEmpty
in interface Collection<EventCallback>
public boolean contains(Object o)
contains
in interface Collection<EventCallback>
public Iterator<EventCallback> iterator()
iterator
in interface Iterable<EventCallback>
iterator
in interface Collection<EventCallback>
public Object[] toArray()
toArray
in interface Collection<EventCallback>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<EventCallback>
public boolean add(EventCallback callback)
add
in interface Collection<EventCallback>
public boolean remove(Object o)
remove
in interface Collection<EventCallback>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<EventCallback>
public boolean addAll(Collection<? extends EventCallback> c)
addAll
in interface Collection<EventCallback>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<EventCallback>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<EventCallback>
public void clear()
clear
in interface Collection<EventCallback>