|
Qizx fe-4.4p2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.qizx.api.util.text.SieveBase
com.qizx.api.util.text.FormatNumberSieve
public class FormatNumberSieve
Converts a number using a Java NumberFormat.
Field Summary | |
---|---|
static String |
FORMAT
Name of the parameter used for specifying the format of recognized number values. |
static String |
LOCALE
Name of the parameter used for specifying the locale of parsed dates. |
Constructor Summary | |
---|---|
FormatNumberSieve()
Constructs a sieve that recognizes a number in US format. |
|
FormatNumberSieve(String decimalFormat)
Constructs a sieve that recognizes a particular Decimal format. |
Method Summary | |
---|---|
double |
convert(String value)
Attempts to convert the text fragment to a double value. |
String |
getFormat()
Returns the currently used Date Format. |
void |
setFormat(String numberFormat,
Locale locale)
Sets the format used. |
void |
setParameters(String[] parameters)
Defines optional parameters for the sieve. |
Methods inherited from class com.qizx.api.util.text.SieveBase |
---|
addParameter, getParameters, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.qizx.api.Indexing.Sieve |
---|
getParameters |
Field Detail |
---|
public static final String FORMAT
DecimalFormat
.
public static final String LOCALE
Locale
)
Constructor Detail |
---|
public FormatNumberSieve()
public FormatNumberSieve(String decimalFormat)
decimalFormat
- a format accepted by DecimalFormat
Method Detail |
---|
public void setParameters(String[] parameters) throws DataModelException
Indexing.Sieve
setParameters
in interface Indexing.Sieve
parameters
- an array of even size containing alternately a
parameter name and a parameter value.
DataModelException
- if the option is unknown or the value is
invalid.public void setFormat(String numberFormat, Locale locale)
numberFormat
- a format accepted by DecimalFormat
locale
- if not null, the format is adapted to this localepublic String getFormat()
public double convert(String value)
Indexing.NumberSieve
convert
in interface Indexing.NumberSieve
value
- an alleged numeric value in text form.
|
© 2010 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |