public final class ValueConverter extends Object
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
tryParseBoolean(String value)
Tries to convert specified
String into a boolean value. |
static boolean |
tryParseBoolean(String value,
boolean defaultValue)
Tries to convert specified
String into boolean value. |
static Double |
tryParseDouble(String value)
Tries to convert specified string into double.
|
static Float |
tryParseFloat(String value)
Tries to convert specified string into float value.
|
static Float |
tryParseFloat(String value,
float defaultValue)
Tries to convert specified string into float value.
|
static Integer |
tryParseInt(String value)
Tries to convert specified string value into int.
|
static int |
tryParseInt(String value,
int defaultValue)
Tries to convert specified string value into int.
|
static Long |
tryParseLong(String value)
Tries to convert specified string into long value.
|
static long |
tryParseLong(String value,
long defaultValue)
Tries to convert specified string value into long.
|
public static Integer tryParseInt(String value)
value - Target string value.public static int tryParseInt(String value, int defaultValue)
value - Target string value.defaultValue - The value which is returned if parsing fails.public static Double tryParseDouble(String value)
value - Target string value.public static Float tryParseFloat(String value)
value - Target string value.public static Float tryParseFloat(String value, float defaultValue)
value - Target string value.defaultValue - Default value if parsing failed.public static Long tryParseLong(String value)
value - Target string value.public static long tryParseLong(String value, long defaultValue)
value - Target string value.defaultValue - The value which is returned if parsing fails.public static Boolean tryParseBoolean(String value)
String into a boolean value.value - Target string value.boolean value or null if the value cannot be parsed.public static boolean tryParseBoolean(String value, boolean defaultValue)
String into boolean value.
Returns the default if parsing fails.value - Target string value.defaultValue - The value which is returned if parsing fails.boolean value.Copyright © 2013-2016 INRIX, Inc. All Rights Reserved.