Class Environment

java.lang.Object
nva.commons.core.Environment

public class Environment extends Object
  • Field Details

  • Constructor Details

    • Environment

      public Environment()
  • Method Details

    • readEnvOpt

      public Optional<String> readEnvOpt(String variableName)
      Read an Environment variable.
      Parameters:
      variableName - the Env variable name.
      Returns:
      the value of the variable or an empty Optional if the variable does not exists.
    • readEnv

      public String readEnv(String variableName)
      Read an Environment variable.
      Parameters:
      variableName - the Env variable name.
      Returns:
      the value of the variable or throw IllegalStateException if the variable does not exists.