Configuration
, Parameters
public class StringMapConfiguration extends AbstractStringConfiguration
Map
with string values.Map
,
Map.get(Object)
Constructor | Description |
---|---|
StringMapConfiguration(Configuration parentConfiguration,
Map<String,String> map) |
Parent configuration and map constructor.
|
StringMapConfiguration(Map<String,String> map) |
Map constructor.
|
StringMapConfiguration(Optional<Configuration> parentConfiguration,
Map<String,String> map) |
Parent configuration and map constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected Optional<String> |
getOptionalStringImpl(String key) |
Implementation for ultimately retrieving a raw string parameter.
|
getParentConfiguration, or
getOptionalBoolean, getOptionalDouble, getOptionalInt, getOptionalLong, getOptionalParameter, getOptionalPath, getOptionalUri, hasParameter
dereferenceString, getOptionalDereferencedString, getOptionalString, normalizeKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBoolean, getDouble, getInt, getLong, getParameter, getPath, getString, getUri, requireParameter, resolvePath
public StringMapConfiguration(@Nonnull Map<String,String> map)
map
- The map to back this configuration.NullPointerException
- if the given map is null
.public StringMapConfiguration(@Nonnull Configuration parentConfiguration, @Nonnull Map<String,String> map)
parentConfiguration
- The parent configuration for fallback lookup.map
- The map to back this configuration.NullPointerException
- if the given parent configuration and/or map is null
.public StringMapConfiguration(@Nonnull Optional<Configuration> parentConfiguration, @Nonnull Map<String,String> map)
parentConfiguration
- The parent configuration for fallback lookup.map
- The map to back this configuration.NullPointerException
- if the given parent configuration and/or map is null
.protected Optional<String> getOptionalStringImpl(String key) throws ConfigurationException
This method should usually be implemented but not called directly by other classes. Callers must invoke BaseConfiguration.dereferenceString(String)
on the returned
string value.
The given parameter key is assumed to already be normalized, and should not be modified.
This method must not fall back to parent configuration; only local strings must be returned.
This implementation delegates toMap.get(Object)
.getOptionalStringImpl
in class BaseConfiguration
key
- The exact parameter key.ConfigurationException
- if an expression is not in the correct format, or if no parameter is associated with a key in an expression.Copyright © 2018 GlobalMentor, Inc.. All rights reserved.