Package org.microspace.evaluator
Class ExpressionLiteral
- java.lang.Object
-
- org.microspace.evaluator.ExpressionLiteral
-
- All Implemented Interfaces:
Serializable
,Expression
public class ExpressionLiteral extends Object implements Expression
A literal expression.- Version:
- 2017-10-16
- Author:
- Gaspar Sinai - gaspar.sinai@microspace.org
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExpressionLiteral(BigDecimal value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimal
calculate(int scale)
void
clear()
String
format(EvaluatorFormat format, int scale, int accuracy)
void
setNeedsBracket(boolean needsBracket)
void
setVariable(String variable, BigDecimal value, String alias)
-
-
-
Constructor Detail
-
ExpressionLiteral
public ExpressionLiteral(BigDecimal value)
-
-
Method Detail
-
setVariable
public void setVariable(String variable, BigDecimal value, String alias)
- Specified by:
setVariable
in interfaceExpression
-
clear
public void clear()
- Specified by:
clear
in interfaceExpression
-
calculate
public BigDecimal calculate(int scale)
- Specified by:
calculate
in interfaceExpression
-
format
public String format(EvaluatorFormat format, int scale, int accuracy)
- Specified by:
format
in interfaceExpression
-
setNeedsBracket
public void setNeedsBracket(boolean needsBracket)
- Specified by:
setNeedsBracket
in interfaceExpression
-
-