public static enum StringFormatPart.Conversion extends java.lang.Enum<StringFormatPart.Conversion>
Enum Constant and Description |
---|
BOOLEAN
A boolean conversion 'c' or 'C'.
|
DATE_TIME
A date or time conversion 't' or 'T'.
|
DECIMAL
A decimal conversion 'f'.
|
DECIMAL_INTEGER
A decimal integer conversion 'd'.
|
HEX
A hexadecimal conversion 'h' or 'H'.
|
HEX_FLOATING_POINT
A hexadecimal floating point number 'a' or 'A'.
|
HEX_INTEGER
A hexadecimal integer conversion 'x' or 'X'.
|
LINE_SEPARATOR
A line separator conversion 'n'.
|
OCTAL_INTEGER
An octal integer conversion 'o'.
|
PERCENT
A percentage conversion '%'.
|
SCIENTIFIC_NOTATION
A scientific notation conversion 'e' or 'E'.
|
SCIENTIFIC_NOTATION_OR_DECIMAL
A scientific notation or decimal 'g' or 'G'
|
STRING
A string conversion 's' or 'S'.
|
UNICODE_CHAR
A unicode conversion 'c' or 'C'.
|
Modifier and Type | Field and Description |
---|---|
private char |
conversion |
(package private) boolean |
ignoreCase |
Modifier and Type | Method and Description |
---|---|
char |
asChar()
Returns the conversion character.
|
java.lang.String |
asString()
Returns the conversion character as a
String |
static StringFormatPart.Conversion |
fromChar(char c)
Converts the character into a conversion descriptor.
|
boolean |
isCharacter()
If the conversion is a character
true is returned, otherwise false . |
boolean |
isDateTime()
If the conversion is a date or time
true is returned, otherwise false . |
boolean |
isFloatingPoint()
If the conversion is a floating point
true is returned, otherwise false . |
boolean |
isGeneral()
If the conversion is a general conversion
true is returned, otherwise false . |
boolean |
isIntegral()
If the conversion is an integral
true is returned, otherwise false . |
boolean |
isLineSeparator()
If the conversion is a line separator
true is returned, otherwise false . |
boolean |
isPercent()
If the conversion is a percent
true is returned, otherwise false . |
java.lang.String |
toString() |
static StringFormatPart.Conversion |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StringFormatPart.Conversion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringFormatPart.Conversion BOOLEAN
public static final StringFormatPart.Conversion HEX
public static final StringFormatPart.Conversion STRING
public static final StringFormatPart.Conversion UNICODE_CHAR
public static final StringFormatPart.Conversion DECIMAL_INTEGER
public static final StringFormatPart.Conversion OCTAL_INTEGER
public static final StringFormatPart.Conversion HEX_INTEGER
public static final StringFormatPart.Conversion SCIENTIFIC_NOTATION
public static final StringFormatPart.Conversion DECIMAL
public static final StringFormatPart.Conversion SCIENTIFIC_NOTATION_OR_DECIMAL
public static final StringFormatPart.Conversion HEX_FLOATING_POINT
public static final StringFormatPart.Conversion DATE_TIME
public static final StringFormatPart.Conversion PERCENT
public static final StringFormatPart.Conversion LINE_SEPARATOR
public static StringFormatPart.Conversion[] values()
for (StringFormatPart.Conversion c : StringFormatPart.Conversion.values()) System.out.println(c);
public static StringFormatPart.Conversion 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 boolean isGeneral()
true
is returned, otherwise false
.true
if a general conversion, otherwise false
.public boolean isCharacter()
true
is returned, otherwise false
.true
if c character, otherwise false
.public boolean isIntegral()
true
is returned, otherwise false
.true
if an integral, otherwise false
.public boolean isFloatingPoint()
true
is returned, otherwise false
.true
if a line separator, otherwise false
.public boolean isDateTime()
true
is returned, otherwise false
.true
if a date or time, otherwise false
.public boolean isPercent()
true
is returned, otherwise false
.true
if a percent, otherwise false
.public boolean isLineSeparator()
true
is returned, otherwise false
.true
if a line separator, otherwise false
.public char asChar()
public java.lang.String asString()
String
public java.lang.String toString()
toString
in class java.lang.Enum<StringFormatPart.Conversion>
public static StringFormatPart.Conversion fromChar(char c) throws java.util.UnknownFormatConversionException
c
- the character to convert.java.util.UnknownFormatConversionException
- if the character is not a valid conversion format.