Interface EnvironmentProvider (4.0.3)

public interface EnvironmentProvider

An 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 String

the name of the environment variable

Returns
Type Description
String

the string value of the variable, or null if the variable is not defined

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 String

the name of the environment variable

defaultValue String

the default value to return

Returns
Type Description
String

the string value of the variable, or the default value if the variable is not defined