[]
An OperatorNode is a non-terminal syntax node whose operator type is defined by an OperatorKind. Use this class to inspect or modify the operator associated with an expression node.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("IF(A1<100000,A1*5%,A1*7.5%)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
OperatorNode operatorNode = (OperatorNode) functionNode.getChildren().get(0);
OperatorKind kind = operatorNode.getKind();
OperatorNode(OperatorKind kind) OperatorNode from the type of the operator.final OperatorKindgetKind()final voidsetKind(OperatorKind value) getChildrenOperatorNode from the type of the operator.This constructor initializes the node with the specified OperatorKind.
kind - The type of the operator.Returns the OperatorKind currently associated with this OperatorNode.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("IF(A1<100000,A1*5%,A1*7.5%)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
OperatorNode operatorNode = (OperatorNode) functionNode.getChildren().get(0);
OperatorKind kind = operatorNode.getKind();
Use this method to change the OperatorKind associated with this OperatorNode after it has been created.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("A1<100000");
OperatorNode operatorNode = (OperatorNode) syntaxTree.getRoot();
operatorNode.setKind(OperatorKind.LessThanOrEqual);
String formulaText = syntaxTree.toString();
value - The operator type to assign to this node. May be null.