com.singularsys.jep.configurableparser
Class TernaryOperator
java.lang.Object
com.singularsys.jep.Operator
com.singularsys.jep.configurableparser.TernaryOperator
- All Implemented Interfaces:
- java.io.Serializable
public class TernaryOperator
- extends Operator
A class representing a ternary operator, for example x?y:z.
- Author:
- Richard Morris
- See Also:
- Serialized Form
Fields inherited from class com.singularsys.jep.Operator |
ASSOCIATIVE, BINARY, COMMUTATIVE, COMPOSITE, EQUIVALENCE, LEFT, NARY, NO_ARGS, NOT_IN_PARSER, PREFIX, REFLEXIVE, RIGHT, SELF_INVERSE, SUFFIX, SYMMETRIC, TERNARY, TRANSITIVE, UNARY, USE_BINDING_FOR_PRINT |
Methods inherited from class com.singularsys.jep.Operator |
addAltSymbol, getAltSymbols, getBinaryInverseOp, getBinding, getFlags, getInverseOp, getKey, getName, getPFMC, getPrecedence, getRootOp, getSymbol, isAssociative, isBinary, isCommutative, isComposite, isDistributiveOver, isEquivalence, isLeftBinding, isNary, isPrefix, isReflexive, isRightBinding, isSelfInverse, isSuffix, isSymmetric, isTernary, isTransitive, isUnary, notInParser, numArgs, setBinaryInverseOp, setDistributiveOver, setFlag, setInverseOp, setKey, setPFMC, setRootOp, setSymbol, toFullString, toString, useBindingForPrint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TernaryOperator
public TernaryOperator(java.lang.String name,
java.lang.String lhsSymbol,
java.lang.String rhsSymbol,
PostfixMathCommandI pfmc,
int flags)
TernaryOperator
public TernaryOperator(java.lang.String name,
java.lang.String lhsSymbol,
java.lang.String rhsSymbol,
PostfixMathCommandI pfmc,
int flags,
int precedence)
getRhsSymbol
public java.lang.String getRhsSymbol()
getRhsOperator
public TernaryOperator.RhsTernaryOperator getRhsOperator()
setPrecedence
public void setPrecedence(int i)
- Description copied from class:
Operator
- Set the precedence of the operator.
Lower values correspond to tighter binding, that is * gives a lower value than + and 1+2*3 is 1+(2*3).
- Overrides:
setPrecedence
in class Operator
Copyright © 2010 Singular Systems http://www.singularsys.com/jep