Package com.saperion.ngc.configuration
Class CombinedProperties
java.lang.Object
com.saperion.ngc.configuration.CombinedProperties
A Map with string-keys and values containing the values from two
configuration files. The values read from the customFile will
overwrite the values read from the defaultFile.
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCombinedProperties(String defaultFile, String customFile, boolean caseSensitive) Creates a new CombinedProperties containing the values from the defaultFile and the customFile. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CombinedProperties
public CombinedProperties(String defaultFile, String customFile, boolean caseSensitive) throws IOException Creates a new CombinedProperties containing the values from the defaultFile and the customFile. The files will be loaded from the classpath byClass.getResourceAsStream(String).- Parameters:
defaultFile- the file containing the default valuescustomFile- the file containing the custom valuescaseSensitive- if false, the returned map will be an instance ofCaseInsensitiveMap- Throws:
IOException- IO exception when reading the files
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,String>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,String>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-