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 SummaryFieldsModifier and TypeFieldDescriptionstatic final DoublePossible result with the value of 0.0.static final DoublePossible result with the value ofDouble.NaN.static final DoublePossible result with the value of 1.0.static final ObjectSpecial result value which will propagate through the call chain of Chemical Terms functions and will be returned by the methods ofChemJEP.static final intThe multiplicity that marks a function vararg.
- 
Method SummaryModifier and TypeMethodDescriptionEvaluates this function.intReturns the maximum parameter count of this function (a non-negative integer), orVARARGif there is no maximum.intReturns the minimum parameter count of this function (a non-negative integer).
- 
Field Details- 
TRUEPossible result with the value of 1.0. Represents the logical value "true" in a Chemical Terms evaluation.
- 
FALSEPossible result with the value of 0.0. Represents the logical value "false" in a Chemical Terms evaluation.
- 
NANPossible result with the value ofDouble.NaN.
- 
UNDECIDEDSpecial result value which will propagate through the call chain of Chemical Terms functions and will be returned by the methods ofChemJEP. Converted toChemJEP.UNDECIDEDbyChemJEP.getLogicalValue(Object).
- 
VARARGstatic final int VARARGThe multiplicity that marks a function vararg.- See Also:
 
 
- 
- 
Method Details- 
minParameterCountint minParameterCount()Returns the minimum parameter count of this function (a non-negative integer). This method should always return the same value for instances of the same class.
- 
maxParameterCountint maxParameterCount()Returns the maximum parameter count of this function (a non-negative integer), orVARARGif there is no maximum. This method should always return the same value if called on the same object.
- 
evaluateObject 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 null.
- parameters- The actual parameters of this function. Never null, but may contain nulls.
- context- The chemical context this function is evaluated in. If no context was given for the current evaluation, a dummy object is passed that does not support any functions or variables (its methods always return null), so this parameter is never null.
- Returns:
- the result of the function evaluation
- Throws:
- JepException- on error
 
 
-