public final class OptionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
getBoolean(Map map,
String name,
boolean defaultValue)
Get a boolean value from a options map.
|
static int |
getInteger(Map map,
String name,
int defaultValue)
Get an integer value from a options map.
|
static long |
getLong(Map map,
String name,
long defaultValue)
Get a long value from a options map.
|
static String |
getString(Map map,
String name,
String defaultValue)
Get a String value from a options map.
|
public static String getString(Map map, String name, String defaultValue) throws FdkException
map
- Map of names to valuesname
- NamedefaultValue
- Default valueFdkException
- (FDK_INVALID_OPTION_VALUE)
if the value is not to a Stringpublic static int getInteger(Map map, String name, int defaultValue) throws FdkException
map
- Map of names to valuesname
- NamedefaultValue
- Default valueFdkException
- (FDK_INVALID_OPTION_VALUE)
if the value can not be converted to an integerpublic static long getLong(Map map, String name, long defaultValue) throws FdkException
map
- Map of names to valuesname
- NamedefaultValue
- Default valueFdkException
- (FDK_INVALID_OPTION_VALUE)
if the value can not be converted to a longpublic static boolean getBoolean(Map map, String name, boolean defaultValue) throws FdkException
map
- Map of names to valuesname
- NamedefaultValue
- Default valueFdkException
- (FDK_INVALID_OPTION_VALUE)
if the value can not be converted to a booleanCopyright © 2023. All rights reserved.