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 EnvironmentVariables
public String getValue(Enum<?> property)
getValue
in interface EnvironmentVariables
public String getValue(String name, String defaultValue)
getValue
in interface EnvironmentVariables
public String getValue(Enum<?> property, String defaultValue)
getValue
in interface EnvironmentVariables
public Integer getPropertyAsInteger(String name, Integer defaultValue)
getPropertyAsInteger
in interface EnvironmentVariables
public Integer getPropertyAsInteger(Enum<?> property, Integer defaultValue)
getPropertyAsInteger
in interface EnvironmentVariables
public Boolean getPropertyAsBoolean(String name, boolean defaultValue)
getPropertyAsBoolean
in interface EnvironmentVariables
public Boolean getPropertyAsBoolean(Enum<?> property, boolean defaultValue)
getPropertyAsBoolean
in interface EnvironmentVariables
public String getProperty(String name)
getProperty
in interface EnvironmentVariables
public String getProperty(Enum<?> property)
getProperty
in interface EnvironmentVariables
public String getProperty(String name, String defaultValue)
getProperty
in interface EnvironmentVariables
public String getProperty(Enum<?> property, String defaultValue)
getProperty
in interface EnvironmentVariables
public void setProperty(String name, String value)
setProperty
in interface EnvironmentVariables
public void clearProperty(String name)
clearProperty
in interface EnvironmentVariables
public EnvironmentVariables copy()
copy
in interface EnvironmentVariables
Copyright © 2011–2014 Wakaleo Consulting. All rights reserved.