Package com.helger.commons.callback
Interface ICallbackList<CALLBACKTYPE extends ICallback>
-
- Type Parameters:
CALLBACKTYPE- The callback type.
- All Superinterfaces:
ICommonsIterable<CALLBACKTYPE>,IHasSize,Iterable<CALLBACKTYPE>
- All Known Implementing Classes:
CallbackList
public interface ICallbackList<CALLBACKTYPE extends ICallback> extends ICommonsIterable<CALLBACKTYPE>, IHasSize
Read-only interface for a list ofICallbackobjects.
Note: Does not implement Iterable because the returned iterator would either be an Iterator over the list in which case you can usegetAllCallbacks()directly or the returned Iterator would not be thread-safe and that is not an option for this type.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ICommonsList<CALLBACKTYPE>getAllCallbacks()CALLBACKTYPEgetCallbackAtIndex(int nIndex)Get the callback at the specified index.-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsIterable
containsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstIndex, findFirstMapped, findFirstMapped, findLastIndex, forEachBreakable, forEachByIndex, forEachThrowing, getCount, getCount
-
Methods inherited from interface com.helger.commons.lang.IHasSize
isEmpty, isNotEmpty, size
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getAllCallbacks
@Nonnull @ReturnsMutableCopy ICommonsList<CALLBACKTYPE> getAllCallbacks()
- Returns:
- A list of all callbacks. Never
nulland only containing non-nullelements.
-
getCallbackAtIndex
@Nullable CALLBACKTYPE getCallbackAtIndex(@Nonnegative int nIndex)
Get the callback at the specified index.- Parameters:
nIndex- The index to be retrieved. Should be ≥ 0.- Returns:
nullif the provided index is invalid.
-
-