public abstract static class Precision.PrecisionFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMA_OR_FORWARDSLASH
Regular expression definition for a comma "," or a
forward slash "/".
|
static java.lang.String |
OPTIONAL_L_PARAN
Regular expression definition for an optional left parenthesis.
|
static java.lang.String |
OPTIONAL_L_PARANBRACKET
Regular expression definition for an optional left parenthesis
or left bracket.
|
static java.lang.String |
OPTIONAL_R_PARAN
Regular expression definition for an optional right parenthesis.
|
static java.lang.String |
OPTIONAL_R_PARANBRACKET
Regular expression definition for an optional right parenthesis
or left bracket.
|
static java.lang.String |
OPTIONAL_U_OR_S_GROUP
Regular expression for an optional 'S' or 'U' "group".
|
static java.lang.String |
OPTIONAL_WHITE_SPACE
Regular expression for optional white space.
|
static java.lang.String |
PERIOD
Regular expression definition for a Period ".".
|
static java.lang.String |
SIGNED_INTEGER_GROUP
Regular expression for a grouped signed integer
(positive or negative).
|
static java.lang.String |
UNSIGNED_INTEGER_GROUP
Regular expression for a grouped unsigned integer.
|
Constructor and Description |
---|
PrecisionFormat() |
Modifier and Type | Method and Description |
---|---|
static int |
parseInteger(java.lang.String str)
Parse a String as an integer.
|
static int |
parseSignString(java.lang.String str)
Parse the 'U' or 'S' sign specifier.
|
abstract Precision |
parseString(java.lang.String str)
Parse the given String argument using the rules of the specific
PrecisionFormat that is defined.
|
abstract java.lang.String |
printPrecisionFormat(Precision p)
Creates a valid String representation of the Precision object
based on the rules of the given string format.
|
public static final java.lang.String COMMA_OR_FORWARDSLASH
public static final java.lang.String OPTIONAL_L_PARAN
public static final java.lang.String OPTIONAL_L_PARANBRACKET
public static final java.lang.String OPTIONAL_R_PARAN
public static final java.lang.String OPTIONAL_R_PARANBRACKET
public static final java.lang.String PERIOD
public static final java.lang.String SIGNED_INTEGER_GROUP
public static final java.lang.String OPTIONAL_U_OR_S_GROUP
public static final java.lang.String UNSIGNED_INTEGER_GROUP
public static final java.lang.String OPTIONAL_WHITE_SPACE
public abstract Precision parseString(java.lang.String str) throws java.lang.IllegalArgumentException
str
- String to parsejava.lang.IllegalArgumentException
- If there is a problem
parsing the String (i.e. an illegal string).public abstract java.lang.String printPrecisionFormat(Precision p)
p
- Precision object to represent as a String.public static int parseInteger(java.lang.String str) throws java.lang.IllegalArgumentException
str
- The integer string to parsejava.lang.IllegalArgumentException
- If the parsing of the
Integer value fails (i.e. NumberFormatException).public static int parseSignString(java.lang.String str) throws java.lang.IllegalArgumentException
str
- String to parse for a sign indicator.java.lang.IllegalArgumentException
- If the
string does not match the 'U' or 'S' characters.