public static class Precision.LengthExponentPrecisionFormat extends Precision.PrecisionFormat
This format supports the specification of either signed or unsigned values. The character 'U' must precede the LENGTH/INTEGER format to specify an unsigned value. An 'S' character may be applied to specify a signed number. If no 'U' or 'S' signed specification is provided, the precision will default to a signed value.
Parenthesis or brackets are optional around this specification. Examples:
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_regex
Regular expression for IntegerFractionPrecisionFormat.
|
COMMA_OR_FORWARDSLASH, OPTIONAL_L_PARAN, OPTIONAL_L_PARANBRACKET, OPTIONAL_R_PARAN, OPTIONAL_R_PARANBRACKET, OPTIONAL_U_OR_S_GROUP, OPTIONAL_WHITE_SPACE, PERIOD, SIGNED_INTEGER_GROUP, UNSIGNED_INTEGER_GROUP
Constructor and Description |
---|
LengthExponentPrecisionFormat() |
Modifier and Type | Method and Description |
---|---|
Precision |
parseString(java.lang.String str)
Parse the given String argument using the rules of the specific
PrecisionFormat that is defined.
|
java.lang.String |
printPrecisionFormat(Precision p)
Creates a valid String representation of the Precision object
based on the rules of the given string format.
|
parseInteger, parseSignString
protected final java.lang.String _regex
public Precision parseString(java.lang.String str) throws java.lang.IllegalArgumentException
Precision.PrecisionFormat
parseString
in class Precision.PrecisionFormat
str
- String to parsejava.lang.IllegalArgumentException
- If there is a problem
parsing the String (i.e. an illegal string).public java.lang.String printPrecisionFormat(Precision p)
Precision.PrecisionFormat
printPrecisionFormat
in class Precision.PrecisionFormat
p
- Precision object to represent as a String.