Home » freemarker-2.3.13 » freemarker.template.utility » [javadoc | source]
public class: OptimizerUtil [javadoc | source]
Method from freemarker.template.utility.OptimizerUtil Summary:
optimizeListStorage,   optimizeNumberRepresentation
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.template.utility.OptimizerUtil Detail:
 public static List optimizeListStorage(List list) 
 public static Number optimizeNumberRepresentation(Number number) 
    This is needed to reverse the extreme conversions in arithmetic operations so that numbers can be meaningfully used with models that don't know what to do with a BigDecimal. Of course, this will make impossible for these models (i.e. Jython) to receive a BigDecimal even if it was originally placed as such in the data model. However, since arithmetic operations aggressively erase the information regarding the original number type, we have no other choice to ensure expected operation in majority of cases.