接口 LambdaSafe.Filter<C,A>

类型参数:
C - the callback type
A - the primary argument type
所有已知实现类:
LambdaSafe.GenericTypeFilter
封闭类:
LambdaSafe
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface static interface LambdaSafe.Filter<C,A>
A filter that can be used to restrict when a callback is used.
  • 方法概要

    修饰符和类型
    方法
    说明
    static <C, A> LambdaSafe.Filter<C,A>
    Return a LambdaSafe.Filter that allows all callbacks to be invoked.
    boolean
    match(Class<C> callbackType, C callbackInstance, A argument, Object[] additionalArguments)
    Determine if the given callback matches and should be invoked.
  • 方法详细资料

    • match

      boolean match(Class<C> callbackType, C callbackInstance, A argument, Object[] additionalArguments)
      Determine if the given callback matches and should be invoked.
      参数:
      callbackType - the callback type (the functional interface)
      callbackInstance - the callback instance (the implementation)
      argument - the primary argument
      additionalArguments - any additional arguments
      返回:
      if the callback matches and should be invoked
    • allowAll

      static <C, A> LambdaSafe.Filter<C,A> allowAll()
      Return a LambdaSafe.Filter that allows all callbacks to be invoked.
      类型参数:
      C - the callback type
      A - the primary argument type
      返回:
      an "allow all" filter