Package net.sf.jasperreports.engine.util
Class FormatUtils
- java.lang.Object
-
- net.sf.jasperreports.engine.util.FormatUtils
-
public class FormatUtils extends Object
- Author:
- Narcis Marcu (narcism@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description FormatUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Date
getFormattedDate(DateFormat dateFormat, String fieldValue, Class<?> valueClass)
Creates a date from a string valuestatic Number
getFormattedNumber(NumberFormat numberFormat, String fieldValue, Class<?> valueClass)
Creates a number from a string value
-
-
-
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
-
-