Class ScriptFilter<V>

    • Constructor Detail

      • ScriptFilter

        public ScriptFilter()
        Default constructor for deserialization.
      • ScriptFilter

        public ScriptFilter​(String language,
                            String name,
                            Object... args)
        Create a Filter that wraps the specified script.
        Parameters:
        language - the language the script is written. Currently, only "js" (for JavaScript) is supported
        name - the name of the Filter that needs to be evaluated
        args - the arguments to be passed to the script during evaluation
    • Method Detail

      • evaluate

        public boolean evaluate​(V entry)
        Description copied from interface: Filter
        Apply the test to the input argument.
        Specified by:
        evaluate in interface Filter<V>
        Parameters:
        entry - the input argument to evaluate
        Returns:
        true if the input argument matches the filter, otherwise false