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 of ICallback objects.
    Note: Does not implement Iterable because the returned iterator would either be an Iterator over the list in which case you can use getAllCallbacks() directly or the returned Iterator would not be thread-safe and that is not an option for this type.
    Author:
    Philip Helger
    • Method Detail

      • 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:
        null if the provided index is invalid.