Package net.sourceforge.plantuml.jasic
Class Jasic.NumberValue
java.lang.Object
net.sourceforge.plantuml.jasic.Jasic.NumberValue
- All Implemented Interfaces:
Jasic.Expression
,Jasic.Value
- Enclosing class:
- Jasic
A numeric value. Jasic uses doubles internally for all numbers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate()
Expression classes implement this to evaluate the expression and return the value.double
toNumber()
Value types override this to convert themselves to a numeric representation.toString()
Value types override this to convert themselves to a string representation.
-
Constructor Details
-
NumberValue
public NumberValue(double value)
-
-
Method Details
-
toString
Description copied from interface:Jasic.Value
Value types override this to convert themselves to a string representation.- Specified by:
toString
in interfaceJasic.Value
- Overrides:
toString
in classObject
-
toNumber
public double toNumber()Description copied from interface:Jasic.Value
Value types override this to convert themselves to a numeric representation.- Specified by:
toNumber
in interfaceJasic.Value
-
evaluate
Description copied from interface:Jasic.Expression
Expression classes implement this to evaluate the expression and return the value.- Specified by:
evaluate
in interfaceJasic.Expression
- Returns:
- The value of the calculated expression.
-