Package org.eclipse.birt.report.engine.api

# Class ReportParameterConverter

java.lang.Object
org.eclipse.birt.report.engine.api.ReportParameterConverter

public class ReportParameterConverter extends Object
Utilites class to convert report paramete value between object and string.

## Constructor Summary

Constructors
Constructor
Description
`ReportParameterConverter(String format, com.ibm.icu.util.ULocale uLocale)`
Constructor.
`ReportParameterConverter(String format, com.ibm.icu.util.ULocale uLocale, com.ibm.icu.util.TimeZone timeZone)`
Constructor.
`ReportParameterConverter(String format, Locale locale)`

## Method Summary

Modifier and Type
Method
Description
`String`
`format(Object reportParameterObj)`
Convert report parameter value object into string.
`Object`
`parse(String reportParameterValue, int parameterValueType)`
Convert report parameter from string into object.
`protected Object`
`parseDateTime(String reportParameterValue)`
Parse the input string to an object.

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

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

## Constructor Details

### ReportParameterConverter

public ReportParameterConverter(String format, Locale locale)

Parameters:
  `format` - format to format report parameter, or recover parameter value as object given a string as report parameter value
  `locale` - the locale to format/parse the parameter value

### ReportParameterConverter

public ReportParameterConverter(String format, com.ibm.icu.util.ULocale uLocale)
Constructor.

Parameters:
  `format` -
  `uLocale` -

### ReportParameterConverter

public ReportParameterConverter(String format, com.ibm.icu.util.ULocale uLocale, com.ibm.icu.util.TimeZone timeZone)
Constructor.

Parameters:
  `format` -
  `uLocale` -
  `timeZone` -

## Method Details

### format

public String format(Object reportParameterObj)
Convert report parameter value object into string.

Parameters:
  `reportParameterObj` - report parameter value object.
Returns:
  parameter value in string.

### parse

public Object parse(String reportParameterValue, int parameterValueType)
Convert report parameter from string into object. Need to be pointed out is it return a Double object when the value type is Float.

Parameters:
  `reportParameterValue` - report parameter value in string.
  `parameterValueType` - report parameter type.
Returns:
  parameter value object.

### parseDateTime

protected Object parseDateTime(String reportParameterValue)
Parse the input string to an object.

Parameters:
  `reportParameterValue` - input string to parse
Returns:
  an object