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
public class CurrencySpacingEnabledModifier extends ConstantMultiFieldModifier
Identical toConstantMultiFieldModifier
, 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
Fields Modifier and Type Field Description private java.lang.String
afterPrefixInsert
private UnicodeSet
afterPrefixUnicodeSet
private java.lang.String
beforeSuffixInsert
private UnicodeSet
beforeSuffixUnicodeSet
(package private) static short
IN_CURRENCY
(package private) static short
IN_NUMBER
(package private) static byte
PREFIX
(package private) static byte
SUFFIX
private static UnicodeSet
UNISET_DIGIT
private static UnicodeSet
UNISET_NOTSZ
-
Fields inherited from class com.ibm.icu.impl.number.ConstantMultiFieldModifier
prefixChars, prefixFields, suffixChars, suffixFields
-
-
Constructor Summary
Constructors Constructor Description CurrencySpacingEnabledModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, DecimalFormatSymbols symbols)
Safe code path
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
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 java.lang.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 Detail
-
UNISET_DIGIT
private static final UnicodeSet UNISET_DIGIT
-
UNISET_NOTSZ
private static final UnicodeSet UNISET_NOTSZ
-
PREFIX
static final byte PREFIX
- See Also:
- Constant Field Values
-
SUFFIX
static final byte SUFFIX
- See Also:
- Constant Field Values
-
IN_CURRENCY
static final short IN_CURRENCY
- See Also:
- Constant Field Values
-
IN_NUMBER
static final short IN_NUMBER
- See Also:
- Constant Field Values
-
afterPrefixUnicodeSet
private final UnicodeSet afterPrefixUnicodeSet
-
afterPrefixInsert
private final java.lang.String afterPrefixInsert
-
beforeSuffixUnicodeSet
private final UnicodeSet beforeSuffixUnicodeSet
-
beforeSuffixInsert
private final java.lang.String beforeSuffixInsert
-
-
Constructor Detail
-
CurrencySpacingEnabledModifier
public CurrencySpacingEnabledModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, DecimalFormatSymbols symbols)
Safe code path
-
-
Method Detail
-
apply
public int apply(FormattedStringBuilder output, int leftIndex, int rightIndex)
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
private static UnicodeSet getUnicodeSet(DecimalFormatSymbols symbols, short position, byte affix)
-
getInsertString
private static java.lang.String getInsertString(DecimalFormatSymbols symbols, byte affix)
-
-