Class HalMapImpl

java.lang.Object
org.refcodes.struct.PathMapBuilderImpl<String>
org.refcodes.struct.CanonicalMapBuilderImpl
org.refcodes.hal.HalMapImpl
All Implemented Interfaces:
Serializable, Map<String,String>, HalMap, 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 HalMapImpl extends org.refcodes.struct.CanonicalMapBuilderImpl implements HalMap
The HalMapImpl implements the HalData interface by extending the CanonicalMapBuilderImpl class. The path delimiter as of PathMapBuilderImpl.getDelimiter() is set to be the Delimiter.PATH character.
See Also:
  • Constructor Details

    • HalMapImpl

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

      public HalMapImpl(Object aObj, String aFromPath)
      Creates a HalData 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.
    • HalMapImpl

      public HalMapImpl(Object aObj)
      Create a HalData 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.
    • HalMapImpl

      public HalMapImpl(String aToPath, Object aObj, String aFromPath)
      Creates a HalData 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.
    • HalMapImpl

      public HalMapImpl(String aToPath, Object aObj)
      Create a HalData 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 Details

    • retrieveFrom

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

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

      public HalMap retrieveBetween(String aFromPath, String aToPath)
      Specified by:
      retrieveBetween in interface org.refcodes.struct.CanonicalMap
      Specified by:
      retrieveBetween in interface HalMap
      Specified by:
      retrieveBetween in interface org.refcodes.struct.PathMap<String>
    • withPut

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