Interface EnvLookup

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EnvLookup
Resolves process environment variables by name. Tests may substitute a map-backed implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String name)
    Returns the value of the environment variable, or null if not set.
    static EnvLookup
    Returns a lookup that reads environment variables from the current process.
  • Method Details

    • get

      String get(String name)
      Returns the value of the environment variable, or null if not set.
      Parameters:
      name - the environment variable name
      Returns:
      the variable's value, or null if not set
    • system

      static EnvLookup system()
      Returns a lookup that reads environment variables from the current process.