public class SystemVariables extends java.lang.Object implements EnvironmentVariables
Constructor and Description |
---|
SystemVariables() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String variable)
Verifies if there is a specified variable in the environment.
|
java.lang.String |
getValue(java.lang.String variable)
Returns the value of the specified variable from the environment block of
the calling process.
|
java.lang.String[] |
getVariableNames()
Returns an array of variable names.
|
void |
release()
Releases resources allocated for this object.
|
void |
removeVariable(java.lang.String variable)
Removes specified environment variable
|
void |
setValue(java.lang.String variable,
java.lang.String value)
Sets the value of an environment variable for the current process.
|
public java.lang.String getValue(java.lang.String variable)
getValue
in interface EnvironmentVariables
variable
- name of the variable to get the value for.public void setValue(java.lang.String variable, java.lang.String value)
setValue
in interface EnvironmentVariables
variable
- variable name.value
- variable value.public void removeVariable(java.lang.String variable)
removeVariable
in interface EnvironmentVariables
variable
- variable name.public boolean contains(java.lang.String variable)
contains
in interface EnvironmentVariables
variable
- variable name.public java.lang.String[] getVariableNames()
getVariableNames
in interface EnvironmentVariables
public void release()