public class Options extends Object
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Field and Description |
---|---|
static Context.Key<Options> |
optionsKey
The context key for the options.
|
Modifier | Constructor and Description |
---|---|
protected |
Options(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Runnable listener) |
String |
get(Option option)
Get the value for an option.
|
String |
get(String name)
Get the value for an undocumented option.
|
boolean |
getBoolean(String name)
Get the boolean value for an option, patterned after Boolean.getBoolean,
essentially will return true, iff the value exists and is set to "true".
|
boolean |
getBoolean(String name,
boolean defaultValue)
Get the boolean with a default value if the option is not set.
|
static Options |
instance(Context context)
Get the Options instance for this context.
|
boolean |
isSet(Option option)
Check if the value for an option has been set.
|
boolean |
isSet(Option option,
String value)
Check if the value for a choice option has been set to a specific value.
|
boolean |
isSet(String name)
Check if the value for an undocumented option has been set.
|
boolean |
isUnset(Option option)
Check if the value for an option has not been set.
|
boolean |
isUnset(Option option,
String value)
Check if the value for a choice option has not been set to a specific value.
|
boolean |
isUnset(String name)
Check if the value for an undocumented option has not been set.
|
Set<String> |
keySet() |
boolean |
lint(String s)
Check for a lint suboption.
|
void |
notifyListeners() |
void |
put(Option option,
String value) |
void |
put(String name,
String value) |
void |
putAll(Options options) |
void |
remove(String name) |
int |
size() |
public static final Context.Key<Options> optionsKey
protected Options(Context context)
public boolean getBoolean(String name)
public boolean getBoolean(String name, boolean defaultValue)
public boolean isSet(String name)
public boolean isSet(Option option)
public boolean isSet(Option option, String value)
public boolean isUnset(String name)
public boolean isUnset(Option option)
public boolean isUnset(Option option, String value)
public void putAll(Options options)
public void remove(String name)
public int size()
public void addListener(Runnable listener)
public void notifyListeners()
public boolean lint(String s)
Copyright © 2017 earcam. All rights reserved.