public class FormattableFlags extends Object
Formattable#formatTo method and modify the output format for Formattable. Implementations of Formattable are
responsible for interpreting and validating any flags.| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
ALTERNATE |
Requires the output to use an alternate form.
|
static int |
LEFT_JUSTIFY |
Left-justifies the output.
|
static int |
UPPERCASE |
Converts the output to upper case according to the rules of the
locale given during creation of the
formatter argument of the
Formattable#formatTo method. |
public static final int ALTERNATE
This flag corresponds to '#' ('\u0023') in the format specifier.
public static final int LEFT_JUSTIFY
This flag corresponds to '-' ('\u002d') in the format specifier.
public static final int UPPERCASE
Formattable#formatTo method. The output should be equivalent the following
invocation of String#toUpperCase(java.util.Locale)
out.toUpperCase()
This flag corresponds to 'S' ('\u0053') in the format specifier.