Package net.sourceforge.plantuml.evalex
Class AbstractFunction
- java.lang.Object
-
- net.sourceforge.plantuml.evalex.AbstractLazyFunction
-
- net.sourceforge.plantuml.evalex.AbstractFunction
-
- All Implemented Interfaces:
Function,LazyFunction
- Direct Known Subclasses:
Expression.Function
public abstract class AbstractFunction extends AbstractLazyFunction implements Function
Abstract implementation of a direct function.
This abstract implementation does implement lazyEval so that it returns the result of eval.
-
-
Field Summary
-
Fields inherited from class net.sourceforge.plantuml.evalex.AbstractLazyFunction
booleanFunction, name, numParams
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFunction(java.lang.String name, int numParams)Creates a new function with given name and parameter count.protectedAbstractFunction(java.lang.String name, int numParams, boolean booleanFunction)Creates a new function with given name and parameter count.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression.LazyNumberlazyEval(java.util.List<Expression.LazyNumber> lazyParams)Lazily evaluate this function.-
Methods inherited from class net.sourceforge.plantuml.evalex.AbstractLazyFunction
getName, getNumParams, isBooleanFunction, numParamsVaries
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.plantuml.evalex.LazyFunction
getName, getNumParams, isBooleanFunction, numParamsVaries
-
-
-
-
Constructor Detail
-
AbstractFunction
protected AbstractFunction(java.lang.String name, int numParams)Creates a new function with given name and parameter count.- Parameters:
name- The name of the function.numParams- The number of parameters for this function.-1denotes a variable number of parameters.
-
AbstractFunction
protected AbstractFunction(java.lang.String name, int numParams, boolean booleanFunction)Creates a new function with given name and parameter count.- Parameters:
name- The name of the function.numParams- The number of parameters for this function.-1denotes a variable number of parameters.booleanFunction- Whether this function is a boolean function.
-
-
Method Detail
-
lazyEval
public Expression.LazyNumber lazyEval(java.util.List<Expression.LazyNumber> lazyParams)
Description copied from interface:LazyFunctionLazily evaluate this function.- Specified by:
lazyEvalin interfaceLazyFunction- Parameters:
lazyParams- The accepted parameters.- Returns:
- The lazy result of this function.
-
-