Class SpringExpressionBiPredicate<T,​U>

  • Type Parameters:
    T - first input type
    U - second input type
    All Implemented Interfaces:
    BiPredicate<T,​U>

    public class SpringExpressionBiPredicate<T,​U>
    extends AbstractSpringExpressionEvaluatorEx
    implements BiPredicate<T,​U>
    Predicate whose condition is defined by an Spring EL expression.
    Since:
    6.1.0
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • inputTypes

        @Nullable
        private Pair<Class<T>,​Class<U>> inputTypes
        Input types.
    • Constructor Detail

      • SpringExpressionBiPredicate

        public SpringExpressionBiPredicate​(@Nonnull @NotEmpty @ParameterName(name="expression")
                                           String expression)
        Constructor.
        Parameters:
        expression - the expression to evaluate
    • Method Detail

      • getInputTypes

        @Nullable
        public Pair<Class<T>,​Class<U>> getInputTypes()
        Get the input type to be enforced.
        Returns:
        input type
      • setInputTypes

        public void setInputTypes​(@Nullable
                                  Pair<Class<T>,​Class<U>> types)
        Set the input types to be enforced.
        Parameters:
        types - the input types
      • setReturnOnError

        public void setReturnOnError​(boolean flag)
        Set value to return if an error occurs.
        Parameters:
        flag - value to return
      • test

        public boolean test​(@Nullable
                            T first,
                            @Nullable
                            U second)
        Specified by:
        test in interface BiPredicate<T,​U>