T
- the generic type of the elements to be contained herein.Serializable
, Map<String,T>
, org.refcodes.mixin.AnnotatorAccessor
, org.refcodes.mixin.Clearable
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.mixin.Dumpable
, org.refcodes.mixin.TypeAccessor<T>
, Containable
, Dictionary<String,T>
, Dictionary.MutableDictionary<String,T>
, Dictionary.MutableDictionary.DictionaryBuilder<String,T,PathMap.PathMapBuilder<T>>
, Keys<K,V>
, Keys.MutableKeys<K,V>
, Keys.MutableValues<K,V>
, PathMap<T>
, PathMap.MutablePathMap<T>
, PathMap.PathMapBuilder<T>
CanonicalMapBuilderImpl
, ClassStructMapBuilderImpl
, SimpleTypeMapBuilderImpl
public class PathMapBuilderImpl<T> extends Object implements PathMap.PathMapBuilder<T>, Serializable
org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B extends org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B>>, org.refcodes.mixin.AnnotatorAccessor.AnnotatorMutator, org.refcodes.mixin.AnnotatorAccessor.AnnotatorProperty
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
Dictionary.MutableDictionary<K,V>
Dictionary.MutableDictionary.DictionaryBuilder<K,V,B extends Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
Map.Entry<K extends Object,V extends Object>
PathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>
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>
Modifier and Type | Field | Description |
---|---|---|
protected Map<String,T> |
_backingMap |
Constructor | Description |
---|---|
PathMapBuilderImpl(char aDelimiter,
Class<T> aType) |
Create a
PathMap.PathMapBuilder instance using the provided path
delimiter for the path declarations. |
PathMapBuilderImpl(Class<T> aType) |
Create an empty
PathMap.PathMapBuilder instance using the default path
delimiter "/" (Delimiter.PATH ) for the path declarations. |
PathMapBuilderImpl(Object aObj,
char aDelimiter,
Class<T> aType) |
Creates a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) . |
PathMapBuilderImpl(Object aObj,
Class<T> aType) |
Create a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) using the default path delimiter
"/" (Delimiter.PATH ) for the path declarations. |
PathMapBuilderImpl(Object aObj,
String aFromPath,
char aDelimiter,
Class<T> aType) |
Creates a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) . |
PathMapBuilderImpl(Object aObj,
String aFromPath,
Class<T> aType) |
Creates a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) using the default path delimiter
"/" (Delimiter.PATH ) for the path declarations. |
PathMapBuilderImpl(String aToPath,
Object aObj,
char aDelimiter,
Class<T> aType) |
Creates a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) . |
PathMapBuilderImpl(String aToPath,
Object aObj,
Class<T> aType) |
Create a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) using the default path delimiter
"/" (Delimiter.PATH ) for the path declarations. |
PathMapBuilderImpl(String aToPath,
Object aObj,
String aFromPath,
char aDelimiter,
Class<T> aType) |
Create a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) . |
PathMapBuilderImpl(String aToPath,
Object aObj,
String aFromPath,
Class<T> aType) |
Creates a
PathMap.PathMapBuilder instance containing the elements as of
PathMap.MutablePathMap.insert(Object) using the default path delimiter
"/" (Delimiter.PATH for the path declarations. |
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
|
T |
compute(String aPath,
BiFunction<? super String,? super T,? extends T> remappingFunction) |
|
T |
computeIfAbsent(String aPath,
Function<? super String,? extends T> mappingFunction) |
|
T |
computeIfPresent(String aPath,
BiFunction<? super String,? super T,? extends T> remappingFunction) |
|
boolean |
containsKey(Object aPath) |
Tests whether there is an element with the given key.
|
boolean |
containsValue(Object value) |
This method is defined for the sake of
Map conformity. |
protected Map<String,T> |
createBackingMap() |
Hook for creating an individual backing
Map to be used by the
PathMapBuilderImpl . |
Set<Map.Entry<String,T>> |
entrySet() |
|
boolean |
equals(Object o) |
|
void |
forEach(BiConsumer<? super String,? super T> action) |
|
protected PathMap<T> |
fromObject(Object aFrom) |
|
protected void |
fromValue(String aToPath,
Object aObj) |
Hook method for intercepting or modifying the process of object
introspection.
|
protected void |
fromValue(String aToPath,
Object aValue,
Set<Object> aVisited) |
|
T |
get(Object aPath) |
Retrieves the element assigned to the given key.
|
char |
getAnnotator() |
|
char |
getDelimiter() |
|
T |
getOrDefault(Object aPath,
T publicValue) |
|
Class<T> |
getType() |
|
int |
hashCode() |
|
void |
insert(Object aFrom) |
Inspects the given object and adds all elements found in the given
object.
|
void |
insertBetween(String aToPath,
Object aFrom,
String aFromPath) |
Same as
PathMap.MutablePathMap.insert(Object) though starting insertion of object's
introspected values at the given "to-path" and starting object
introspection at the given "from-path", e.g. ignoring all paths not
starting with the given path during the introspection process. |
void |
insertFrom(Object aFrom,
String aFromPath) |
Same as
PathMap.MutablePathMap.insert(Object) though starting object introspection
at the given "path", e.g. ignoring all paths not starting with the
given path during the introspection process. |
void |
insertTo(String aToPath,
Object aFrom) |
Same as
PathMap.MutablePathMap.insert(Object) though starting insertion of object's
introspected values at the given "path". |
boolean |
isEmpty() |
Tests whether the accumulation is empty or not.
|
Set<String> |
keySet() |
Retrieves a collection containing all the keys found in the elements of
this collection.
|
void |
merge(Object aFrom) |
Inspects the given object and adds all elements found in the given
object in case the targeted path does not exist or points to a null
value.
|
T |
merge(String aPath,
T value,
BiFunction<? super T,? super T,? extends T> remappingFunction) |
|
void |
mergeBetween(String aToPath,
Object aFrom,
String aFromPath) |
Same as
PathMap.MutablePathMap.merge(Object) though starting merging of object's
introspected values at the given "to-path" and starting object
introspection at the given "from-path", e.g. ignoring all paths not
starting with the given path during the introspection process. |
void |
mergeFrom(Object aFrom,
String aFromPath) |
Same as
PathMap.MutablePathMap.merge(Object) though starting object introspection
at the given "path", e.g. ignoring all paths not starting with the
given path during the introspection process. |
void |
mergeTo(String aToPath,
Object aFrom) |
Same as
PathMap.MutablePathMap.merge(Object) though starting merging of object's
introspected values at the given "path". |
T |
put(String aPath,
T aValue) |
Puts an element identified by the given key.
|
void |
putAll(Map<? extends String,? extends T> m) |
|
T |
putIfAbsent(String aPath,
T value) |
|
T |
remove(Object aPath) |
|
boolean |
remove(Object aPath,
Object value) |
|
T |
replace(String aPath,
T value) |
|
boolean |
replace(String aPath,
T oldValue,
T newValue) |
|
void |
replaceAll(BiFunction<? super String,? super T,? extends T> function) |
|
PathMap<T> |
retrieveFrom(String aFromPath) |
|
PathMap<T> |
retrieveTo(String aToPath) |
|
int |
size() |
Returns the number of data elements contained in the collection.
|
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. |
String |
toString() |
|
protected T |
toTypeInstance(Object aObj) |
Hook method when introspecting an object to help conversion of that
object to the target types.
|
Collection<T> |
values() |
Returns a
Collection view of the values related to the contained
keys. |
PathMap.PathMapBuilder<T> |
withPut(String aKey,
T aValue) |
Builder method for
Keys.MutableValues.put(Object, Object) . |
entry, of, of, of, of, of, of, of, of, of, of, of, ofEntries
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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, getDir, getDir, getDir, getDir, getDir, getDirAt, getDirAt, getDirAt, getDirAt, getDirAt, getDirAt, 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, query, query, query, query, query, queryBetween, queryBetween, queryBetween, queryBetween, queryBetween, queryBetween, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryFrom, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, queryPaths, queryTo, queryTo, queryTo, queryTo, queryTo, queryTo, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveBetween, retrieveFrom, retrieveFrom, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, retrieveTo, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, sortedKeys, toDataStructure, toExternalPath, toInstance, toInstance, toLeaf, toMap, toMap, toNormalizedPath, toParentPath, toPath, toPath, toPath, toPathElements, toPathList, toPathStack, toPropertyPath, toType, toType
add, add, add, add, add, add, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendDirTo, appendValueTo, appendValueTo, appendValueTo, appendValueTo, appendValueTo, appendValueTo, delete, delete, delete, delete, delete, insert, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertBetween, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertFrom, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, insertTo, merge, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeBetween, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, mergeTo, put, put, put, put, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putArray, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putDirAt, putValueAt, putValueAt, putValueAt, putValueAt, putValueAt, putValueAt, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeDirAt, removeDirAt, removeDirAt, removeDirAt, removeDirAt, removeFrom, removeFrom, removeFrom, removeFrom, removeFrom, removePaths, removePaths, removeValueAt, removeValueAt, removeValueAt, removeValueAt, removeValueAt, toSourceCode, toSourceCode
withInsert, withInsert, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertBetween, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertFrom, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withInsertTo, withMerge, withMerge, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeBetween, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeFrom, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withMergeTo, withPut, withPut, withPut, withPut, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withPutDirAt, withRemoveFrom, withRemoveFrom, withRemoveFrom, withRemoveFrom, withRemoveFrom, withRemovePaths
public PathMapBuilderImpl(Class<T> aType)
PathMap.PathMapBuilder
instance using the default path
delimiter "/" (Delimiter.PATH
) for the path declarations.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(char aDelimiter, Class<T> aType)
PathMap.PathMapBuilder
instance using the provided path
delimiter for the path declarations.aDelimiter
- The path delimiter to be used for the path
declarations.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(Object aObj, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
using the default path delimiter
"/" (Delimiter.PATH
) for the path declarations.aObj
- The object from which the elements are to be added.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(String aToPath, Object aObj, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
using the default path delimiter
"/" (Delimiter.PATH
) for the path declarations.aToPath
- The sub-path where to insert the object's introspected
values to.aObj
- The object from which the elements are to be added.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(Object aObj, String aFromPath, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
using the default path delimiter
"/" (Delimiter.PATH
) for the path declarations.aObj
- The object from which the elements are to be added.aFromPath
- The path from where to start adding elements of the
provided object.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(String aToPath, Object aObj, String aFromPath, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
using the default path delimiter
"/" (Delimiter.PATH
for the path declarations.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.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(Object aObj, char aDelimiter, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
.aObj
- The object from which the elements are to be added.aDelimiter
- The path delimiter to be used for the path
declarations.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(String aToPath, Object aObj, char aDelimiter, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
.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.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(Object aObj, String aFromPath, char aDelimiter, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
.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.aType
- The type of the values being referenced by the paths.public PathMapBuilderImpl(String aToPath, Object aObj, String aFromPath, char aDelimiter, Class<T> aType)
PathMap.PathMapBuilder
instance containing the elements as of
PathMap.MutablePathMap.insert(Object)
.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.aType
- The type of the values being referenced by the paths.public boolean containsKey(Object aPath)
containsKey
in interface Keys<K,V>
containsKey
in interface Map<String,T>
aPath
- The key for which to test whether there is an element.public T getOrDefault(Object aPath, T publicValue)
getOrDefault
in interface Map<String,T>
public T putIfAbsent(String aPath, T value)
putIfAbsent
in interface Map<String,T>
public T computeIfAbsent(String aPath, Function<? super String,? extends T> mappingFunction)
computeIfAbsent
in interface Map<String,T>
public T computeIfPresent(String aPath, BiFunction<? super String,? super T,? extends T> remappingFunction)
computeIfPresent
in interface Map<String,T>
public T compute(String aPath, BiFunction<? super String,? super T,? extends T> remappingFunction)
public T merge(String aPath, T value, BiFunction<? super T,? super T,? extends T> remappingFunction)
public PathMap<T> retrieveTo(String aToPath)
PathMap
from this PathMap
's elements with
the paths relocated to the provided "to-path". Given we have a value for
path "/dog/cat" in the PathMap
and we call
PathMap.retrieveTo(String)
with "/animals", then the resulting
PathMap
will contain the path "/animals/dog/cat" for that value.public PathMap<T> retrieveFrom(String aFromPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be the root paths for the
new PathMap
. Given we have a value for path "/dog/cat" in the
PathMap
and we call PathMap.retrieveFrom(String)
with "/dog",
then the resulting PathMap
will contain the path "/cat" for that
value.retrieveFrom
in interface PathMap<T>
aFromPath
- The path from where to start extracting the paths.PathMap
with the elements below the provided path
which are root elements in the new PathMap
.public char getDelimiter()
getDelimiter
in interface org.refcodes.mixin.DelimiterAccessor
public char getAnnotator()
getAnnotator
in interface org.refcodes.mixin.AnnotatorAccessor
public Class<T> getType()
getType
in interface org.refcodes.mixin.TypeAccessor<T>
public Object toDataStructure(String aFromPath)
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.toDataStructure
in interface PathMap<T>
aFromPath
- The path below which the PathMap
to be converted
into a data structure.Map
instances and
arrays representing the data below the given path.public void insert(Object aFrom)
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.insert
in interface PathMap.MutablePathMap<T>
aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.public void insertBetween(String aToPath, Object aFrom, String aFromPath)
PathMap.MutablePathMap.insert(Object)
though starting insertion of object's
introspected values at the given "to-path" and starting object
introspection at the given "from-path", e.g. ignoring all paths not
starting with the given path during the introspection process. The
resulting paths do not start with the "from-path" path, them start
with the given "to-path".insertBetween
in interface PathMap.MutablePathMap<T>
aToPath
- The sub-path where to insert the object's introspected
values to.aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.aFromPath
- The path from where to start adding elements of the
provided object.public void insertFrom(Object aFrom, String aFromPath)
PathMap.MutablePathMap.insert(Object)
though starting object introspection
at the given "path", e.g. ignoring all paths not starting with the
given path during the introspection process. The resulting paths do
not start with the provided path.insertFrom
in interface PathMap.MutablePathMap<T>
aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.aFromPath
- The path from where to start adding elements of the
provided object.public void insertTo(String aToPath, Object aFrom)
PathMap.MutablePathMap.insert(Object)
though starting insertion of object's
introspected values at the given "path".insertTo
in interface PathMap.MutablePathMap<T>
aToPath
- The sub-path where to insert the object's introspected
values to.aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.public void merge(Object aFrom)
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.merge
in interface PathMap.MutablePathMap<T>
aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.public void mergeBetween(String aToPath, Object aFrom, String aFromPath)
PathMap.MutablePathMap.merge(Object)
though starting merging of object's
introspected values at the given "to-path" and starting object
introspection at the given "from-path", e.g. ignoring all paths not
starting with the given path during the introspection process. The
resulting paths do not start with the "from-path" path, them start
with the given "to-path".mergeBetween
in interface PathMap.MutablePathMap<T>
aToPath
- The sub-path where to merge the object's introspected
values to.aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.aFromPath
- The path from where to start adding elements of the
provided object.public void mergeFrom(Object aFrom, String aFromPath)
PathMap.MutablePathMap.merge(Object)
though starting object introspection
at the given "path", e.g. ignoring all paths not starting with the
given path during the introspection process. The resulting paths do
not start with the provided path.mergeFrom
in interface PathMap.MutablePathMap<T>
aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.aFromPath
- The path from where to start adding elements of the
provided object.public void mergeTo(String aToPath, Object aFrom)
PathMap.MutablePathMap.merge(Object)
though starting merging of object's
introspected values at the given "path".mergeTo
in interface PathMap.MutablePathMap<T>
aToPath
- The sub-path where to merge the object's introspected
values to.aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.public PathMap.PathMapBuilder<T> withPut(String aKey, T aValue)
Keys.MutableValues.put(Object, Object)
.withPut
in interface Dictionary.MutableDictionary.DictionaryBuilder<String,T,PathMap.PathMapBuilder<T>>
aKey
- the key for the property to be put.aValue
- the value for the property to be put.public int size()
public boolean isEmpty()
public boolean containsValue(Object value)
Map
conformity. Tests
whether the provided value has a key assigned.containsValue
in interface Keys<K,V>
containsValue
in interface Map<String,T>
value
- The value to test if a key references this value.public void clear()
public Set<String> keySet()
public Collection<T> values()
Collection
view of the values related to the contained
keys.public boolean equals(Object o)
public int hashCode()
public void forEach(BiConsumer<? super String,? super T> action)
public void replaceAll(BiFunction<? super String,? super T,? extends T> function)
replaceAll
in interface Map<String,T>
protected void fromValue(String aToPath, Object aObj)
aToPath
- The sub-path where to insert the object's introspected
values to.aObj
- The object from which the elements are to be added.protected T toTypeInstance(Object aObj)
Class.isAssignableFrom(Class)
with
the type retrieved by getType()
.aObj
- The object which is to be transformed to the expected type as
of getType()
.Copyright © 2021. All rights reserved.