CALLBACKTYPE - The callback type.public interface ICallbackList<CALLBACKTYPE extends ICallback> extends ICommonsIterable<CALLBACKTYPE>, Serializable
ICallback objects.getAllCallbacks() directly or the returned Iterator would not be
thread-safe and that is not an option for this type.| Modifier and Type | Method and Description |
|---|---|
void |
forEach(Consumer<? super CALLBACKTYPE> aConsumer)
Invoke all registered callbacks in a safe manner.
|
ICommonsList<CALLBACKTYPE> |
getAllCallbacks() |
CALLBACKTYPE |
getCallbackAtIndex(int nIndex)
Get the callback at the specified index.
|
int |
getCallbackCount() |
boolean |
hasCallbacks() |
containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstMapped, findFirstMapped, forEach, forEach, forEachBreakable, getIteratorCount, getIteratorCountiterator, spliterator@Nonnull @ReturnsMutableCopy ICommonsList<CALLBACKTYPE> getAllCallbacks()
null and only
containing non-null elements.@Nullable CALLBACKTYPE getCallbackAtIndex(@Nonnegative int nIndex)
nIndex - The index to be retrieved. Should be ≥ 0.null if the provided index is invalid.@Nonnegative int getCallbackCount()
boolean hasCallbacks()
true if at least a single callback is present,
false otherwise.void forEach(@Nonnull Consumer<? super CALLBACKTYPE> aConsumer)
forEach in interface Iterable<CALLBACKTYPE extends ICallback>aConsumer - The action to be performed with the respective callback. This method
cannot return a value. May not be null.Copyright © 2014–2017 Philip Helger. All rights reserved.