|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.filter.FormatParser
com.jrefinery.report.filter.NumberFormatParser
A filter that parses the numeric value from a data source string into a number representation.
This filter will parse the string obtained from the datasource into a java.lang.Number objects using a java.text.NumericFormat.
If the object read from the datasource is no number, the NullValue defined by setNullValue(Object) is returned.
NumberFormat
,
Serialized FormConstructor Summary | |
NumberFormatParser()
Default constructor. |
Method Summary | |
int |
getMaximumFractionDigits()
Returns the maximum number of fraction digits. |
int |
getMaximumIntegerDigits()
Returns the maximum number of integer digits. |
int |
getMinimumFractionDigits()
Returns the minimum number of fraction digits. |
int |
getMinimumIntegerDigits()
Returns the minimum number of integer digits. |
java.text.NumberFormat |
getNumberFormat()
Returns the number format. |
boolean |
isGroupingUsed()
Returns the value of the grouping flag for the current number format. |
protected boolean |
isValidOutput(java.lang.Object o)
Checks whether the given value is already a valid result. |
void |
setFormatter(java.text.Format f)
Sets the formatter. |
void |
setGroupingUsed(boolean newValue)
Turns grouping on or off for the current number format. |
void |
setMaximumFractionDigits(int newValue)
Sets the maximum number of fraction digits for the current number format. |
void |
setMaximumIntegerDigits(int newValue)
Sets the maximum number of digits in the integer part of the current number format. |
void |
setMinimumFractionDigits(int newValue)
Sets the minimum number of fraction digits for the current number format. |
void |
setMinimumIntegerDigits(int newValue)
Sets the minimum number of digits in the integer part of the current number format. |
void |
setNumberFormat(java.text.NumberFormat nf)
Sets the number format. |
Methods inherited from class com.jrefinery.report.filter.FormatParser |
clone, getDataSource, getFormatter, getNullValue, getValue, setDataSource, setNullValue |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NumberFormatParser()
Uses a general number format for the current locale.
Method Detail |
public void setNumberFormat(java.text.NumberFormat nf)
nf
- The number format.public java.text.NumberFormat getNumberFormat()
public void setFormatter(java.text.Format f)
setFormatter
in class FormatParser
f
- The format.public void setGroupingUsed(boolean newValue)
newValue
- The new value of the grouping flag.public boolean isGroupingUsed()
public void setMaximumFractionDigits(int newValue)
newValue
- The number of digits.public int getMaximumFractionDigits()
public void setMaximumIntegerDigits(int newValue)
newValue
- The number of digits.public int getMaximumIntegerDigits()
public void setMinimumFractionDigits(int newValue)
newValue
- The number of digits.public int getMinimumFractionDigits()
public void setMinimumIntegerDigits(int newValue)
newValue
- The number of digits.public int getMinimumIntegerDigits()
protected boolean isValidOutput(java.lang.Object o)
isValidOutput
in class FormatParser
o
- the value to parse.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |