Top Inners Fields Constructors Methods
com.ibm.icu.impl.number

public Class DecimalFormatProperties

extends Object
implements Cloneable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.lang.Cloneable
Imports
java.io.IOException, .ObjectInputStream, .ObjectOutputStream, .Serializable, java.lang.reflect.Field, .Modifier, java.math.BigDecimal, .MathContext, .RoundingMode, java.text.ParsePosition, java.util.ArrayList, .Map, com.ibm.icu.impl.number.Padder.PadPosition, com.ibm.icu.text.CompactDecimalFormat.CompactStyle, .CurrencyPluralInfo, .PluralRules, com.ibm.icu.util.Currency, .Currency.CurrencyUsage

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DecimalFormatProperties.ParseMode

Controls the set of rules for parsing a string from the old DecimalFormat API.

Field Summary

Modifier and TypeField and Description
private transient Map<String, Map<String, String>>
private transient CompactDecimalFormat.CompactStyle
private transient Currency
private transient boolean
private transient CurrencyPluralInfo
private transient Currency.CurrencyUsage
private transient boolean
private transient boolean
private static final DecimalFormatProperties
private transient boolean
private transient int
private transient int
private transient boolean
private transient int
private transient MathContext
private transient int
private transient int
private transient int
private transient int
private transient int
private transient int
private transient int
private transient int
private transient BigDecimal
private transient String
private transient String
private transient String
private transient String
private transient Padder.PadPosition
private transient String
private transient boolean
private transient boolean
private transient DecimalFormatProperties.ParseMode
private transient boolean
private transient boolean
private transient PluralRules
private transient String
private transient String
private transient String
private transient String
private transient BigDecimal
private transient RoundingMode
private transient int
private static final long
serialVersionUID

Auto-generated.

private transient boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private DecimalFormatProperties

Returns:

The property bag, for chaining.
_clear
()

Sets all properties to their defaults (unset).

private DecimalFormatProperties
private boolean
private boolean
_equalsHelper(boolean mine, boolean theirs)

private boolean
_equalsHelper(int mine, int theirs)

private boolean
_equalsHelper(Object mine, Object theirs)

private int
private int
_hashCodeHelper(boolean value)

private int
_hashCodeHelper(int value)

private int
public DecimalFormatProperties
public DecimalFormatProperties
clone()

Overrides java.lang.Object.clone.

Creates and returns a shallow copy of the property bag.
public DecimalFormatProperties

Returns:

The current property bag (the one modified by this operation), for chaining.
copyFrom
(DecimalFormatProperties
The property bag from which to copy and which will not be modified.
other
)

Shallow-copies the properties from the given property bag into this property bag.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public Map<String, Map<String, String>>
public CompactDecimalFormat.CompactStyle
public Currency
public boolean
public CurrencyPluralInfo
public Currency.CurrencyUsage
public boolean
public boolean
public boolean
public int
public int
public boolean
public int
public MathContext
public int
public int
public int
public int
public int
public int
public int
public int
public BigDecimal
public String
public String
public String
public String
public Padder.PadPosition
public String
public boolean
public boolean
public DecimalFormatProperties.ParseMode
public boolean
public boolean
public PluralRules
public String
public String
public String
public String
public BigDecimal
public RoundingMode
public int
public boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
private void
readObject(ObjectInputStream ois)

Custom serialization: re-create object from serialized properties.

pack-priv void
public DecimalFormatProperties

Returns:

The property bag, for chaining.
setCompactCustomData
(Map<String, Map<String, String>>
A map with the above structure.
compactCustomData
)

Specifies custom data to be used instead of CLDR data when constructing a CompactDecimalFormat.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setCompactStyle
(CompactDecimalFormat.CompactStyle
The style of prefixes/suffixes to append.
compactStyle
)

Use compact decimal formatting with the specified CompactStyle.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setCurrency
(Currency
The currency.
currency
)

Use the specified currency to substitute currency placeholders ('¤') in the pattern string.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setCurrencyAsDecimal
(boolean
Whether the currency symbol should replace the decimal separator.
currencyAsDecimal
)

Sets whether the currency symbol should replace the decimal separator.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setCurrencyPluralInfo
(CurrencyPluralInfo
The currency plural info object.
currencyPluralInfo
)

Use the specified CurrencyPluralInfo instance when formatting currency long names.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setCurrencyUsage
(Currency.CurrencyUsage
The currency usage. Defaults to CurrencyUsage.STANDARD.
currencyUsage
)

Use the specified CurrencyUsage instance, which provides default rounding rules for the currency in two styles, CurrencyUsage.CASH and CurrencyUsage.STANDARD.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setDecimalPatternMatchRequired
(boolean
true to set an error if decimal is not present
decimalPatternMatchRequired
)

PARSING: Whether to require that the presence of decimal point matches the pattern.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setDecimalSeparatorAlwaysShown
(boolean
Whether to show the decimal point when it is optional.
alwaysShowDecimal
)

Sets whether to always show the decimal point, even if the number doesn't require one.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setExponentSignAlwaysShown
(boolean
Whether to show the plus sign in positive exponents.
exponentSignAlwaysShown
)

Sets whether to show the plus sign in the exponent part of numbers with a zero or positive exponent.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setFormatWidth
(int
The output width.
paddingWidth
)

Sets the minimum width of the string output by the formatting pipeline.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setGroupingSize
(int
The primary grouping size.
groupingSize
)

