public class OptionsHelper extends Object
Constructor and Description |
---|
OptionsHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
getOption(Map<String,String> options,
String key)
Given a map of options and a key name, return the value, or null if it is not specified.
|
static String |
getOption(Map<String,String> options,
String key,
String defaultValue)
Given a map of options, a key name, and a default value, if the map contains the key, return
its value, otherwise return the default value.
|
public static String getOption(Map<String,String> options, String key)
options
- a map of optionskey
- the name of the option to getpublic static String getOption(Map<String,String> options, String key, String defaultValue)
options
- a map of optionskey
- the name of the option to getdefaultValue
- the value to return if the key is not setCopyright © 2015–2020. All rights reserved.