public interface Modifier
SimpleFormatter pattern.
A Modifier is usually immutable, except in cases such as MutablePatternModifier, which are
mutable for performance reasons.| Modifier and Type | Interface and Description |
|---|---|
static class |
Modifier.Parameters
A fill-in for getParameters().
|
static class |
Modifier.Signum |
| Modifier and Type | Method and Description |
|---|---|
int |
apply(FormattedStringBuilder output,
int leftIndex,
int rightIndex)
Apply this Modifier to the string builder.
|
boolean |
containsField(Format.Field currency)
Whether the modifier contains at least one occurrence of the given field.
|
int |
getCodePointCount()
Returns the number of code points in the modifier, prefix plus suffix.
|
Modifier.Parameters |
getParameters()
Gets a set of "parameters" for this Modifier.
|
int |
getPrefixLength()
Gets the length of the prefix.
|
boolean |
isStrong()
Whether this modifier is strong.
|
boolean |
semanticallyEquivalent(Modifier other)
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.
|
int apply(FormattedStringBuilder output, int leftIndex, int rightIndex)
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.int getPrefixLength()
Modifier.apply(org.graalvm.shadowed.com.ibm.icu.impl.FormattedStringBuilder, int, int) to
extract the prefix and suffix strings.int getCodePointCount()
boolean isStrong()
boolean containsField(Format.Field currency)
Modifier.Parameters getParameters()
boolean semanticallyEquivalent(Modifier other)