| java.lang.Object freemarker.core.ArithmeticEngine
ArithmeticEngine | abstract public class ArithmeticEngine (Code) | | Class to perform arithmetic operations.
author: Jonathan Revusky author: Attila Szegedi |
Field Summary | |
final public static BigDecimalEngine | BIGDECIMAL_ENGINE Arithmetic engine that converts all numbers to
BigDecimal and
then operates on them. | final public static ConservativeEngine | CONSERVATIVE_ENGINE Arithmetic engine that uses (more-or-less) the widening conversions of
Java language to determine the type of result of operation, instead of
converting everything to BigDecimal up front. | protected int | maxScale | protected int | minScale | protected int | roundingPolicy |
BIGDECIMAL_ENGINE | final public static BigDecimalEngine BIGDECIMAL_ENGINE(Code) | | Arithmetic engine that converts all numbers to
BigDecimal and
then operates on them. This is FreeMarker's default arithmetic engine.
|
CONSERVATIVE_ENGINE | final public static ConservativeEngine CONSERVATIVE_ENGINE(Code) | | Arithmetic engine that uses (more-or-less) the widening conversions of
Java language to determine the type of result of operation, instead of
converting everything to BigDecimal up front.
|
maxScale | protected int maxScale(Code) | | |
minScale | protected int minScale(Code) | | |
roundingPolicy | protected int roundingPolicy(Code) | | |
setMaxScale | public void setMaxScale(int maxScale)(Code) | | Sets the maximal scale to use when multiplying BigDecimal numbers.
Default value is 100.
|
setMinScale | public void setMinScale(int minScale)(Code) | | Sets the minimal scale to use when dividing BigDecimal numbers. Default
value is 12.
|
setRoundingPolicy | public void setRoundingPolicy(int roundingPolicy)(Code) | | |
|
|