| Constructor and Description |
|---|
Config()
Creates an empty config.
|
Config(Map<String,String> config)
Copies config into a map.
|
Config(Properties properties)
Copies properties into a map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,String>> |
entrySet() |
String |
get(Object key) |
boolean |
getBooleanValue(String propertyName)
Gets the value of a property as a boolean.
|
boolean |
getBooleanValue(String propertyName,
boolean defaultValue) |
double |
getDoubleValue(String propertyName,
double defaultValue)
Gets the value of a property as an double.
|
<E extends Enum<E>> |
getEnumValue(String propertyName,
E defaultValue)
Gets the value of a property as an enum.
|
InclusionRule |
getExclusionRule(String optionName) |
InclusionRule |
getInclusionRule(String optionName) |
InclusionRule |
getInclusionRule(String includePatternProperty,
String excludePatternProperty) |
InclusionRule |
getInclusionRuleDefaultExclude(String includePatternProperty,
String excludePatternProperty) |
InclusionRule |
getInclusionRuleOrNull(String includePatternProperty,
String excludePatternProperty) |
int |
getIntegerValue(String propertyName,
int defaultValue)
Gets the value of a property as an integer.
|
long |
getLongValue(String propertyName,
long defaultValue)
Gets the value of a property as an long.
|
String |
getStringValue(String propertyName,
String defaultValue)
Gets the value of a property as a string.
|
boolean |
hasValue(String propertyName)
Checks if a value is available.
|
boolean |
isEmpty() |
Set<String> |
keySet() |
static Config |
loadFile(String configFilename)
Loads the SchemaCrawler configuration from properties file.
|
static Config |
loadResource(String resource)
Loads the SchemaCrawler configuration, from a properties file
stream.
|
String |
put(String key,
String value) |
void |
putAll(Map<? extends String,? extends String> m) |
String |
remove(Object key) |
void |
setBooleanValue(String propertyName,
boolean value) |
<E extends Enum<E>> |
setEnumValue(String propertyName,
E value) |
void |
setStringValue(String propertyName,
String value) |
int |
size() |
String |
toString() |
Collection<String> |
values() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Config()
public Config(Map<String,String> config)
config - Config to copypublic Config(Properties properties)
properties - Properties to copypublic static Config loadFile(String configFilename)
configFilename - Configuration file name.IOExceptionpublic static Config loadResource(String resource)
configStream - Configuration stream.public boolean containsKey(Object key)
containsKey in interface Map<String,String>public boolean containsValue(Object value)
containsValue in interface Map<String,String>public boolean getBooleanValue(String propertyName)
propertyName - Property namepublic boolean getBooleanValue(String propertyName, boolean defaultValue)
public double getDoubleValue(String propertyName, double defaultValue)
propertyName - Property namepublic <E extends Enum<E>> E getEnumValue(String propertyName, E defaultValue)
propertyName - Property namepublic InclusionRule getExclusionRule(String optionName)
public InclusionRule getInclusionRule(String optionName)
public InclusionRule getInclusionRule(String includePatternProperty, String excludePatternProperty)
public InclusionRule getInclusionRuleDefaultExclude(String includePatternProperty, String excludePatternProperty)
public InclusionRule getInclusionRuleOrNull(String includePatternProperty, String excludePatternProperty)
public int getIntegerValue(String propertyName, int defaultValue)
propertyName - Property namepublic long getLongValue(String propertyName, long defaultValue)
propertyName - Property namepublic String getStringValue(String propertyName, String defaultValue)
propertyName - Property namedefaultValue - Default valuepublic boolean hasValue(String propertyName)
propertyName - Property namepublic void setBooleanValue(String propertyName, boolean value)
Copyright © 2000-2017 Sualeh Fatehi. All rights reserved.