APIdia Launch Partner
Top Description Inners Fields Constructors Methods
io.github.spannm.jackcess.expr

public Class NumericConfig

extends Object
Class Inheritance
Imports
io.github.spannm.jackcess.impl.expr.FormatUtil, .NumberFormatter, java.math.BigDecimal, java.text.DecimalFormatSymbols, java.util.Locale

A NumericConfig encapsulates number formatting options for expression evaluation. The default US_NUMERIC_CONFIG instance provides US specific locale configuration. Databases which have been built for other locales can utilize custom implementations of NumericConfig in order to evaluate expressions correctly.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
private final boolean
private final int
private final NumberFormatter
private final int
private final String
private final String
private final String
private final DecimalFormatSymbols
private final boolean
private final boolean
public static final NumericConfig

Constructor Summary

AccessConstructor and Description
public
NumericConfig(int numDecDigits, boolean incLeadingDigit, boolean useNegParens, boolean useNegCurrencyParens, int numGroupDigits, Locale locale)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the given float formatted according to the current locale config
format
(float f)

Returns the given float formatted according to the current locale config.

public String

Returns:

the given double formatted according to the current locale config
format
(double d)

Returns the given double formatted according to the current locale config.

public String

Returns:

the given BigDecimal formatted according to the current locale config
format
(BigDecimal bd)

Returns the given BigDecimal formatted according to the current locale config.

public DecimalFormatSymbols
public String
public int
public int
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mcurrencyFormatback to summary
private final String mcurrencyFormat
meuroFormatback to summary
private final String meuroFormat
mfixedFormatback to summary
private final String mfixedFormat
mincLeadingDigitback to summary
private final boolean mincLeadingDigit
mnumDecDigitsback to summary
private final int mnumDecDigits
mnumFmtback to summary
private final NumberFormatter mnumFmt
mnumGroupDigitsback to summary
private final int mnumGroupDigits
mpercentFormatback to summary
private final String mpercentFormat
mscientificFormatback to summary
private final String mscientificFormat
mstandardFormatback to summary
private final String mstandardFormat
msymbolsback to summary
private final DecimalFormatSymbols msymbols
museNegCurrencyParensback to summary
private final boolean museNegCurrencyParens
museNegParensback to summary
private final boolean museNegParens
US_NUMERIC_CONFIGback to summary
public static final NumericConfig US_NUMERIC_CONFIG

Constructor Detail

NumericConfigback to summary
public NumericConfig(int numDecDigits, boolean incLeadingDigit, boolean useNegParens, boolean useNegCurrencyParens, int numGroupDigits, Locale locale)

Method Detail

formatback to summary
public String format(float f)

Returns the given float formatted according to the current locale config.

Returns:String

the given float formatted according to the current locale config

formatback to summary
public String format(double d)

Returns the given double formatted according to the current locale config.

Returns:String

the given double formatted according to the current locale config

formatback to summary
public String format(BigDecimal bd)

Returns the given BigDecimal formatted according to the current locale config.

Returns:String

the given BigDecimal formatted according to the current locale config

getDecimalFormatSymbolsback to summary
public DecimalFormatSymbols getDecimalFormatSymbols()
getNumberFormatback to summary
public String getNumberFormat(NumericConfig.Type type)
getNumDecimalDigitsback to summary
public int getNumDecimalDigits()
getNumGroupingDigitsback to summary
public int getNumGroupingDigits()
includeLeadingDigitback to summary
public boolean includeLeadingDigit()
useParensForCurrencyNegativesback to summary
public boolean useParensForCurrencyNegatives()
useParensForNegativesback to summary
public boolean useParensForNegatives()
io.github.spannm.jackcess.expr back to summary

public final Enum NumericConfig.Type

extends Enum<NumericConfig.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final NumericConfig.Type
public static final NumericConfig.Type
public static final NumericConfig.Type
public static final NumericConfig.Type
public static final NumericConfig.Type
public static final NumericConfig.Type

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static NumericConfig.Type
public static NumericConfig.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CURRENCYback to summary
public static final NumericConfig.Type CURRENCY
EUROback to summary
public static final NumericConfig.Type EURO
FIXEDback to summary
public static final NumericConfig.Type FIXED
PERCENTback to summary
public static final NumericConfig.Type PERCENT
SCIENTIFICback to summary
public static final NumericConfig.Type SCIENTIFIC
STANDARDback to summary
public static final NumericConfig.Type STANDARD

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static NumericConfig.Type valueOf(String name)
valuesback to summary
public static NumericConfig.Type[] values()