Package org.refcodes.configuration
Class PropertiesBuilderImpl
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,T>
-
- org.refcodes.structure.PathMapBuilderImpl<java.lang.String>
-
- org.refcodes.configuration.PropertiesBuilderImpl
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,T>
,Properties
,Properties.MutableProperties
,Properties.PropertiesBuilder
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.TypeAccessor<java.lang.String>
,org.refcodes.structure.CanonicalMap
,org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
,org.refcodes.structure.CanonicalMap.MutableCanonicalMap
,org.refcodes.structure.Clearable
,org.refcodes.structure.Containable
,org.refcodes.structure.Dictionary<java.lang.String,T>
,org.refcodes.structure.Dictionary.MutableDictionary<java.lang.String,T>
,org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<java.lang.String,T,org.refcodes.structure.PathMap.PathMapBuilder<T>>
,org.refcodes.structure.Keys<java.lang.String,T>
,org.refcodes.structure.Keys.MutableKeys<java.lang.String,T>
,org.refcodes.structure.Keys.MutableValues<java.lang.String,T>
,org.refcodes.structure.PathMap<java.lang.String>
,org.refcodes.structure.PathMap.MutablePathMap<java.lang.String>
,org.refcodes.structure.PathMap.PathMapBuilder<java.lang.String>
,org.refcodes.structure.PropertiesAccessorMixin
,org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<java.lang.String>
,org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin
,org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
- Direct Known Subclasses:
AbstractResourcePropertiesBuilder
public class PropertiesBuilderImpl extends org.refcodes.structure.PathMapBuilderImpl<java.lang.String> implements Properties.PropertiesBuilder
The Class PropertiesBuilderImpl.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.CanonicalMap
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Dictionary
org.refcodes.structure.Dictionary.MutableDictionary<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Dictionary.MutableDictionary
org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K extends java.lang.Object,V extends java.lang.Object,B extends org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.PathMap
org.refcodes.structure.PathMap.MutablePathMap<T extends java.lang.Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.configuration.Properties
Properties.MutableProperties, Properties.PropertiesBuilder
-
Nested classes/interfaces inherited from interface org.refcodes.structure.PropertiesAccessorMixin
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends java.lang.Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
-
-
Field Summary
-
Fields inherited from interface org.refcodes.configuration.Properties
DEFAULT_COMMENT
-
-
Constructor Summary
Constructors Constructor Description PropertiesBuilderImpl()
Create an emptyProperties.PropertiesBuilder
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.PropertiesBuilderImpl(java.lang.Object aObj)
Create aProperties.PropertiesBuilder
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations: "Inspects the given object and adds all elements found in the given object.PropertiesBuilderImpl(java.util.Map<?,?> aProperties)
Create aProperties.PropertiesBuilder
instance containing the elements of the providedMap
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarationsPropertiesBuilderImpl(Properties aProperties)
Create aProperties.PropertiesBuilder
instance containing the elements of the providedProperties
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarationsPropertiesBuilderImpl(Properties.PropertiesBuilder aProperties)
Create aProperties.PropertiesBuilder
instance containing the elements of the providedProperties
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarationsPropertiesBuilderImpl(org.refcodes.structure.Property... aProperties)
Create aProperties.PropertiesBuilder
instance containing the providedProperty
instances' key/value-pairs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Properties.PropertiesBuilder
retrieveFrom(java.lang.String aFromPath)
Properties.PropertiesBuilder
retrieveTo(java.lang.String aToPath)
-
Methods inherited from interface org.refcodes.structure.CanonicalMap
toInstance, toInstance, toType, toType
-
Methods inherited from interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withInsert, withInsert, withInsertFrom, withInsertTo
-
Methods inherited from interface org.refcodes.structure.CanonicalMap.MutableCanonicalMap
insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode, toSourceCode
-
Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, putAll, replaceAll, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.refcodes.structure.PathMap
children, children, children, directories, directories, directories, directories, directories, fromExternalKey, get, get, getArray, getArray, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getIndexes, getIndexes, getInteger, getInteger, getLong, getLong, getRootPath, getShort, getShort, hasChildren, hasChildren, hasChildren, hasIndexed, hasIndexed, hasParentPath, isArray, isArray, isArray, isArray, isArray, isChild, isChild, isChild, isDirectory, isDirectory, isDirectory, isDirectory, isIndexed, isIndexed, isPath, isRecord, isRecord, isRecord, isRecord, isRootPath, keySet, paths, paths, paths, paths, paths, queryPaths, records, records, records, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath, toPath
-
Methods inherited from interface org.refcodes.structure.PathMap.MutablePathMap
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, remove, remove, removeAll, removeAll, removeFrom, removeFrom, removeFrom, removeFrom
-
Methods inherited from interface org.refcodes.structure.PathMap.PathMapBuilder
withInsert, withInsert, withInsertFrom, withInsertTo
-
Methods inherited from class org.refcodes.structure.PathMapBuilderImpl
compute, computeIfAbsent, computeIfPresent, containsKey, get, getDelimiter, getOrDefault, getType, merge, put, putIfAbsent, remove, remove, replace, replace, toDataStructure
-
Methods inherited from interface org.refcodes.configuration.Properties
getDelimiter, getType, query, query, queryFrom, queryTo, retrieve, retrieveFrom, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, toMap, toProperties, toPropertyPath
-
Methods inherited from interface org.refcodes.configuration.Properties.MutableProperties
containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
-
Methods inherited from interface org.refcodes.configuration.Properties.PropertiesBuilder
getIndexed, getIndexed, withInsert, withInsert, withInsert, withInsert, withInsertFrom, withInsertFrom, withInsertTo, withInsertTo, withPut, withPut, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom
-
Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin
asArray, asArray, asArray, asArray, asArray, asArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asByteArray, asByteArray, asByteArray, asByteArray, asByteArray, asByteArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asLongArray, asLongArray, asLongArray, asLongArray, asLongArray, asLongArray, asShortArray, asShortArray, asShortArray, asShortArray, asShortArray, asShortArray, containsKey, get, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getShort, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
-
-
-
-
Constructor Detail
-
PropertiesBuilderImpl
public PropertiesBuilderImpl()
Create an emptyProperties.PropertiesBuilder
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.
-
PropertiesBuilderImpl
public PropertiesBuilderImpl(java.lang.Object aObj)
Create aProperties.PropertiesBuilder
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations: "Inspects the given object and adds all elements found in the given object. Elements of typeMap
,Collection
and arrays are identified and handled as of their type: The path for each value in aMap
is appended with its according key. The path for each value in aCollection
or array is appended with its according index of occurrence (in case of aList
or an array, its actual index). In case of reflection, the path for each member is appended with its according mamber's name. All elements (e.g. the members and values) are inspected recursively which results in the according paths of the terminating values."- Parameters:
aObj
- The object from which the elements are to be added.
-
PropertiesBuilderImpl
public PropertiesBuilderImpl(Properties aProperties)
Create aProperties.PropertiesBuilder
instance containing the elements of the providedProperties
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations- Parameters:
aProperties
- the properties to be added.
-
PropertiesBuilderImpl
public PropertiesBuilderImpl(Properties.PropertiesBuilder aProperties)
Create aProperties.PropertiesBuilder
instance containing the elements of the providedProperties
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations- Parameters:
aProperties
- the properties to be added.
-
PropertiesBuilderImpl
public PropertiesBuilderImpl(java.util.Map<?,?> aProperties)
Create aProperties.PropertiesBuilder
instance containing the elements of the providedMap
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations- Parameters:
aProperties
- the properties to be added.
-
PropertiesBuilderImpl
public PropertiesBuilderImpl(org.refcodes.structure.Property... aProperties)
Create aProperties.PropertiesBuilder
instance containing the providedProperty
instances' key/value-pairs.- Parameters:
aProperties
- the properties to be added.
-
-
Method Detail
-
retrieveFrom
public Properties.PropertiesBuilder retrieveFrom(java.lang.String aFromPath)
- Specified by:
retrieveFrom
in interfaceorg.refcodes.structure.CanonicalMap
- Specified by:
retrieveFrom
in interfaceorg.refcodes.structure.PathMap<java.lang.String>
- Specified by:
retrieveFrom
in interfaceProperties
- Overrides:
retrieveFrom
in classorg.refcodes.structure.PathMapBuilderImpl<java.lang.String>
-
retrieveTo
public Properties.PropertiesBuilder retrieveTo(java.lang.String aToPath)
- Specified by:
retrieveTo
in interfaceorg.refcodes.structure.CanonicalMap
- Specified by:
retrieveTo
in interfaceorg.refcodes.structure.PathMap<java.lang.String>
- Specified by:
retrieveTo
in interfaceProperties
- Overrides:
retrieveTo
in classorg.refcodes.structure.PathMapBuilderImpl<java.lang.String>
-
-