Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.util
Class DecimalFormatCache

    java.lang.Object
      org.apache.fop.util.DecimalFormatCache

public class DecimalFormatCache
extends java.lang.Object

This class provides a cache for `DecimalFormat` instance. `DecimalFormat` itself is not thread-safe but since FOP needs to format a lot of numbers the same way, it shall be cached in a `ThreadLocal`.

Constructor Summary
`DecimalFormatCache()`

Method Summary
`static java.text.DecimalFormat` | `getDecimalFormat(int dec)` Returns a cached `DecimalFormat` instance for the given number of decimal digits.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DecimalFormatCache

    public DecimalFormatCache()

Method Detail

### getDecimalFormat

    public static java.text.DecimalFormat getDecimalFormat(int dec)

  Returns a cached `DecimalFormat` instance for the given number of decimal digits.

  Parameters:
    `dec` - the number of decimal digits.
  Returns:
    the DecimalFormat instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.