public class IfElseMacro extends java.lang.Object implements MacroDeclarations, Macro
ifelse function.
The ifelse macro can be used as follows:
ifelse(condition, ifpart, elsepart)
Whith the following constraints:
ifelse(A < B, true, A = B)ifelse(A = B, 4.0^2, 1/5)ifelse(A > B, 'bigger', 'smaller')| Constructor and Description |
|---|
IfElseMacro() |
public boolean hasMacro(java.lang.String name)
hasMacro in interface MacroDeclarationsname - name of the macropublic Macro getMacro(java.lang.String name)
MacroDeclarations applies here too.getMacro in interface MacroDeclarationsname - name of the macropublic Node evaluate(Node... params) throws SemanticException
evaluate in interface Macroparams - the parametersSemanticException