Modifier, this one consuming a
com.ibm.icu.text.SimpleFormatter pattern.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | ARG_NUM_LIMIT
Todo This is copied from SimpleFormatterImpl. |
| private final String | |
| private final Format. | |
| private final Modifier. | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | SimpleModifier(String compiledPattern, Format.
Creates a modifier that uses the SimpleFormatter string formats. |
| public | SimpleModifier(String compiledPattern, Format.
Creates a modifier that uses the SimpleFormatter string formats. |
| Modifier and Type | Method 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)Implements com. |
| public boolean | containsField(Format.
Implements com. |
| public static void | formatTwoArgPattern(String compiledPattern, FormattedStringBuilder result, int index, PrefixInfixSuffixLengthHelper h, Format.
Applies the compiled two-argument pattern to the FormattedStringBuilder. |
| public int | getCodePointCount()
Implements com. |
| public Modifier. | getParameters()
Implements com. |
| public int | getPrefixLength()
Implements com. |
| public boolean | |
| public boolean | semanticallyEquivalent(Modifier other)
Implements com. |
| ARG_NUM_LIMIT | back to summary |
|---|---|
| private static final int ARG_NUM_LIMIT Todo This is copied from SimpleFormatterImpl. | |
| compiledPattern | back to summary |
|---|---|
| private final String compiledPattern | |
| field | back to summary |
|---|---|
| private final Format. | |
| parameters | back to summary |
|---|---|
| private final Modifier. | |
| strong | back to summary |
|---|---|
| private final boolean strong | |
| SimpleModifier | back to summary |
|---|---|
| public SimpleModifier(String compiledPattern, Format. Creates a modifier that uses the SimpleFormatter string formats. | |
| SimpleModifier | back to summary |
|---|---|
| public SimpleModifier(String compiledPattern, Format. Creates a modifier that uses the SimpleFormatter string formats. | |
| apply | back to summary |
|---|---|
| public int apply(FormattedStringBuilder output, int leftIndex, int rightIndex) Implements com. Doc from com. Apply this Modifier to the string builder.
| |
| containsField | back to summary |
|---|---|
| public boolean containsField(Format. Implements com. Doc from com. Whether the modifier contains at least one occurrence of the given field.
| |
| formatTwoArgPattern | back to summary |
|---|---|
| public static void formatTwoArgPattern(String compiledPattern, FormattedStringBuilder result, int index, PrefixInfixSuffixLengthHelper h, Format. Todo Like above, this belongs with the rest of the SimpleFormatterImpl code. I put it here so that the SimpleFormatter uses in FormattedStringBuilder are near each other. Applies the compiled two-argument pattern to the FormattedStringBuilder. This method is optimized for the case where the prefix and suffix are often empty, such as in the range pattern like "{0}-{1}". | |
| getCodePointCount | back to summary |
|---|---|
| public int getCodePointCount() Implements com. Doc from com. Returns the number of code points in the modifier, prefix plus suffix.
| |
| getParameters | back to summary |
|---|---|
| public Modifier. Implements com. Doc from com. Gets a set of "parameters" for this Modifier.
| |
| getPrefixLength | back to summary |
|---|---|
| public int getPrefixLength() Implements com. Doc from com. Gets the length of the prefix. This information can be used in combination with
| |
| isStrong | back to summary |
|---|---|
| public boolean isStrong() Implements com. Doc from com. Whether this modifier is strong. If a modifier is strong, it should always be applied immediately and not allowed to bubble up. With regard to padding, strong modifiers are considered to be on the inside of the prefix and suffix.
| |
| semanticallyEquivalent | back to summary |
|---|---|
| public boolean semanticallyEquivalent(Modifier other) Implements com. Doc from com. Returns whether this Modifier is *semantically equivalent* to the other Modifier; in many cases, this is the same as equal, but parameters should be ignored.
| |