public static enum StringFormatPart.Flag extends java.lang.Enum<StringFormatPart.Flag>
| Enum Constant and Description |
|---|
CONVERSION_DEPENDENT_ALTERNATE
The result should use a conversion-dependent alternate form.
|
INCLUDE_SIGN
The result will always include a sign.
|
LEFT_JUSTIFY
The result will be left-justified.
|
LOCALE_GROUPING_SEPARATOR
The result will include locale-specific grouping separators.
|
PARENTHESES_FOR_NEGATIVES
The result will enclose negative numbers in parentheses.
|
PREVIOUS
The previous position.
|
SPACE_FOR_POSITIVE_VALUES
The result will include a leading space for positive values.
|
ZERO_PADDED
The result will be zero-padded.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) char |
flag
The character flag.
|
| Modifier and Type | Method and Description |
|---|---|
static StringFormatPart.Flag |
parse(char c)
Checks to see if the character is a valid flag.
|
java.lang.String |
toString() |
static StringFormatPart.Flag |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StringFormatPart.Flag[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringFormatPart.Flag LEFT_JUSTIFY
public static final StringFormatPart.Flag CONVERSION_DEPENDENT_ALTERNATE
StringFormatPart.Conversion.OCTAL_INTEGER, StringFormatPart.Conversion.HEX_INTEGER, all floating points
and most general conversions depending on the definition of Formattable.public static final StringFormatPart.Flag INCLUDE_SIGN
StringFormatPart.Conversion.DECIMAL_INTEGER, StringFormatPart.Conversion.OCTAL_INTEGER,
StringFormatPart.Conversion.HEX_INTEGER when applied to java.math.BigInteger or
StringFormatPart.Conversion.DECIMAL_INTEGER when applied to byte, Byte, short, Short,
int, Integer, long and Long.public static final StringFormatPart.Flag SPACE_FOR_POSITIVE_VALUES
StringFormatPart.Conversion.DECIMAL_INTEGER, StringFormatPart.Conversion.OCTAL_INTEGER,
StringFormatPart.Conversion.HEX_INTEGER when applied to BigInteger or
StringFormatPart.Conversion.DECIMAL_INTEGER when applied to byte, Byte, short, Short,
int, Integer, long and Long.public static final StringFormatPart.Flag ZERO_PADDED
public static final StringFormatPart.Flag LOCALE_GROUPING_SEPARATOR
StringFormatPart.Conversion.DECIMAL_INTEGER integrals and StringFormatPart.Conversion.SCIENTIFIC_NOTATION,
StringFormatPart.Conversion.DECIMAL and StringFormatPart.Conversion.SCIENTIFIC_NOTATION_OR_DECIMAL floating points.public static final StringFormatPart.Flag PARENTHESES_FOR_NEGATIVES
StringFormatPart.Conversion.DECIMAL_INTEGER, StringFormatPart.Conversion.OCTAL_INTEGER,
StringFormatPart.Conversion.HEX_INTEGER when applied to BigInteger or
StringFormatPart.Conversion.DECIMAL_INTEGER when applied to byte, Byte, short, Short,
int, Integer, long and Long integrals and StringFormatPart.Conversion.SCIENTIFIC_NOTATION,
StringFormatPart.Conversion.DECIMAL and StringFormatPart.Conversion.SCIENTIFIC_NOTATION_OR_DECIMAL floating points.public static final StringFormatPart.Flag PREVIOUS
public static StringFormatPart.Flag[] values()
for (StringFormatPart.Flag c : StringFormatPart.Flag.values()) System.out.println(c);
public static StringFormatPart.Flag valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.lang.String toString()
toString in class java.lang.Enum<StringFormatPart.Flag>public static StringFormatPart.Flag parse(char c) throws java.util.UnknownFormatFlagsException
c - the character to check.java.util.UnknownFormatFlagsException - if the flag is invalid.