Package com.ibm.icu.impl.number
Class CurrencySpacingEnabledModifier
java.lang.Object
com.ibm.icu.impl.number.ConstantMultiFieldModifier
com.ibm.icu.impl.number.CurrencySpacingEnabledModifier
- All Implemented Interfaces:
Modifier
Identical to
ConstantMultiFieldModifier, but supports currency spacing.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.icu.impl.number.Modifier
Modifier.Parameters, Modifier.Signum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final UnicodeSetprivate final Stringprivate final UnicodeSet(package private) static final short(package private) static final short(package private) static final byte(package private) static final byteprivate static final UnicodeSetprivate static final UnicodeSetFields inherited from class com.ibm.icu.impl.number.ConstantMultiFieldModifier
prefixChars, prefixFields, suffixChars, suffixFields -
Constructor Summary
ConstructorsConstructorDescriptionCurrencySpacingEnabledModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, DecimalFormatSymbols symbols) Safe code path -
Method Summary
Modifier and TypeMethodDescriptionintapply(FormattedStringBuilder output, int leftIndex, int rightIndex) Safe code pathstatic intapplyCurrencySpacing(FormattedStringBuilder output, int prefixStart, int prefixLen, int suffixStart, int suffixLen, DecimalFormatSymbols symbols) Unsafe code pathprivate static intapplyCurrencySpacingAffix(FormattedStringBuilder output, int index, byte affix, DecimalFormatSymbols symbols) Unsafe code pathprivate static StringgetInsertString(DecimalFormatSymbols symbols, byte affix) private static UnicodeSetgetUnicodeSet(DecimalFormatSymbols symbols, short position, byte affix) Methods inherited from class com.ibm.icu.impl.number.ConstantMultiFieldModifier
containsField, getCodePointCount, getParameters, getPrefixLength, isStrong, strictEquals, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.ibm.icu.impl.number.Modifier
semanticallyEquivalent
-
Field Details
-
UNISET_DIGIT
-
UNISET_NOTSZ
-
PREFIX
static final byte PREFIX- See Also:
-
SUFFIX
static final byte SUFFIX- See Also:
-
IN_CURRENCY
static final short IN_CURRENCY- See Also:
-
IN_NUMBER
static final short IN_NUMBER- See Also:
-
afterPrefixUnicodeSet
-
afterPrefixInsert
-
beforeSuffixUnicodeSet
-
beforeSuffixInsert
-
-
Constructor Details
-
CurrencySpacingEnabledModifier
public CurrencySpacingEnabledModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, DecimalFormatSymbols symbols) Safe code path
-
-
Method Details
-
apply
Safe code path- Specified by:
applyin interfaceModifier- Overrides:
applyin classConstantMultiFieldModifier- Parameters:
output- The string builder to which to apply this modifier.leftIndex- The left index of the string within the builder. Equal to 0 when only one number is being formatted.rightIndex- The right index of the string within the string builder. Equal to length when only one number is being formatted.- Returns:
- The number of characters (UTF-16 code units) that were added to the string builder.
-
applyCurrencySpacing
public static int applyCurrencySpacing(FormattedStringBuilder output, int prefixStart, int prefixLen, int suffixStart, int suffixLen, DecimalFormatSymbols symbols) Unsafe code path -
applyCurrencySpacingAffix
private static int applyCurrencySpacingAffix(FormattedStringBuilder output, int index, byte affix, DecimalFormatSymbols symbols) Unsafe code path -
getUnicodeSet
-
getInsertString
-