public interface EnvironmentImplementation
Environment.Environment| Modifier and Type | Method and Description |
|---|---|
void |
appendPath(String name,
String value)
Appends a path to a path-like variable.
|
String |
getVariable(String name)
Returns the value of the variable or
null. |
void |
prependPath(String name,
String value)
Prepends a path to a path-like variable.
|
void |
removeVariable(String name)
Removes a variable with the given name.
|
void |
setVariable(String name,
String value)
Sets a value for a variable with the given name.
|
Map<String,String> |
values()
Returns all variable names and associated values as a
Map. |
@CheckForNull String getVariable(@NonNull String name)
null.name - the name of the variablenullvoid appendPath(@NonNull String name, @NonNull String value)
name - the name of the variable such as for example
PATH or LD_LIBRARY_PATHvalue - the value (path to append)void prependPath(@NonNull String name, @NonNull String value)
name - the name of the variable such as for example
PATH or LD_LIBRARY_PATHvalue - the value (path to prepend)void setVariable(@NonNull String name, @NonNull String value)
name - the name of the variablevalue - the valuevoid removeVariable(@NonNull String name)
EnvironmentImplementation.getVariable(java.lang.String) with the same argument should
return null.name - the name of the variable