Class Config
java.lang.Object
dev.pfaff.glass.Config
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetEnvFlag(String name, boolean defaultValue) Parses the value of the environment variablenameas a boolean wherefalseis parsed from0andtrueis parsed from1.static intstatic longgetEnvLong(String name, long defaultValue) static StringgetEnvString(String name, String defaultValue) static <T> T
-
Constructor Details
-
Config
public Config()
-
-
Method Details
-
getEnvFlag
Parses the value of the environment variablenameas a boolean wherefalseis parsed from0andtrueis parsed from1.- Parameters:
name- the name of the environment variable.defaultValue- the value that should be returned if the environment variable is unset.- Returns:
trueif the variable is set to1,falseif the variable is set to0, ordefaultValueotherwise.
-
getEnvString
-
getEnvInt
-
getEnvLong
-
getEnvT
-