public final class AttributeUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
lowerCaseLiteralEqualsIgnoreAsciiCaseString(java.lang.String lowerCaseLiteral,
java.lang.String string)
Checks if
string matches lowerCaseLiteral when
ASCII-lowercased. |
static int |
parseInteger(java.lang.String attrVal)
Returns the integer represented by
attrVal or
Integer.MIN_VALUE on error. |
static int |
parseNonNegativeInteger(java.lang.String attrVal)
Returns the non-negative integer represented by
attrVal or -1 on error. |
static int |
parsePositiveInteger(java.lang.String attrVal)
Returns the positive integer represented by
attrVal or -1 on error. |
static java.lang.String[] |
split(java.lang.String value)
Splits the argument on white space.
|
public static int parseInteger(java.lang.String attrVal)
attrVal
or
Integer.MIN_VALUE
on error.attrVal
- a string representing an integer attribute
value (can be null
)attrVal
or
Integer.MIN_VALUE
on errorpublic static int parseNonNegativeInteger(java.lang.String attrVal)
attrVal
or -1 on error.attrVal
- a string representing a non-negative
integer attribute value (can be null
)attrVal
or
-1 on errorpublic static int parsePositiveInteger(java.lang.String attrVal)
attrVal
or -1 on error.attrVal
- a string representing a positive
integer attribute value (can be null
)attrVal
or
-1 on errorpublic static java.lang.String[] split(java.lang.String value)
value
- the attribute valuepublic static boolean lowerCaseLiteralEqualsIgnoreAsciiCaseString(java.lang.String lowerCaseLiteral, java.lang.String string)
string
matches lowerCaseLiteral
when
ASCII-lowercased.lowerCaseLiteral
- a lower-case literalstring
- potentially mixed-case string or null
true
if string
matches
lowerCaseLiteral
when ASCII-lowercased