Modifier that allows for multiple types of fields in the same modifier.
Constructed based on the contents of two FormattedStringBuilder instances (one for the prefix,
one for the suffix).
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final Modifier. | |
| protected final char[] | |
| protected final Object[] | |
| private final boolean | |
| protected final char[] | |
| protected final Object[] |
| Access | Constructor and Description |
|---|---|
| public | ConstantMultiFieldModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong)
|
| public | ConstantMultiFieldModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, Modifier.
|
| 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 int | getCodePointCount()
Implements com. |
| public Modifier. | getParameters()
Implements com. |
| public int | getPrefixLength()
Implements com. |
| public boolean | |
| public boolean | semanticallyEquivalent(Modifier other)
Implements com. |
| public String |
| overwrite | back to summary |
|---|---|
| private final boolean overwrite | |
| parameters | back to summary |
|---|---|
| private final Modifier. | |
| prefixChars | back to summary |
|---|---|
| protected final char[] prefixChars | |
| prefixFields | back to summary |
|---|---|
| protected final Object[] prefixFields | |
| strong | back to summary |
|---|---|
| private final boolean strong | |
| suffixChars | back to summary |
|---|---|
| protected final char[] suffixChars | |
| suffixFields | back to summary |
|---|---|
| protected final Object[] suffixFields | |
| ConstantMultiFieldModifier | back to summary |
|---|---|
| public ConstantMultiFieldModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong) | |
| ConstantMultiFieldModifier | back to summary |
|---|---|
| public ConstantMultiFieldModifier(FormattedStringBuilder prefix, FormattedStringBuilder suffix, boolean overwrite, boolean strong, Modifier. | |
| 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.
| |
| 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |