net.sf.jasperreports.engine.util
Class FormatUtils

java.lang.Object
  extended by net.sf.jasperreports.engine.util.FormatUtils

public class FormatUtils
extends Object

Version:
$Id: FormatUtils.java 4808 2011-11-21 13:44:22Z lucianc $
Author:
Narcis Marcu (narcism@users.sourceforge.net)

Constructor Summary
FormatUtils()
           
 
Method Summary
static Date getFormattedDate(DateFormat dateFormat, String fieldValue, Class<?> valueClass)
          Creates a date from a string value
static Number getFormattedNumber(NumberFormat numberFormat, String fieldValue, 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 Number getFormattedNumber(NumberFormat numberFormat,
                                        String fieldValue,
                                        Class<?> valueClass)
                                 throws ParseException
Creates a number from a string value

Parameters:
numberFormat -
fieldValue -
valueClass -
Returns:
the number as parsed from the string
Throws:
ParseException

getFormattedDate

public static Date getFormattedDate(DateFormat dateFormat,
                                    String fieldValue,
                                    Class<?> valueClass)
                             throws ParseException
Creates a date from a string value

Parameters:
dateFormat -
fieldValue -
valueClass -
Returns:
the date as parsed from the string
Throws:
ParseException


Copyright © 2012. All Rights Reserved.