public class TernaryOperator extends Operator
TernaryOperator
and the
inner class RhsTernaryOperator
.Modifier and Type | Class and Description |
---|---|
class |
TernaryOperator.RhsTernaryOperator
Inner class used to represent the right hand operator.
|
ASSOCIATIVE, BINARY, COMMUTATIVE, COMPOSITE, EQUIVALENCE, flags, key, LEFT, name, NARY, NO_ARGS, NOT_IN_PARSER, pfmc, precedence, PREFIX, printSymbol, REFLEXIVE, RIGHT, SELF_INVERSE, SUFFIX, symbol, SYMMETRIC, TERNARY, TRANSITIVE, UNARY, USE_BINDING_FOR_PRINT
Constructor and Description |
---|
TernaryOperator(java.lang.String name,
java.lang.String lhsSymbol,
java.lang.String rhsSymbol,
PostfixMathCommandI pfmc,
int flags)
Create a Ternary operator.
|
TernaryOperator(java.lang.String name,
java.lang.String lhsSymbol,
java.lang.String rhsSymbol,
PostfixMathCommandI pfmc,
int flags,
int precedence)
Create a Ternary operator
|
Modifier and Type | Method and Description |
---|---|
TernaryOperator.RhsTernaryOperator |
getRhsOperator() |
java.lang.String |
getRhsSymbol()
Get symbol used to for righthand operator
|
void |
setPrecedence(int i)
Set the precedence of the operator.
|
addAltSymbol, getAltSymbols, getBinaryInverseOp, getBinding, getFlags, getInverseOp, getKey, getName, getPFMC, getPrecedence, getPrintSymbol, 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, setPrintSymbol, setRootOp, setSymbol, toFullString, toString, useBindingForPrint
public TernaryOperator(java.lang.String name, java.lang.String lhsSymbol, java.lang.String rhsSymbol, PostfixMathCommandI pfmc, int flags)
name
- verbose name for operatorlhsSymbol
- symbol for left hand operator, typically "?"rhsSymbol
- symbol for right hand operator, typically ":"pfmc
- function implementing the operation, typically TernaryConditional
flags
- status flags, typically Operator.TERNARY
public TernaryOperator(java.lang.String name, java.lang.String lhsSymbol, java.lang.String rhsSymbol, PostfixMathCommandI pfmc, int flags, int precedence)
name
- verbose name for operatorlhsSymbol
- symbol for left hand operator, typically "?"rhsSymbol
- symbol for right hand operator, typically ":"pfmc
- function implementing the operation, typically TernaryConditional
flags
- status flags, typically Operator.TERNARY
precedence
- precedence levelpublic java.lang.String getRhsSymbol()
public TernaryOperator.RhsTernaryOperator getRhsOperator()
public void setPrecedence(int i)
Operator
setPrecedence
in class Operator
i
- the precedenceCopyright © 2018 Singular Systems http://www.singularsys.com/jep