Class ClassStructMapImpl

    • Field Detail

      • _classStructMap

        protected org.refcodes.struct.ClassStructMapImpl.OverridableClassStructMapBuilderImpl _classStructMap
    • Constructor Detail

      • ClassStructMapImpl

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

        public ClassStructMapImpl​(char aDelimiter)
        Create a ClassStructMap instance using the provided path delimiter for the path declarations.
        Parameters:
        aDelimiter - The path delimiter to be used for the path declarations.
      • ClassStructMapImpl

        public ClassStructMapImpl​(Object aObj)
        Create a ClassStructMap 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.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj)
        Create a ClassStructMap 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.
      • ClassStructMapImpl

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

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

        public ClassStructMapImpl​(Object aObj,
                                  char aDelimiter)
        Creates a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        Parameters:
        aObj - The object from which the elements are to be added.
        aDelimiter - The path delimiter to be used for the path declarations.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj,
                                  char aDelimiter)
        Creates a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        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.
        aDelimiter - The path delimiter to be used for the path declarations.
      • ClassStructMapImpl

        public ClassStructMapImpl​(Object aObj,
                                  String aFromPath,
                                  char aDelimiter)
        Creates a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        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.
        aDelimiter - The path delimiter to be used for the path declarations.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj,
                                  String aFromPath,
                                  char aDelimiter)
        Create a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        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.
        aDelimiter - The path delimiter to be used for the path declarations.
      • ClassStructMapImpl

        public ClassStructMapImpl​(SimpleType aTypeMode)
        Create an empty ClassStructMap instance using the default path delimiter "/" (Delimiter.PATH) for the path declarations.
        Parameters:
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(char aDelimiter,
                                  SimpleType aTypeMode)
        Create a ClassStructMap instance using the provided path delimiter for the path declarations.
        Parameters:
        aDelimiter - The path delimiter to be used for the path declarations.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(Object aObj,
                                  SimpleType aTypeMode)
        Create a ClassStructMap 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.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj,
                                  SimpleType aTypeMode)
        Create a ClassStructMap 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.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(Object aObj,
                                  String aFromPath,
                                  SimpleType aTypeMode)
        Creates a ClassStructMap 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.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj,
                                  String aFromPath,
                                  SimpleType aTypeMode)
        Creates a ClassStructMap 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.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(Object aObj,
                                  char aDelimiter,
                                  SimpleType aTypeMode)
        Creates a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        Parameters:
        aObj - The object from which the elements are to be added.
        aDelimiter - The path delimiter to be used for the path declarations.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj,
                                  char aDelimiter,
                                  SimpleType aTypeMode)
        Creates a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        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.
        aDelimiter - The path delimiter to be used for the path declarations.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(Object aObj,
                                  String aFromPath,
                                  char aDelimiter,
                                  SimpleType aTypeMode)
        Creates a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        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.
        aDelimiter - The path delimiter to be used for the path declarations.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
      • ClassStructMapImpl

        public ClassStructMapImpl​(String aToPath,
                                  Object aObj,
                                  String aFromPath,
                                  char aDelimiter,
                                  SimpleType aTypeMode)
        Create a ClassStructMap instance containing the elements as of PathMap.MutablePathMap.insert(Object).
        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.
        aDelimiter - The path delimiter to be used for the path declarations.
        aTypeMode - The SimpleType to use when processing primitive types, wrapper types or complex types.
    • Method Detail

      • getTypeMode

        public SimpleType getTypeMode()
        Retrieves the type mode from the type mode property.
        Specified by:
        getTypeMode in interface TypeModeAccessor
        Returns:
        The type mode stored by the type mode property.
      • getArraySelector

        public String getArraySelector()
        Returns the array selector used in paths to identify an array type.
        Specified by:
        getArraySelector in interface ClassStructMap
        Returns:
        The array selector denoting array types.
      • containsKey

        public boolean containsKey​(Object aKey)
        Tests whether there is an element with the given key.
        Specified by:
        containsKey in interface Keys<String,​Class<?>>
        Parameters:
        aKey - The key for which to test whether there is an element.
        Returns:
        True in case there is an element for the given key.
      • get

        public Class<?> get​(Object aKey)
        Retrieves the element assigned to the given key.
        Specified by:
        get in interface Keys<String,​Class<?>>
        Parameters:
        aKey - The key for which to get the element.
        Returns:
        The value for the key in question or null if there is none such value.
      • keySet

        public Set<String> keySet()
        Retrieves a collection containing all the keys found in the elements of this collection.
        Specified by:
        keySet in interface Keys<String,​Class<?>>
        Returns:
        A collection with key objects being the keys of all elements in this collection.
      • size

        public int size()
        Returns the number of data elements contained in the collection.
        Specified by:
        size in interface Containable
        Returns:
        An integer representing the number of items stored in the accumulation.
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.refcodes.mixin.EmptyAccessor
      • getAnnotator

        public char getAnnotator()
        Specified by:
        getAnnotator in interface org.refcodes.mixin.AnnotatorAccessor
      • getDelimiter

        public char getDelimiter()
        Specified by:
        getDelimiter in interface org.refcodes.mixin.DelimiterAccessor
      • getType

        public Class<Class<?>> getType()
        Specified by:
        getType in interface org.refcodes.mixin.TypeAccessor<Class<?>>
      • toDataStructure

        public Object toDataStructure​(String aFromPath)
        Similar to the PathMap.toMap(String) method, though in case all the keys of a nested Map instance (applicable to the root Map as well) represent an array (as of PathMap.getArray( String)), then an array is generated where the index of each value in the Map is represented by the number representation of the Map's key for that value. The result is a data structure consisting of Map instances and arrays.
        Specified by:
        toDataStructure in interface PathMap<Class<?>>
        Parameters:
        aFromPath - The path below which the PathMap to be converted into a data structure.
        Returns:
        A data structure being a mixture of Map instances and arrays representing the data below the given path.