@Vetoed public class DefaultEnvironment extends Object implements Environment
| Constructor and Description |
|---|
DefaultEnvironment()
Deprecated.
|
DefaultEnvironment(String environment) |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key)
Returns a key
|
String |
get(String key,
String defaultValue)
Returns a key or a default value if the value isn't set
|
Iterable<String> |
getKeys() |
String |
getName()
Returns the environment name
|
URL |
getResource(String name)
Locates a resource according to your current environment.
|
boolean |
has(String key)
Checks if a key is present
|
void |
set(String key,
String value)
Sets a key in memory.
|
boolean |
supports(String feature)
Checks if a key is equals to true
if it's not present will return false
|
@Deprecated public DefaultEnvironment()
public DefaultEnvironment(String environment) throws IOException
IOExceptionpublic boolean supports(String feature)
Environmentsupports in interface Environmentpublic boolean has(String key)
Environmenthas in interface Environmentpublic String get(String key)
Environmentget in interface Environmentpublic String get(String key, String defaultValue)
Environmentget in interface Environmentpublic void set(String key, String value)
Environmentset in interface Environmentpublic Iterable<String> getKeys()
getKeys in interface Environmentpublic URL getResource(String name)
EnvironmentgetResource in interface Environmentpublic String getName()
EnvironmentgetName in interface EnvironmentCopyright © 2014. All Rights Reserved.