public class DecimalFormatParser extends NumberFormatParser
NumberFormat
,
Number
,
Serialized FormConstructor and Description |
---|
DecimalFormatParser()
DefaultConstructor, this object is initialized using a DecimalFormat with the default pattern for this locale.
|
Modifier and Type | Method and Description |
---|---|
DecimalFormat |
getDecimalFormat()
Returns the format for the filter.
|
String |
getFormatString()
Synthesizes a pattern string that represents the current state of this Format object.
|
String |
getLocalizedFormatString()
Synthesizes a localized pattern string that represents the current state of this Format object.
|
Object |
getValue(ExpressionRuntime runtime,
ReportElement element)
Returns the formatted string.
|
boolean |
isKeepState()
Defines, whether the filter should keep its state, if a locale change is detected.
|
void |
setDecimalFormat(DecimalFormat format)
Sets the format for the filter.
|
void |
setFormatString(String format)
Applies a format string to the internal
DecimalFormat instance. |
void |
setFormatter(Format format)
Sets the format for the filter.
|
void |
setKeepState(boolean keepState)
Defines, whether the filter should keep its state, if a locale change is detected.
|
void |
setLocalizedFormatString(String format)
Applies a localised format string to the internal
DecimalFormat instance. |
getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberFormat, isGroupingUsed, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setNumberFormat
clone, getDataSource, getFormatter, getNullValue, setDataSource, setNullValue
public DecimalFormatParser()
public DecimalFormat getDecimalFormat()
public void setDecimalFormat(DecimalFormat format)
format
- the format.NullPointerException
- if the given format is null.public void setFormatter(Format format)
setFormatter
in class NumberFormatParser
format
- The format.NullPointerException
- if the given format is nullClassCastException
- if the format is no decimal formatpublic String getFormatString()
public void setFormatString(String format)
DecimalFormat
instance.format
- the format string.public String getLocalizedFormatString()
public void setLocalizedFormatString(String format)
DecimalFormat
instance.format
- the format string.public boolean isKeepState()
public void setKeepState(boolean keepState)
keepState
- set to true, if the locale should not update the DateSymbols, false otherwise.public Object getValue(ExpressionRuntime runtime, ReportElement element)
getValue
in interface DataSource
getValue
in class FormatParser
runtime
- the expression runtime that is used to evaluate formulas and expressions when computing the value of this
filter.element
-