Package ru.iopump.qa.util
Class VarUtil
- java.lang.Object
-
- ru.iopump.qa.util.VarUtil
-
public final class VarUtil extends java.lang.ObjectSystem and Environment variables utility class.- See Also:
System.getenv(String),System.getProperty(String)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<java.lang.String>get(@NonNull java.lang.String propertyNameAkaKey)Get variable from System and Environment variables by key.static java.util.Map<java.lang.String,java.lang.String>getAll()Get all System and Environment variables.static java.lang.StringgetOrDefault(@NonNull java.lang.String propertyNameAkaKey, java.lang.String defaultValue)Get variable from System and Environment variables by key.
-
-
-
Method Detail
-
getAll
public static java.util.Map<java.lang.String,java.lang.String> getAll()
Get all System and Environment variables.- See Also:
System.getenv(),System.getProperties()
-
get
public static java.util.Optional<java.lang.String> get(@NonNull @NonNull java.lang.String propertyNameAkaKey)Get variable from System and Environment variables by key.- See Also:
System.getenv(String),System.getProperty(String)
-
getOrDefault
@Nullable public static java.lang.String getOrDefault(@NonNull @NonNull java.lang.String propertyNameAkaKey, @Nullable java.lang.String defaultValue)Get variable from System and Environment variables by key.- See Also:
System.getenv(String),System.getProperty(String)
-
-