public class EnvironmentImpl extends Object implements Environment
| Constructor and Description |
|---|
EnvironmentImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empties the environment.
|
boolean |
containsAttribute(String name)
Checks if an attribute with given name exists.
|
Object |
getAttribute(String name)
Get the attribute of the given name to the given string value.
|
Iterable<String> |
getAttributeNames()
Returns an
Iterable of attribute names. |
Map<String,Object> |
getAttributes() |
Map<String,Object> |
getAttributesAsMap()
Returns the environment attributes as unmodifiable map.
|
void |
importEnvironment(Environment environment)
Copy all attributes from given environment into this environment.
|
void |
removeAttribute(String name)
Unsets any attribute with the given name.
|
void |
setAttribute(String name,
Object value)
Sets the attribute of the given name to the given value.
|
void |
setAttributes(Map<String,Object> attributes) |
public Object getAttribute(String name)
EnvironmentgetAttribute in interface Environmentname - the name of the attribute to getpublic void removeAttribute(String name)
EnvironmentremoveAttribute in interface Environmentname - the name of the attribute to removepublic void setAttribute(String name, Object value)
EnvironmentsetAttribute in interface Environmentname - the name of the attribute to set; you can't use any of the ReservedVariables namesvalue - the value to set the attribute topublic void importEnvironment(Environment environment)
EnvironmentimportEnvironment in interface Environmentpublic Iterable<String> getAttributeNames()
EnvironmentIterable of attribute names.getAttributeNames in interface EnvironmentIterable of attribute namespublic boolean containsAttribute(String name)
EnvironmentcontainsAttribute in interface Environmentname - the name of the attribute to checkpublic Map<String,Object> getAttributesAsMap()
EnvironmentgetAttributesAsMap in interface Environmentpublic void clear()
Environmentclear in interface EnvironmentCopyright © 2018. All rights reserved.