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:
- Serialized Form
-
Field Summary
Fields inherited from class java.util.Properties
defaults
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
boolean
containsValue(Object value)
elements()
entrySet()
getProperty(String key)
getProperty(String key, String defaultValue)
keys()
keySet()
void
list(PrintStream out)
void
list(PrintWriter out)
void
load(InputStream inStream)
void
loadFromXML(InputStream in)
Enumeration<?>
void
void
save(OutputStream out, String comments)
setProperty(String key, String value)
void
store(OutputStream out, String comments)
void
storeToXML(OutputStream os, String comment)
void
storeToXML(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:
getProperty
in classProperties
-
getProperty
- Overrides:
getProperty
in classProperties
-
contains
- Overrides:
contains
in classProperties
-
containsValue
- Specified by:
containsValue
in interfaceMap<Object,Object>
- Overrides:
containsValue
in classProperties
-
clear
public void clear() -
elements
- Overrides:
elements
in classProperties
-
entrySet
-
keys
- Overrides:
keys
in classProperties
-
keySet
-
list
- Overrides:
list
in classProperties
-
list
- Overrides:
list
in classProperties
-
load
- Overrides:
load
in classProperties
- Throws:
IOException
-
loadFromXML
- Overrides:
loadFromXML
in classProperties
- Throws:
IOException
InvalidPropertiesFormatException
-
propertyNames
- Overrides:
propertyNames
in classProperties
-
put
-
putAll
-
remove
-
save
- Overrides:
save
in classProperties
-
setProperty
- Overrides:
setProperty
in classProperties
-
store
- Overrides:
store
in classProperties
- Throws:
IOException
-
storeToXML
- Overrides:
storeToXML
in classProperties
- Throws:
IOException
-
storeToXML
- Overrides:
storeToXML
in classProperties
- Throws:
IOException
-
values
-