Class MapPfmc
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.NaryFunction
com.singularsys.jep.misc.dictionary.MapPfmc
- All Implemented Interfaces:
PostfixMathCommandI,PrintVisitor.PrintRulesI,Serializable
PostfixMathCommand for creating a
Map.
Parsing {'x':2, 'y':3}
produces an ASTOpNode with the MapPfmc,
each child is another ASTOpNode with the MapPfmc.MapEntryPfmc
and two children, the key and value.
Evaluating each child results in an MapPfmc.Entry record,
these are added to a Map that is returned by
evaluating the top node.- Since:
- Jep 4.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordValue returned for an individual map entry.static classPostfixMathCommand for individual entries -
Field Summary
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.jep.functions.NaryFunction
runMethods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Constructor Details
-
MapPfmc
public MapPfmc()
-
-
Method Details
-
eval
Description copied from class:NaryFunctionEvaluate the function- Specified by:
evalin classNaryFunction- Parameters:
args- arguments to the function- Returns:
- value returned by the function
- Throws:
EvaluationException- if the calculation cannot be performed
-
append
Description copied from interface:PrintVisitor.PrintRulesIThe method called to append data for the rule.- Specified by:
appendin interfacePrintVisitor.PrintRulesI- Parameters:
node- the node to printpv- the PrintVisitor- Throws:
JepException- on error
-