Class PropertiesBuilderImpl

java.lang.Object
org.refcodes.struct.PathMapBuilderImpl<String>
org.refcodes.struct.CanonicalMapBuilderImpl
org.refcodes.properties.PropertiesBuilderImpl
All Implemented Interfaces:
Serializable, Map<String,String>, org.refcodes.mixin.AnnotatorAccessor, org.refcodes.mixin.Clearable, org.refcodes.mixin.DelimiterAccessor, org.refcodes.mixin.Dumpable, org.refcodes.mixin.EmptyAccessor, org.refcodes.mixin.TypeAccessor<String>, Properties, Properties.MutableProperties, Properties.PropertiesBuilder, org.refcodes.struct.CanonicalMap, org.refcodes.struct.CanonicalMap.CanonicalMapBuilder, org.refcodes.struct.CanonicalMap.MutableCanonicalMap, org.refcodes.struct.Containable, org.refcodes.struct.Dictionary<String,String>, org.refcodes.struct.Dictionary.MutableDictionary<String,String>, org.refcodes.struct.Dictionary.MutableDictionary.DictionaryBuilder<String,String,org.refcodes.struct.PathMap.PathMapBuilder<String>>, org.refcodes.struct.InterOperableMap<String>, org.refcodes.struct.InterOperableMap.InterOperableMapBuilder<String>, org.refcodes.struct.InterOperableMap.MutableInterOperableMap<String>, org.refcodes.struct.Keys<String,String>, org.refcodes.struct.Keys.MutableKeys<String,String>, org.refcodes.struct.Keys.MutableValues<String,String>, org.refcodes.struct.PathMap<String>, org.refcodes.struct.PathMap.MutablePathMap<String>, org.refcodes.struct.PathMap.PathMapBuilder<String>
Direct Known Subclasses:
AbstractResourcePropertiesBuilder

public class PropertiesBuilderImpl extends org.refcodes.struct.CanonicalMapBuilderImpl implements Properties.PropertiesBuilder
The Class PropertiesBuilderImpl.
See Also:
  • Constructor Details

    • PropertiesBuilderImpl

      public PropertiesBuilderImpl()
      Create an empty Properties.PropertiesBuilder instance using the default path delimiter "/" (Delimiter.PATH) for the path declarations.
    • PropertiesBuilderImpl

      public PropertiesBuilderImpl(Object aObj)
      Create a Properties.PropertiesBuilder instance containing the elements as of PathMap.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 type Map, Collection and arrays are identified and handled as of their type: The path for each value in a Map is appended with its according key. The path for each value in a Collection or array is appended with its according index of occurrence (in case of a List 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 a Properties.PropertiesBuilder instance containing the elements of the provided Properties 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 a Properties.PropertiesBuilder instance containing the elements of the provided Properties instance using the default path delimiter "/" (Delimiter.PATH) for the path declarations
      Parameters:
      aProperties - the properties to be added.
    • PropertiesBuilderImpl

      public PropertiesBuilderImpl(Map<?,?> aProperties)
      Create a Properties.PropertiesBuilder instance containing the elements of the provided Map instance using the default path delimiter "/" (Delimiter.PATH) for the path declarations
      Parameters:
      aProperties - the properties to be added.
    • PropertiesBuilderImpl

      public PropertiesBuilderImpl(org.refcodes.struct.Property... aProperties)
      Create a Properties.PropertiesBuilder instance containing the provided Property instances' key/value-pairs.
      Parameters:
      aProperties - the properties to be added.
  • Method Details

    • retrieveFrom

      public Properties.PropertiesBuilder retrieveFrom(String aFromPath)
      Specified by:
      retrieveFrom in interface org.refcodes.struct.CanonicalMap
      Specified by:
      retrieveFrom in interface org.refcodes.struct.PathMap<String>
      Specified by:
      retrieveFrom in interface Properties
      Overrides:
      retrieveFrom in class org.refcodes.struct.CanonicalMapBuilderImpl
    • retrieveTo

      public Properties.PropertiesBuilder retrieveTo(String aToPath)
      Specified by:
      retrieveTo in interface org.refcodes.struct.CanonicalMap
      Specified by:
      retrieveTo in interface org.refcodes.struct.PathMap<String>
      Specified by:
      retrieveTo in interface Properties
      Overrides:
      retrieveTo in class org.refcodes.struct.CanonicalMapBuilderImpl
    • withPut

      public Properties.PropertiesBuilder withPut(String aKey, String aValue)
      Specified by:
      withPut in interface org.refcodes.struct.Dictionary.MutableDictionary.DictionaryBuilder<String,String,org.refcodes.struct.PathMap.PathMapBuilder<String>>
      Specified by:
      withPut in interface org.refcodes.struct.InterOperableMap.InterOperableMapBuilder<String>
      Specified by:
      withPut in interface Properties.PropertiesBuilder
      Overrides:
      withPut in class org.refcodes.struct.CanonicalMapBuilderImpl