|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.logabit.utils.ConvertHelper
public class ConvertHelper
This helper class provides some utility methods to convert from string into other datatypes and datastructures.
| Constructor Summary | |
|---|---|
ConvertHelper()
|
|
| Method Summary | |
|---|---|
static boolean |
convertToBoolean(java.lang.String value,
boolean defaultValue)
Tries to convert the given string into a boolean representation. |
static int |
convertToInteger(java.lang.String value,
int defaultValue)
Tries to convert the given string into a integer representation. |
static java.lang.String |
convertToString(java.lang.String value,
java.lang.String defaultValue)
Looks for the given string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvertHelper()
| Method Detail |
|---|
public static java.lang.String convertToString(java.lang.String value,
java.lang.String defaultValue)
value - - The string value to look for.defaultValue - The default value to return if the given
string is null.
public static boolean convertToBoolean(java.lang.String value,
boolean defaultValue)
value - - The string to convert.defaultValue - - The default value to return if the string
is null or empty.
public static int convertToInteger(java.lang.String value,
int defaultValue)
value - - The string value to convert to integer.defaultValue - - The default value to return if the
string is null or empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||