freemarker.core
Class ArithmeticEngine.BigDecimalEngine
java.lang.Object
freemarker.core.ArithmeticEngine
freemarker.core.ArithmeticEngine.BigDecimalEngine
- Enclosing class:
- ArithmeticEngine
public static class ArithmeticEngine.BigDecimalEngine
- extends ArithmeticEngine
This is the default arithmetic engine in FreeMarker. It converts every
number it receives into BigDecimal
, then operates on these
converted BigDecimal
s.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArithmeticEngine.BigDecimalEngine
public ArithmeticEngine.BigDecimalEngine()
compareNumbers
public int compareNumbers(Number first,
Number second)
- Specified by:
compareNumbers
in class ArithmeticEngine
add
public Number add(Number first,
Number second)
- Specified by:
add
in class ArithmeticEngine
subtract
public Number subtract(Number first,
Number second)
- Specified by:
subtract
in class ArithmeticEngine
multiply
public Number multiply(Number first,
Number second)
- Specified by:
multiply
in class ArithmeticEngine
divide
public Number divide(Number first,
Number second)
- Specified by:
divide
in class ArithmeticEngine
modulus
public Number modulus(Number first,
Number second)
- Specified by:
modulus
in class ArithmeticEngine
toNumber
public Number toNumber(String s)
- Specified by:
toNumber
in class ArithmeticEngine