Package com.zfabrik.util
Class SmartProperties
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
Properties implementation supporting property value substitution. I.e. creating SmartProperties from Properties
p defining a property host=localhost,
a property definition url = http://${host}/path will be evaluated to url = http://localhost/path.- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanbooleancontainsValue(Object value) elements()entrySet()getProperty(String key) getProperty(String key, String defaultValue) keys()keySet()voidlist(PrintStream out) voidlist(PrintWriter out) voidload(InputStream inStream) voidEnumeration<?>voidvoidsave(OutputStream out, String comments) setProperty(String key, String value) voidstore(OutputStream out, String comments) voidstoreToXML(OutputStream os, String comment) voidstoreToXML(OutputStream os, String comment, String encoding) values()Methods inherited from class java.util.Properties
clone, compute, computeIfAbsent, computeIfPresent, containsKey, equals, forEach, getOrDefault, hashCode, isEmpty, load, merge, putIfAbsent, rehash, remove, replace, replace, replaceAll, size, store, storeToXML, stringPropertyNames, toString
-
Constructor Details
-
SmartProperties
public SmartProperties() -
SmartProperties
-
-
Method Details
-
get
-
getProperty
- Overrides:
getPropertyin classProperties
-
getProperty
- Overrides:
getPropertyin classProperties
-
contains
- Overrides:
containsin classProperties
-
containsValue
- Specified by:
containsValuein interfaceMap<Object,Object> - Overrides:
containsValuein classProperties
-
clear
public void clear() -
elements
- Overrides:
elementsin classProperties
-
entrySet
-
keys
- Overrides:
keysin classProperties
-
keySet
-
list
- Overrides:
listin classProperties
-
list
- Overrides:
listin classProperties
-
load
- Overrides:
loadin classProperties- Throws:
IOException
-
loadFromXML
- Overrides:
loadFromXMLin classProperties- Throws:
IOExceptionInvalidPropertiesFormatException
-
propertyNames
- Overrides:
propertyNamesin classProperties
-
put
-
putAll
-
remove
-
save
- Overrides:
savein classProperties
-
setProperty
- Overrides:
setPropertyin classProperties
-
store
- Overrides:
storein classProperties- Throws:
IOException
-
storeToXML
- Overrides:
storeToXMLin classProperties- Throws:
IOException
-
storeToXML
- Overrides:
storeToXMLin classProperties- Throws:
IOException
-
values
-