Class JavaScriptDslPredicate<T>

java.lang.Object
org.apache.camel.quarkus.dsl.js.runtime.JavaScriptDslPredicate<T>
Type Parameters:
T - the type of the input to the predicate
All Implemented Interfaces:
Predicate<T>

public final class JavaScriptDslPredicate<T> extends Object implements Predicate<T>
JavaScriptDslPredicate is meant to be used as type of Predicate from a JavaScript file to remain compatible with the native mode that doesn't support the function Java.extend.
  • Constructor Details

    • JavaScriptDslPredicate

      public JavaScriptDslPredicate(CharSequence source)
      Construct a JavaScriptDslPredicate with the given source and t as argument name.
      Parameters:
      source - the source of the predicate.
    • JavaScriptDslPredicate

      public JavaScriptDslPredicate(String argumentName, CharSequence source)
      Construct a JavaScriptDslPredicate with the given source and argument name.
      Parameters:
      source - the source of the predicate.
  • Method Details

    • test

      public boolean test(T t)
      Specified by:
      test in interface Predicate<T>