Class Config

java.lang.Object
dev.pfaff.glass.Config

public final class Config extends Object
Runtime configuration utilities.
  • Constructor Details

    • Config

      public Config()
  • Method Details

    • getEnvFlag

      public static boolean getEnvFlag(String name, boolean defaultValue)
      Parses the value of the environment variable name as a boolean where false is parsed from 0 and true is parsed from 1.
      Parameters:
      name - the name of the environment variable.
      defaultValue - the value that should be returned if the environment variable is unset.
      Returns:
      true if the variable is set to 1, false if the variable is set to 0, or defaultValue otherwise.