Package chemaxon.jep
Interface CustomFunction
Base interface for custom Chemical Terms functions.
To call a custom function, add it to the configuration XML passed to the constructors of
Evaluator
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionEvaluates this function.int
Returns the maximum parameter count of this function, orVARARG
if there is no maximum.int
Returns the minimum parameter count of this function.
-
Field Details
-
TRUE
-
FALSE
-
NAN
-
UNDECIDED
-
VARARG
static final int VARARGThe multiplicity that marks a function vararg.- See Also:
-
-
Method Details
-
minParameterCount
int minParameterCount()Returns the minimum parameter count of this function. This method should always return the same value for instances of the same class. -
maxParameterCount
int maxParameterCount()Returns the maximum parameter count of this function, orVARARG
if there is no maximum. This method should always return the same value for instances of the same class. -
evaluate
Object evaluate(Map<String, String> properties, List<Object> parameters, ChemContext context) throws JepExceptionEvaluates this function.- Parameters:
properties
- the properties defined in the configuration XML for this function, never nullparameters
- the actual parameters of this functioncontext
- The chemical context this function is evaluated in. If no context was given during, a dummy object is passed that does not declare any methods or variables, so this parameter is never null.- Returns:
- the result of the function evaluation
- Throws:
JepException
- on error
-