public class MockEnvironmentVariables extends Object implements EnvironmentVariables
| Modifier | Constructor and Description |
|---|---|
|
MockEnvironmentVariables() |
protected |
MockEnvironmentVariables(Properties properties) |
protected |
MockEnvironmentVariables(Properties properties,
Properties values) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearProperty(String name) |
EnvironmentVariables |
copy() |
static EnvironmentVariables |
fromSystemEnvironment() |
String |
getProperty(Enum<?> property) |
String |
getProperty(Enum<?> property,
String defaultValue) |
String |
getProperty(String name) |
String |
getProperty(String name,
String defaultValue) |
Boolean |
getPropertyAsBoolean(Enum<?> property,
boolean defaultValue) |
Boolean |
getPropertyAsBoolean(String name,
boolean defaultValue) |
Integer |
getPropertyAsInteger(Enum<?> property,
Integer defaultValue) |
Integer |
getPropertyAsInteger(String name,
Integer defaultValue) |
String |
getValue(Enum<?> property) |
String |
getValue(Enum<?> property,
String defaultValue) |
String |
getValue(String name) |
String |
getValue(String name,
String defaultValue) |
boolean |
propertySetIsEmpty() |
void |
setProperty(String name,
String value) |
void |
setValue(String name,
String value) |
public MockEnvironmentVariables()
protected MockEnvironmentVariables(Properties properties)
protected MockEnvironmentVariables(Properties properties, Properties values)
public static EnvironmentVariables fromSystemEnvironment()
public boolean propertySetIsEmpty()
public String getValue(String name)
getValue in interface EnvironmentVariablespublic String getValue(Enum<?> property)
getValue in interface EnvironmentVariablespublic String getValue(String name, String defaultValue)
getValue in interface EnvironmentVariablespublic String getValue(Enum<?> property, String defaultValue)
getValue in interface EnvironmentVariablespublic Integer getPropertyAsInteger(String name, Integer defaultValue)
getPropertyAsInteger in interface EnvironmentVariablespublic Integer getPropertyAsInteger(Enum<?> property, Integer defaultValue)
getPropertyAsInteger in interface EnvironmentVariablespublic Boolean getPropertyAsBoolean(String name, boolean defaultValue)
getPropertyAsBoolean in interface EnvironmentVariablespublic Boolean getPropertyAsBoolean(Enum<?> property, boolean defaultValue)
getPropertyAsBoolean in interface EnvironmentVariablespublic String getProperty(String name)
getProperty in interface EnvironmentVariablespublic String getProperty(Enum<?> property)
getProperty in interface EnvironmentVariablespublic String getProperty(String name, String defaultValue)
getProperty in interface EnvironmentVariablespublic String getProperty(Enum<?> property, String defaultValue)
getProperty in interface EnvironmentVariablespublic void setProperty(String name, String value)
setProperty in interface EnvironmentVariablespublic void clearProperty(String name)
clearProperty in interface EnvironmentVariablespublic EnvironmentVariables copy()
copy in interface EnvironmentVariablesCopyright © 2011–2014 Wakaleo Consulting. All rights reserved.