public final class ConfigurationData extends Object
Data that abstracts the data read from a configuration resources using a certain format. The data can be divided into different sections, similar to ini-files. Herebey different sections the best map to entries with different priorities to be applied, when integrated into PropertySource instances.
New instances of this class can be created using aConfigurationDataBuilder
.
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getCombinedProperties()
Get combined properties for this config data instance.
|
Map<String,String> |
getDefaultProperties()
Convenience accessor for accessing the default section.
|
ConfigurationFormat |
getFormat()
Get the
ConfigurationFormat that read this data. |
String |
getResource()
Get the resource from which this data was read.
|
Map<String,String> |
getSection(String name)
Get a section's data.
|
Set<String> |
getSectionNames()
Access an immutable Set of all present section names, including the default section (if any).
|
Map<String,Map<String,String>> |
getSections()
Accessor used for easily creating a new builder based on a given data instance.
|
boolean |
hasCombinedProperties()
Immutable accessor to ckeck, if there are combined properties set.
|
boolean |
hasDefaultProperties()
Immutable accessor to ckeck, if there are default properties present.
|
boolean |
isEmpty()
Checks if no properties are contained in this data item.
|
String |
toString() |
public ConfigurationFormat getFormat()
ConfigurationFormat
that read this data.ConfigurationFormat
that read this data, never null.public String getResource()
public Set<String> getSectionNames()
public Map<String,String> getSection(String name)
name
- the section name, not null.public Map<String,String> getDefaultProperties()
public Map<String,String> getCombinedProperties()
public Map<String,Map<String,String>> getSections()
public boolean hasDefaultProperties()
public boolean hasCombinedProperties()
public boolean isEmpty()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.