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 String
private final UnicodeSet
private final String
private final UnicodeSet
(package private) static final short
(package private) static final short
(package private) static final byte
(package private) static final byte
private static final UnicodeSet
private static final UnicodeSet
Fields 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 TypeMethodDescriptionint
apply
(FormattedStringBuilder output, int leftIndex, int rightIndex) Safe code pathstatic int
applyCurrencySpacing
(FormattedStringBuilder output, int prefixStart, int prefixLen, int suffixStart, int suffixLen, DecimalFormatSymbols symbols) Unsafe code pathprivate static int
applyCurrencySpacingAffix
(FormattedStringBuilder output, int index, byte affix, DecimalFormatSymbols symbols) Unsafe code pathprivate static String
getInsertString
(DecimalFormatSymbols symbols, byte affix) private static UnicodeSet
getUnicodeSet
(DecimalFormatSymbols symbols, short position, byte affix) Methods inherited from class com.ibm.icu.impl.number.ConstantMultiFieldModifier
containsField, getCodePointCount, getParameters, getPrefixLength, isStrong, strictEquals, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
apply
in interfaceModifier
- Overrides:
apply
in 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
-