Sets the number of digits between grouping separators.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setGroupingUsed
(boolean
true to enable the display of grouping separators; false to disable.
groupingUsed
)

Sets whether to enable grouping when formatting.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMagnitudeMultiplier
(int
The number of powers of ten to scale.
magnitudeMultiplier
)

Multiply all numbers by this power of ten before formatting.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMathContext
(MathContext
The math context to use when rounding is required.
mathContext
)

Sets the MathContext to be used during math and rounding operations.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMaximumFractionDigits
(int
The maximum number of fraction digits to output.
maximumFractionDigits
)

Sets the maximum number of digits to display after the decimal point.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMaximumIntegerDigits
(int
The maximum number of integer digits to output.
maximumIntegerDigits
)

Sets the maximum number of digits to display before the decimal point.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMaximumSignificantDigits
(int
The maximum number of significant digits to display.
maximumSignificantDigits
)

Sets the maximum number of significant digits to display.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMinimumExponentDigits
(int
The minimum number of digits to display in the exponent field.
minimumExponentDigits
)

Sets the minimum number of digits to display in the exponent.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMinimumFractionDigits
(int
The minimum number of fraction digits to output.
minimumFractionDigits
)

Sets the minimum number of digits to display after the decimal point.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMinimumGroupingDigits
(int
How many digits must appear before a grouping separator before enabling grouping.
minimumGroupingDigits
)

Sets the minimum number of digits required to be beyond the first grouping separator in order to enable grouping.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMinimumIntegerDigits
(int
The minimum number of integer digits to output.
minimumIntegerDigits
)

Sets the minimum number of digits to display before the decimal point.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMinimumSignificantDigits
(int
The minimum number of significant digits to display.
minimumSignificantDigits
)

Sets the minimum number of significant digits to display.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setMultiplier
(BigDecimal
The amount to multiply by.
multiplier
)

Multiply all numbers by this amount before formatting.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setNegativePrefix
(String
The CharSequence to prepend to negative numbers.
negativePrefix
)

Sets the prefix to prepend to negative numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setNegativePrefixPattern
(String
The CharSequence to prepend to negative numbers after locale symbol substitutions take place.
negativePrefixPattern
)

Sets the prefix to prepend to negative numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setNegativeSuffix
(String
The CharSequence to append to negative numbers.
negativeSuffix
)

Sets the suffix to append to negative numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setNegativeSuffixPattern
(String
The CharSequence to append to negative numbers after locale symbol substitutions take place.
negativeSuffixPattern
)

Sets the suffix to append to negative numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPadPosition
(Padder.PadPosition
The output width.
paddingLocation
)

Sets the location where the padding string is to be inserted to maintain the padding width: one of BEFORE_PREFIX, AFTER_PREFIX, BEFORE_SUFFIX, or AFTER_SUFFIX.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPadString
(String
The padding string. Defaults to an ASCII space (U+0020).
paddingString
)

Sets the string used for padding.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setParseCaseSensitive
(boolean
true to be case-sensitive when parsing; false to allow any case.
parseCaseSensitive
)

Whether to require cases to match when parsing strings; default is true.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setParseIntegerOnly
(boolean
true to parse integers only; false to parse integers with their fraction parts
parseIntegerOnly
)

Whether to ignore the fractional part of numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setParseMode
(DecimalFormatProperties.ParseMode parseMode)

Controls certain rules for how strict this parser is when reading strings.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setParseNoExponent
(boolean
true to ignore exponents; false to parse them.
parseNoExponent
)

Whether to ignore the exponential part of numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setParseToBigDecimal
(boolean
true to always return a BigDecimal; false to return a Long or a BigInteger when possible.
parseToBigDecimal
)

Whether to always return a BigDecimal from parse methods.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPluralRules
(PluralRules
The object to reference.
pluralRules
)

Sets the PluralRules object to use instead of the default for the locale.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPositivePrefix
(String
The CharSequence to prepend to positive numbers.
positivePrefix
)

Sets the prefix to prepend to positive numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPositivePrefixPattern
(String
The CharSequence to prepend to positive numbers after locale symbol substitutions take place.
positivePrefixPattern
)

Sets the prefix to prepend to positive numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPositiveSuffix
(String
The CharSequence to append to positive numbers.
positiveSuffix
)

Sets the suffix to append to positive numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setPositiveSuffixPattern
(String
The CharSequence to append to positive numbers after locale symbol substitutions take place.
positiveSuffixPattern
)

Sets the suffix to append to positive numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setRoundingIncrement
(BigDecimal
The interval to which to round.
roundingIncrement
)

Sets the increment to which to round numbers.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setRoundingMode
(RoundingMode
The rounding mode to use when rounding is required.
roundingMode
)

Sets the rounding mode, which determines under which conditions extra decimal places are rounded either up or down.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setSecondaryGroupingSize
(int
The secondary grouping size.
secondaryGroupingSize
)

Sets the number of digits between grouping separators higher than the least-significant grouping separator.

public DecimalFormatProperties

Returns:

The property bag, for chaining.
setSignAlwaysShown
(boolean
Whether positive numbers should display a plus sign.
signAlwaysShown
)

Sets whether to always display of a plus sign on positive numbers.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
toStringBare(StringBuilder result)

Appends a string containing properties that differ from the default, but without being surrounded by <Properties>.

private void
writeObject(ObjectOutputStream oos)

Custom serialization: save fields along with their name, so that fields can be easily added in the future in any order.

pack-priv void
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait