title: How to format decimal numbers with StringTemplate (ST) in Java?
body: <p>I am using StringTemplate in Java. </p>
  
  <p>I would like to render decimal number with a certain precision (e.g. 3 digits after the decimal point). </p>
  
  <p>Is it possible to for the ST object to do it? And how? </p>
  
  <p>Edit: 
  to clarify, this is especially relevant when rendering objects. E.g. my code looks like</p>
  
  <pre><code>String renderMe(String template, Collection&lt;MyClass&gt; items)
  {
    // render the items here using the template.... 
  }
  </code></pre>
  
  <p>renderMe() doesn't have to know anything about the fields of MyClass, in particular it doesn't have to know which fields are floating points. I am looking for a solution that maintains this decoupling.  </p>