public abstract class FilterFunction extends ConsumerFunction
FilterFunction is a ConsumerFunction that tests input records against some
criteria, returning a boolean result to indicate whether the input passes or fails the test. The result
of any filter can be reversed by setting the not option.
For example:
FilterFunction isA = new IsA(Integer.class);
boolean result = isA.isValid({1}); //result = true
result = isA.isValid({"a"}); //result = false
isA.setNot(true); // flip results
result = isA.isValid({1}); //result = false
result = isA.isValid({"a"}) // result = true
| Constructor and Description |
|---|
FilterFunction() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isValid(Object[] input)
Executes this
FilterFunction with an input record. |
abstract FilterFunction |
statelessClone()
Create a deep copy of this
Function, including any configuration values. |
equals, getInputClasses, hashCode, toStringpublic abstract boolean isValid(Object[] input)
FilterFunction with an input record. Input records should match the types reported by
getInputClasses().input - Input record to test.public abstract FilterFunction statelessClone()
FunctionFunction, including any configuration values. Stateful functions should
have their state initialised.statelessClone in interface FunctionstatelessClone in class ConsumerFunctionFunction.Copyright © 2017. All rights reserved.