Class HalStructImpl

  • All Implemented Interfaces:
    Serializable, Map<String,​String>, HalMap, HalStruct, 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>, 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>

    public class HalStructImpl
    extends org.refcodes.struct.CanonicalMapBuilderImpl
    implements HalStruct
    The HalStructImpl implements the HalStruct interface by extending the CanonicalMapBuilderImpl class. The path delimiter as of PathMapBuilderImpl.getDelimiter() is set to be the Delimiter.PATH character.
    See Also:
    Serialized Form
    • Constructor Detail

      • HalStructImpl

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

        public HalStructImpl​(Object aObj,
                             String aFromPath)
        Creates a HalStruct instance containing the elements as of PathMap.MutablePathMap.insert(Object) using the default path delimiter "/" (Delimiter.PATH) for the path declarations.
        Parameters:
        aObj - The object from which the elements are to be added.
        aFromPath - The path from where to start adding elements of the provided object.
      • HalStructImpl

        public HalStructImpl​(Object aObj)
        Create a HalStruct instance containing the elements as of PathMap.MutablePathMap.insert(Object) using the default path delimiter "/" (Delimiter.PATH) for the path declarations.
        Parameters:
        aObj - The object from which the elements are to be added.
      • HalStructImpl

        public HalStructImpl​(String aToPath,
                             Object aObj,
                             String aFromPath)
        Creates a HalStruct instance containing the elements as of PathMap.MutablePathMap.insert(Object) using the default path delimiter "/" (Delimiter.PATH for the path declarations.
        Parameters:
        aToPath - The sub-path where to insert the object's introspected values to.
        aObj - The object from which the elements are to be added.
        aFromPath - The path from where to start adding elements of the provided object.
      • HalStructImpl

        public HalStructImpl​(String aToPath,
                             Object aObj)
        Create a HalStruct instance containing the elements as of PathMap.MutablePathMap.insert(Object) using the default path delimiter "/" (Delimiter.PATH) for the path declarations.
        Parameters:
        aToPath - The sub-path where to insert the object's introspected values to.
        aObj - The object from which the elements are to be added.
    • Method Detail

      • retrieveFrom

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

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

        public HalStruct 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 HalMap
        Specified by:
        withPut in interface HalStruct
        Specified by:
        withPut in interface org.refcodes.struct.InterOperableMap.InterOperableMapBuilder<String>
        Overrides:
        withPut in class org.refcodes.struct.CanonicalMapBuilderImpl