java.lang.Object
omix.mathxp.MathExpression
omix.mathxp.MathOperation
- All Implemented Interfaces:
Cloneable
public class MathOperation extends MathExpression
- Author:
- Dr. Peter Droste
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MathOperation.Operator
-
Constructor Summary
Constructors Constructor Description MathOperation(MathOperation.Operator opt, int startToken, MathExpression val)
MathOperation(MathOperation.Operator opt, MathExpression val)
MathOperation(MathOperation.Operator opt, MathExpression lval, int operatorToken, MathExpression rval)
MathOperation(MathOperation.Operator opt, MathExpression lval, MathExpression rval)
-
Method Summary
Modifier and Type Method Description void
checkUnits(UnitCheckMessageCollectorInterface messageCollector)
MathOperation
clone()
Number
evaluate(Map<?,? extends Number> variables)
Number
getConstantValue()
MathExpression
getLeftValue()
MathOperation.Operator
getOperator()
int
getOperatorToken()
MathExpression
getRightValue()
UnitInterface
getUnit()
boolean
isConstant()
boolean
isEquality()
boolean
isInEquality()
boolean
isValid(List<?> references)
void
setLeftValue(MathExpression leftValue)
void
setOperator(MathOperation.Operator operator)
void
setRightValue(MathExpression rightValue)
String
toNormalizedString()
String
toString()
String
toString(String leftValue, String rightValue)
Methods inherited from class omix.mathxp.MathExpression
checkForDimensionlessUnit, checkForEqualsUnits, equals, getEndToken, getStartToken
-
Constructor Details
-
MathOperation
public MathOperation(MathOperation.Operator opt, MathExpression lval, int operatorToken, MathExpression rval) -
MathOperation
-
MathOperation
-
MathOperation
-
-
Method Details
-
getOperatorToken
public int getOperatorToken() -
getLeftValue
-
getRightValue
-
clone
- Specified by:
clone
in classMathExpression
-
toString
- Specified by:
toString
in classMathExpression
-
toNormalizedString
- Specified by:
toNormalizedString
in classMathExpression
-
toString
-
isEquality
public boolean isEquality() -
isInEquality
public boolean isInEquality() -
getOperator
-
setOperator
-
setLeftValue
-
setRightValue
-
isConstant
public boolean isConstant()- Specified by:
isConstant
in classMathExpression
-
getConstantValue
- Specified by:
getConstantValue
in classMathExpression
-
isValid
- Specified by:
isValid
in classMathExpression
-
evaluate
public Number evaluate(Map<?,? extends Number> variables) throws NotExecutableException, VariableNotFoundException- Specified by:
evaluate
in classMathExpression
- Throws:
NotExecutableException
VariableNotFoundException
-
getUnit
- Specified by:
getUnit
in classMathExpression
-
checkUnits
- Specified by:
checkUnits
in classMathExpression
-