public interface EnvironmentProviderAn interface for providing environment variables.
Methods
getenv(String name)
public abstract String getenv(String name)Gets the value of the specified environment variable.
| Parameter | |
|---|---|
| Name | Description |
name |
Stringthe name of the environment variable |
| Returns | |
|---|---|
| Type | Description |
String |
the string value of the variable, or |
getenv(String name, String defaultValue)
public abstract String getenv(String name, String defaultValue)Gets the value of the specified environment variable, returning a default value if the variable is not defined.
| Parameters | |
|---|---|
| Name | Description |
name |
Stringthe name of the environment variable |
defaultValue |
Stringthe default value to return |
| Returns | |
|---|---|
| Type | Description |
String |
the string value of the variable, or the default value if the variable is not defined |