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

public Class CurrencySpacingEnabledModifier

extends ConstantMultiFieldModifier
Class Inheritance
Imports
com.ibm.icu.impl.FormattedStringBuilder, com.ibm.icu.text.DecimalFormatSymbols, .NumberFormat, .UnicodeSet

Identical to ConstantMultiFieldModifier, but supports currency spacing.

Field Summary

Modifier and TypeField and Description
private final String
private final UnicodeSet
private final String
private final UnicodeSet
pack-priv static final short
pack-priv static final short
pack-priv static final byte
pack-priv static final byte
private static final UnicodeSet
private static final UnicodeSet
Inherited from com.ibm.icu.impl.number.ConstantMultiFieldModifier:
prefixCharsprefixFieldssuffixCharssuffixFields

Constructor Summary

AccessConstructor and Description
public
CurrencySpacingEnabledModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, DecimalFormatSymbols symbols)

Safe code path

Method Summary

Modifier and TypeMethod and Description
public int
apply(FormattedStringBuilder
The string builder to which to apply this modifier.
output
,
int
The left index of the string within the builder. Equal to 0 when only one number is being formatted.
leftIndex
,
int
The right index of the string within the string builder. Equal to length when only one number is being formatted.
rightIndex
)

Overrides com.ibm.icu.impl.number.ConstantMultiFieldModifier.apply.

Implements com.ibm.icu.impl.number.Modifier.apply.

Safe code path
public static int
applyCurrencySpacing(FormattedStringBuilder output, int prefixStart, int prefixLen, int suffixStart, int suffixLen, DecimalFormatSymbols symbols)

Unsafe code path

private static int
applyCurrencySpacingAffix(FormattedStringBuilder output, int index, byte affix, DecimalFormatSymbols symbols)

Unsafe code path

private static String
private static UnicodeSet
getUnicodeSet(DecimalFormatSymbols symbols, short position, byte affix)

Inherited from com.ibm.icu.impl.number.ConstantMultiFieldModifier:
containsFieldgetCodePointCountgetParametersgetPrefixLengthisStrongsemanticallyEquivalenttoString

Field Detail

afterPrefixInsertback to summary
private final String afterPrefixInsert
afterPrefixUnicodeSetback to summary
private final UnicodeSet afterPrefixUnicodeSet
beforeSuffixInsertback to summary
private final String beforeSuffixInsert
beforeSuffixUnicodeSetback to summary
private final UnicodeSet beforeSuffixUnicodeSet
IN_CURRENCYback to summary
pack-priv static final short IN_CURRENCY
IN_NUMBERback to summary
pack-priv static final short IN_NUMBER
PREFIXback to summary
pack-priv static final byte PREFIX
SUFFIXback to summary
pack-priv static final byte SUFFIX
UNISET_DIGITback to summary
private static final UnicodeSet UNISET_DIGIT
UNISET_NOTSZback to summary
private static final UnicodeSet UNISET_NOTSZ

Constructor Detail

CurrencySpacingEnabledModifierback to summary
public CurrencySpacingEnabledModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, DecimalFormatSymbols symbols)

Safe code path

Method Detail

applyback to summary
public int apply(FormattedStringBuilder output, int leftIndex, int rightIndex)

Overrides com.ibm.icu.impl.number.ConstantMultiFieldModifier.apply.

Implements com.ibm.icu.impl.number.Modifier.apply.

Safe code path

Parameters
output:FormattedStringBuilder

Doc from com.ibm.icu.impl.number.Modifier.apply.

The string builder to which to apply this modifier.

leftIndex:int

Doc from com.ibm.icu.impl.number.Modifier.apply.

The left index of the string within the builder. Equal to 0 when only one number is being formatted.

rightIndex:int

Doc from com.ibm.icu.impl.number.Modifier.apply.

The right index of the string within the string builder. Equal to length when only one number is being formatted.

Returns:int

Doc from com.ibm.icu.impl.number.Modifier.apply.

The number of characters (UTF-16 code units) that were added to the string builder.

Annotations
@Override
applyCurrencySpacingback to summary
public static int applyCurrencySpacing(FormattedStringBuilder output, int prefixStart, int prefixLen, int suffixStart, int suffixLen, DecimalFormatSymbols symbols)

Unsafe code path

applyCurrencySpacingAffixback to summary
private static int applyCurrencySpacingAffix(FormattedStringBuilder output, int index, byte affix, DecimalFormatSymbols symbols)

Unsafe code path

getInsertStringback to summary
private static String getInsertString(DecimalFormatSymbols symbols, byte affix)
getUnicodeSetback to summary
private static UnicodeSet getUnicodeSet(DecimalFormatSymbols symbols, short position, byte affix)