Package io.confound.config.properties
Class PropertiesConfiguration
java.lang.Object
io.confound.config.AbstractConfiguration
io.confound.config.BaseConfiguration<String>
io.confound.config.AbstractStringConfiguration
io.confound.config.properties.PropertiesConfiguration
- All Implemented Interfaces:
io.confound.config.Configuration
public class PropertiesConfiguration
extends io.confound.config.AbstractStringConfiguration
Configuration implementation backed by
Properties
.- Author:
- Garret Wilson
- See Also:
-
Field Summary
Fields inherited from interface io.confound.config.Configuration
KEY_SEGMENT_SEPARATOR, KEY_SEGMENTS_PATTERN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptional<io.confound.config.Section>
findSection
(String key) protected boolean
Methods inherited from class io.confound.config.AbstractStringConfiguration
dereferenceString, findBoolean, findConfigurationValue, findDouble, findInt, findLong, findObject, findPath, findString, findUri
Methods inherited from class io.confound.config.BaseConfiguration
convertValue, findCollection, hasConfigurationValue, normalizeKey
Methods inherited from class io.confound.config.AbstractConfiguration
or
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.confound.config.Configuration
createMissingConfigurationKeyException, findCollection, findObject, getBoolean, getCollection, getCollection, getDouble, getInt, getLong, getObject, getObject, getPath, getSection, getString, getUri, requireConfiguration, resolvePath, subConfiguration, superConfiguration, withFallback
-
Constructor Details
-
PropertiesConfiguration
Properties constructor.- Parameters:
properties
- The properties to back this configuration.- Throws:
NullPointerException
- if the given properties isnull
.
-
-
Method Details
-
findSection
public Optional<io.confound.config.Section> findSection(String key) throws io.confound.config.ConfigurationException - Implementation Specification:
- This implementation always returns
Optional.empty()
, asProperties
do not support sections. - Throws:
io.confound.config.ConfigurationException
-
hasConfigurationValueImpl
protected boolean hasConfigurationValueImpl(String key) throws io.confound.config.ConfigurationException - Overrides:
hasConfigurationValueImpl
in classio.confound.config.BaseConfiguration<String>
- Implementation Specification:
- This implementation delegates to
Hashtable.contains(Object)
. - Throws:
io.confound.config.ConfigurationException
-
findConfigurationValueImpl
protected Optional<String> findConfigurationValueImpl(String key) throws io.confound.config.ConfigurationException - Specified by:
findConfigurationValueImpl
in classio.confound.config.BaseConfiguration<String>
- Implementation Specification:
- This implementation delegates to
Properties.getProperty(String)
. - Throws:
io.confound.config.ConfigurationException
-