Package net.sf.jasperreports.engine.util
Class FormatUtils
- java.lang.Object
-
- net.sf.jasperreports.engine.util.FormatUtils
-
public class FormatUtils extends java.lang.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 java.util.DategetFormattedDate(java.text.DateFormat dateFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass)Creates a date from a string valuestatic java.lang.NumbergetFormattedNumber(java.text.NumberFormat numberFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass)Creates a number from a string value
-
-
-
Method Detail
-
getFormattedNumber
public static java.lang.Number getFormattedNumber(java.text.NumberFormat numberFormat, java.lang.String fieldValue, java.lang.Class<?> valueClass) throws java.text.ParseExceptionCreates 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.ParseExceptionCreates a date from a string value- Parameters:
dateFormat-fieldValue-valueClass-- Returns:
- the date as parsed from the string
- Throws:
java.text.ParseException
-
-