Interface EnvironmentProvider


public interface EnvironmentProvider
An interface for providing environment variables.
  • Method Summary

    Modifier and Type
    Method
    Description
    getenv(String name)
    Gets the value of the specified environment variable.
    getenv(String name, String defaultValue)
    Gets the value of the specified environment variable, returning a default value if the variable is not defined.
  • Method Details

    • getenv

      String getenv(String name)
      Gets the value of the specified environment variable.
      Parameters:
      name - the name of the environment variable
      Returns:
      the string value of the variable, or null if the variable is not defined
    • getenv

      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 - the name of the environment variable
      defaultValue - the default value to return
      Returns:
      the string value of the variable, or the default value if the variable is not defined