public class IlvParameterUtil extends Object
IlvParameterUtil
class consists of static methods that
are of general use when parsing parameter values.
This class is a singleton and instances of this class cannot be created.Modifier and Type | Method and Description |
---|---|
static boolean |
parseBoolean(String value)
Parses the specified parameter value as a boolean, with
true
indicated by "true", "on", or "yes" in any letter case and false
indicated by "false", "off", or "no" in any letter case. |
static Date |
parseDate(String value)
Parses the specified parameter value as a Date.
|
static String[] |
parseStringArray(String value)
Parses the specified parameter value as an array of comma delimited
strings.
|
static String[] |
parseStringArray(String value,
String delims)
Parses the specified parameter value as an array of strings.
|
public static String[] parseStringArray(String value, String delims)
delims
argument are the delimiters
for separating tokens. Delimiter characters themselves will not
be treated as tokens.value
- The parameter value string.delims
- The delimiters.public static String[] parseStringArray(String value)
value
- The parameter value string.public static boolean parseBoolean(String value) throws NumberFormatException
true
indicated by "true", "on", or "yes" in any letter case and false
indicated by "false", "off", or "no" in any letter case.value
- The parameter value string.NumberFormatException
- If the parameter could not be converted
to a boolean.public static Date parseDate(String value) throws NumberFormatException
java.util.Calendar
class:
value
- The parameter value string.NumberFormatException
- If the parameter could not be converted
to a Date.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.