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 to ConstantMultiFieldModifier, but supports currency spacing.
  • Field Details

  • Constructor Details

  • Method Details

    • apply

      public int apply(FormattedStringBuilder output, int leftIndex, int rightIndex)
      Safe code path
      Specified by:
      apply in interface Modifier
      Overrides:
      apply in class ConstantMultiFieldModifier
      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 String getInsertString(DecimalFormatSymbols symbols, byte affix)