- java.lang.Object
-
- org.refcodes.struct.ClassStructMapImpl
-
- All Implemented Interfaces:
org.refcodes.mixin.AnnotatorAccessor
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.EmptyAccessor
,org.refcodes.mixin.TypeAccessor<Class<?>>
,ClassStructMap
,Containable
,Dictionary<String,Class<?>>
,Keys<String,Class<?>>
,PathMap<Class<?>>
,TypeModeAccessor
public class ClassStructMapImpl extends Object implements ClassStructMap
The Class ClassStructMapImpl.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.AnnotatorAccessor
org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B extends org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B>>, org.refcodes.mixin.AnnotatorAccessor.AnnotatorMutator, org.refcodes.mixin.AnnotatorAccessor.AnnotatorProperty
-
Nested classes/interfaces inherited from interface org.refcodes.struct.ClassStructMap
ClassStructMap.ClassStructMapBuilder, ClassStructMap.MutableClassStructMap
-
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.struct.Dictionary
Dictionary.MutableDictionary<K,V>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.EmptyAccessor
org.refcodes.mixin.EmptyAccessor.EmptyMutator, org.refcodes.mixin.EmptyAccessor.EmptyProperty
-
Nested classes/interfaces inherited from interface org.refcodes.struct.Keys
Keys.MutableKeys<K,V>, Keys.MutableValues<K,V>
-
Nested classes/interfaces inherited from interface org.refcodes.struct.PathMap
PathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.struct.TypeModeAccessor
TypeModeAccessor.TypeModeBuilder<B extends TypeModeAccessor.TypeModeBuilder<B>>, TypeModeAccessor.TypeModeMutator, TypeModeAccessor.TypeModeProperty
-
-
Field Summary
Fields Modifier and Type Field Description protected org.refcodes.struct.ClassStructMapImpl.OverridableClassStructMapBuilderImpl
_classStructMap
-
Fields inherited from interface org.refcodes.struct.ClassStructMap
ARRAY_SELECTOR
-
-
Constructor Summary
Constructors Constructor Description ClassStructMapImpl()
Create an emptyClassStructMap
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(char aDelimiter)
Create aClassStructMap
instance using the provided path delimiter for the path declarations.ClassStructMapImpl(char aDelimiter, SimpleType aTypeMode)
Create aClassStructMap
instance using the provided path delimiter for the path declarations.ClassStructMapImpl(Object aObj)
Create aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(Object aObj, char aDelimiter)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(Object aObj, char aDelimiter, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(Object aObj, String aFromPath)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(Object aObj, String aFromPath, char aDelimiter)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(Object aObj, String aFromPath, char aDelimiter, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(Object aObj, String aFromPath, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(Object aObj, SimpleType aTypeMode)
Create aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(String aToPath, Object aObj)
Create aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(String aToPath, Object aObj, char aDelimiter)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(String aToPath, Object aObj, char aDelimiter, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(String aToPath, Object aObj, String aFromPath)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
for the path declarations.ClassStructMapImpl(String aToPath, Object aObj, String aFromPath, char aDelimiter)
Create aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(String aToPath, Object aObj, String aFromPath, char aDelimiter, SimpleType aTypeMode)
Create aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
.ClassStructMapImpl(String aToPath, Object aObj, String aFromPath, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
for the path declarations.ClassStructMapImpl(String aToPath, Object aObj, SimpleType aTypeMode)
Create aClassStructMap
instance containing the elements as ofPathMap.MutablePathMap.insert(Object)
using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.ClassStructMapImpl(SimpleType aTypeMode)
Create an emptyClassStructMap
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(Object aKey)
Tests whether there is an element with the given key.Class<?>
get(Object aKey)
Retrieves the element assigned to the given key.char
getAnnotator()
String
getArraySelector()
Returns the array selector used in paths to identify an array type.char
getDelimiter()
Class<Class<?>>
getType()
SimpleType
getTypeMode()
Retrieves the type mode from the type mode property.boolean
isEmpty()
Set<String>
keySet()
Retrieves a collection containing all the keys found in the elements of this collection.ClassStructMap
retrieveFrom(String aFromPath)
ClassStructMap
retrieveTo(String aToPath)
int
size()
Returns the number of data elements contained in the collection.Object
toDataStructure(String aFromPath)
Similar to thePathMap.toMap(String)
method, though in case all the keys of a nestedMap
instance (applicable to the rootMap
as well) represent an array (as ofPathMap.getArray( String)
), then an array is generated where the index of each value in theMap
is represented by the number representation of theMap
's key for that value.String
toString()
Collection<Class<?>>
values()
Returns aCollection
view of the values related to the contained keys.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.refcodes.struct.ClassStructMap
containsValue, getCompositeArrayDir, getCompositeArrayDir, getCompositeArrayDir, getCompositeArrayDir, getCompositeArrayDir, getCompositeArrayDir, getCompositeDir, getCompositeDir, getCompositeDir, getCompositeDir, getCompositeDir, getCompositeDir, getDir, getDir, getDir, getDir, getDir, getDirAt, getDirAt, getDirAt, getDirAt, getDirAt, getDirAt, getDirs, getDirs, getDirs, getDirs, getDirs, getPrimitiveArrayType, getPrimitiveArrayType, getPrimitiveArrayType, getPrimitiveArrayType, getPrimitiveArrayType, getPrimitiveArrayType, getPrimitiveType, getPrimitiveType, getPrimitiveType, getPrimitiveType, getPrimitiveType, getPrimitiveType, getSimpleArrayType, getSimpleArrayType, getSimpleArrayType, getSimpleArrayType, getSimpleArrayType, getSimpleArrayType, getSimpleType, getSimpleType, getSimpleType, getSimpleType, getSimpleType, getSimpleType, getWrapperArrayType, getWrapperArrayType, getWrapperArrayType, getWrapperArrayType, getWrapperArrayType, getWrapperArrayType, getWrapperType, getWrapperType, getWrapperType, getWrapperType, getWrapperType, getWrapperType, isArrayType, isArrayType, isArrayType, isArrayType, isArrayType, isArrayType, isCompositeArrayDir, isCompositeArrayDir, isCompositeArrayDir, isCompositeArrayDir, isCompositeArrayDir, isCompositeArrayDir, isCompositeDir, isCompositeDir, isCompositeDir, isCompositeDir, isCompositeDir, isCompositeDir, isPrimitiveArrayType, isPrimitiveArrayType, isPrimitiveArrayType, isPrimitiveArrayType, isPrimitiveArrayType, isPrimitiveArrayType, isPrimitiveType, isPrimitiveType, isPrimitiveType, isPrimitiveType, isPrimitiveType, isPrimitiveType, isSimpleArrayType, isSimpleArrayType, isSimpleArrayType, isSimpleArrayType, isSimpleArrayType, isSimpleArrayType, isSimpleType, isSimpleType, isSimpleType, isSimpleType, isSimpleType, isSimpleType, isWrapperArrayType, isWrapperArrayType, isWrapperArrayType, isWrapperArrayType, isWrapperArrayType, isWrapperArrayType, isWrapperType, isWrapperType, isWrapperType, isWrapperType, isWrapperType, isWrapperType, query, query, query, query, query, queryBetween, queryBetween, queryBetween, queryBetween, queryBetween, queryBetween, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryTo, queryTo, queryTo, queryTo, queryTo, queryTo, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveFrom, retrieveFrom, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, retrieveTo, toMap, toProperties
-
Methods inherited from interface org.refcodes.struct.PathMap
children, children, children, children, children, children, containsKey, containsKey, containsKey, dirs, dirs, dirs, dirs, dirs, dirs, findPaths, fromExternalPath, get, get, get, getArray, getArray, getArray, getArray, getArray, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayIndexes, getArrayOr, getArrayOr, getArrayOr, getArrayOr, getArrayOr, getDirIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getDirIndexes, getRootPath, getValueAt, getValueAt, getValueAt, getValueAt, getValueAt, getValueAt, hasChildren, hasChildren, hasChildren, hasChildren, hasChildren, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasDirAt, hasParentPath, hasPath, hasPath, hasPath, hasPath, hasSubDirs, hasSubDirs, hasSubDirs, hasSubDirs, hasValue, hasValue, hasValue, hasValue, hasValue, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, hasValueAt, isArray, isArray, isArray, isArray, isArray, isArray, isChild, isChild, isChild, isChild, isDir, isDir, isDir, isDir, isDir, isEqualTo, isIndexDir, isIndexDir, isIndexDir, isIndexDir, isIndexDir, isLeaf, isLeaf, isLeaf, isLeaf, isLeaf, isRootPath, keySet, keySet, keySet, keySet, keySet, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastArrayIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, lastDirIndex, leaves, leaves, leaves, leaves, leaves, leaves, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextArrayIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, nextDirIndex, paths, paths, paths, paths, paths, paths, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, toDataStructure, toExternalPath, toInstance, toInstance, toLeaf, toMap, toNormalizedPath, toParentPath, toPath, toPath, toPath, toPath, toPathElements, toPathList, toPathStack, toPropertyPath, toType, toType, toType, toType, toType, toType, toType, toType
-
-
-
-
Constructor Detail
-
ClassStructMapImpl
public ClassStructMapImpl()
Create an emptyClassStructMap
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.
-
ClassStructMapImpl
public ClassStructMapImpl(char aDelimiter)
Create aClassStructMap
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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 aClassStructMap
instance containing the elements as ofPathMap.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 emptyClassStructMap
instance using the default path delimiter "/" (Delimiter.PATH
) for the path declarations.- Parameters:
aTypeMode
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(char aDelimiter, SimpleType aTypeMode)
Create aClassStructMap
instance using the provided path delimiter for the path declarations.- Parameters:
aDelimiter
- The path delimiter to be used for the path declarations.aTypeMode
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(Object aObj, SimpleType aTypeMode)
Create aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(String aToPath, Object aObj, SimpleType aTypeMode)
Create aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(Object aObj, String aFromPath, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(String aToPath, Object aObj, String aFromPath, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(Object aObj, char aDelimiter, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(String aToPath, Object aObj, char aDelimiter, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
to use when processing primitive types, wrapper types or complex types.
-
ClassStructMapImpl
public ClassStructMapImpl(Object aObj, String aFromPath, char aDelimiter, SimpleType aTypeMode)
Creates aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
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 aClassStructMap
instance containing the elements as ofPathMap.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
- TheSimpleType
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 interfaceTypeModeAccessor
- 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 interfaceClassStructMap
- 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 interfaceKeys<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.
-
keySet
public Set<String> keySet()
Retrieves a collection containing all the keys found in the elements of this collection.
-
values
public Collection<Class<?>> values()
Returns aCollection
view of the values related to the contained keys.- Specified by:
values
in interfaceKeys<String,Class<?>>
- Returns:
- A
Collection
view of the values related to the contained keys.
-
size
public int size()
Returns the number of data elements contained in the collection.- Specified by:
size
in interfaceContainable
- Returns:
- An integer representing the number of items stored in the accumulation.
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceorg.refcodes.mixin.EmptyAccessor
-
retrieveFrom
public ClassStructMap retrieveFrom(String aFromPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be the root paths for the newPathMap
. Given we have a value for path "/dog/cat" in thePathMap
and we callPathMap.retrieveFrom(String)
with "/dog", then the resultingPathMap
will contain the path "/cat" for that value.- Specified by:
retrieveFrom
in interfaceClassStructMap
- Specified by:
retrieveFrom
in interfacePathMap<Class<?>>
- Parameters:
aFromPath
- The path from where to start extracting the paths.- Returns:
- The
PathMap
with the elements below the provided path which are root elements in the newPathMap
.
-
retrieveTo
public ClassStructMap retrieveTo(String aToPath)
Extracts a newPathMap
from thisPathMap
's elements with the paths relocated to the provided "to-path". Given we have a value for path "/dog/cat" in thePathMap
and we callPathMap.retrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.- Specified by:
retrieveTo
in interfaceClassStructMap
- Specified by:
retrieveTo
in interfacePathMap<Class<?>>
- Parameters:
aToPath
- The path where to relocate the paths of thisPathMap
to.- Returns:
- The
PathMap
with the elements from the providedPathMap
with accordingly relocated paths.
-
getAnnotator
public char getAnnotator()
- Specified by:
getAnnotator
in interfaceorg.refcodes.mixin.AnnotatorAccessor
-
getDelimiter
public char getDelimiter()
- Specified by:
getDelimiter
in interfaceorg.refcodes.mixin.DelimiterAccessor
-
getType
public Class<Class<?>> getType()
- Specified by:
getType
in interfaceorg.refcodes.mixin.TypeAccessor<Class<?>>
-
toDataStructure
public Object toDataStructure(String aFromPath)
Similar to thePathMap.toMap(String)
method, though in case all the keys of a nestedMap
instance (applicable to the rootMap
as well) represent an array (as ofPathMap.getArray( String)
), then an array is generated where the index of each value in theMap
is represented by the number representation of theMap
's key for that value. The result is a data structure consisting ofMap
instances and arrays.- Specified by:
toDataStructure
in interfacePathMap<Class<?>>
- Parameters:
aFromPath
- The path below which thePathMap
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.
-
-