net.sf.jasperreports.engine.util

## Class FormatUtils

- java.lang.Object
- - net.sf.jasperreports.engine.util.FormatUtils

-     public class FormatUtils
      extends java.lang.Object

  Version:
    $Id: FormatUtils.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Narcis Marcu (narcism@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FormatUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Date` | `getFormattedDate(java.text.DateFormat dateFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass)` Creates a date from a string value
    `static java.lang.Number` | `getFormattedNumber(java.text.NumberFormat numberFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass)` Creates a number from a string value

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FormatUtils

          public FormatUtils()

  - ### Method Detail

    - #### getFormattedNumber

          public static java.lang.Number getFormattedNumber(java.text.NumberFormat numberFormat,
                                            java.lang.String fieldValue,
                                            java.lang.Class<?> valueClass)
                                                     throws java.text.ParseException

      Creates a number from a string value
      Parameters:
        `numberFormat` -
        `fieldValue` -
        `valueClass` -
      Returns:
        the number as parsed from the string
      Throws:
        `java.text.ParseException`

    - #### getFormattedDate

          public static java.util.Date getFormattedDate(java.text.DateFormat dateFormat,
                                        java.lang.String fieldValue,
                                        java.lang.Class<?> valueClass)
                                                 throws java.text.ParseException

      Creates a date from a string value
      Parameters:
        `dateFormat` -
        `fieldValue` -
        `valueClass` -
      Returns:
        the date as parsed from the string
      Throws:
        `java.text.ParseException`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com