public class MockEnvironmentVariables extends Object implements EnvironmentVariables
| Modifier | Constructor and Description |
|---|---|
|
MockEnvironmentVariables() |
protected |
MockEnvironmentVariables(Properties properties) |
protected |
MockEnvironmentVariables(Properties properties,
Map<String,String> values) |
public MockEnvironmentVariables()
protected MockEnvironmentVariables(Properties properties)
protected MockEnvironmentVariables(Properties properties, Map<String,String> 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 Optional<String> optionalProperty(String name)
EnvironmentVariablesoptionalProperty 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 setProperties(Map<String,String> newProperties)
setProperties in interface EnvironmentVariablespublic void clearProperty(String name)
clearProperty in interface EnvironmentVariablespublic EnvironmentVariables copy()
copy in interface EnvironmentVariablespublic List<String> getKeys()
getKeys in interface EnvironmentVariablespublic Properties getProperties()
getProperties in interface EnvironmentVariablespublic Properties getPropertiesWithPrefix(String prefix)
getPropertiesWithPrefix in interface EnvironmentVariablespublic boolean aValueIsDefinedFor(Enum<?> property)
aValueIsDefinedFor in interface EnvironmentVariablespublic boolean aValueIsDefinedFor(String property)
aValueIsDefinedFor in interface EnvironmentVariablespublic String injectSystemPropertiesInto(String value)
injectSystemPropertiesInto in interface EnvironmentVariablespublic Map<String,String> asMap()
asMap in interface EnvironmentVariablespublic Map<String,String> simpleSystemPropertiesAsMap()
simpleSystemPropertiesAsMap in interface EnvironmentVariablesCopyright © 2022. All rights reserved.