org.shapelogic.scripting
Class FunctionPredicate<In>
java.lang.Object
org.shapelogic.scripting.BaseScriptingFunction
org.shapelogic.scripting.FunctionPredicate<In>
- All Implemented Interfaces:
- Calc1<In,java.lang.Object>, Predicate<In>
public class FunctionPredicate<In>
- extends BaseScriptingFunction
- implements Predicate<In>, Calc1<In,java.lang.Object>
Transform based on an expression in a Scripting language using JSR 223.
Requires Groovy to be installed. Need special installation of groovy-engine.jar
that need to be downloade from Sun.
Requires that the scripting language support the invocable interface.
- Author:
- Sami Badawi
Constructor Summary |
FunctionPredicate(java.lang.String name,
java.lang.String expression)
|
FunctionPredicate(java.lang.String functionName,
java.lang.String expression,
java.lang.String language)
|
Method Summary |
boolean |
evaluate(In input)
Checks if a binary predicate relation holds. |
java.lang.Object |
invoke(In input)
|
static
|
makeFunctionPredicate(java.lang.String expression,
BinaryPredicate<In1,In2> binaryPredicate,
In2 compareObject,
java.lang.String language,
java.lang.String functionName)
|
static
|
makeFunctionPredicate(java.lang.String expression,
java.lang.String binaryPredicateString,
In2 compareObject,
java.lang.String language,
java.lang.String functionName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FunctionPredicate
public FunctionPredicate(java.lang.String functionName,
java.lang.String expression,
java.lang.String language)
FunctionPredicate
public FunctionPredicate(java.lang.String name,
java.lang.String expression)
invoke
public java.lang.Object invoke(In input)
- Specified by:
invoke
in interface Calc1<In,java.lang.Object>
evaluate
public boolean evaluate(In input)
- Description copied from interface:
Predicate
- Checks if a binary predicate relation holds.
- Specified by:
evaluate
in interface Predicate<In>
makeFunctionPredicate
public static <In0,In1,In2> Predicate<In0> makeFunctionPredicate(java.lang.String expression,
BinaryPredicate<In1,In2> binaryPredicate,
In2 compareObject,
java.lang.String language,
java.lang.String functionName)
makeFunctionPredicate
public static <In0,In1,In2> Predicate<In0> makeFunctionPredicate(java.lang.String expression,
java.lang.String binaryPredicateString,
In2 compareObject,
java.lang.String language,
java.lang.String functionName)
Copyright © 2009. All Rights Reserved.