T
- The type of the terminating elements.Clearable
, Containable
, org.refcodes.mixin.DelimiterAccessor
, Dictionary<String,T>
, Dictionary.MutableDictionary<String,T>
, org.refcodes.mixin.Dumpable
, Keys<String,T>
, Keys.MutableKeys<String,T>
, Keys.MutableValues<String,T>
, Map<String,T>
, PathMap<T>
, org.refcodes.mixin.TypeAccessor<T>
CanonicalMap.CanonicalMapBuilder
, CanonicalMap.MutableCanonicalMap
, PathMap.PathMapBuilder<T>
CanonicalMapBuilderImpl
, PathMapBuilderImpl
public static interface PathMap.MutablePathMap<T> extends PathMap<T>, Dictionary.MutableDictionary<String,T>, Map<String,T>
PathMap
with mutator functionality.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>>
Keys.MutableKeys<K,V>, Keys.MutableValues<K,V>
Map.Entry<K extends Object,V extends Object>
PathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>
Modifier and Type | Method | Description |
---|---|---|
default T |
delete(String aKey) |
Removes an element identified by the given key.
|
default void |
insert(Object aFrom) |
Inspects the given object and adds all elements found in the given
object.
|
default void |
insert(String aToPath,
Object aFrom,
String aFromPath) |
Same as
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. |
default void |
insert(String aToPath,
PathMap<T> aFrom,
String aFromPath) |
Method to semantically emphasize that we support our own types.
|
default void |
insert(PathMap<T> aFrom) |
Method to semantically emphasize that we support our own types.
|
default void |
insertFrom(Object aFrom,
String aFromPath) |
Same as
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. |
default void |
insertFrom(PathMap<T> aFrom,
String aFromPath) |
Method to semantically emphasize that we support our own types.
|
default void |
insertTo(String aToPath,
Object aFrom) |
Same as
insert(Object) though starting insertion of object's
introspected values at the given "path". |
default void |
insertTo(String aToPath,
PathMap<T> aFrom) |
Method to semantically emphasize that we support our own types.
|
default T |
put(String aParentPath,
String aChildPath,
T aValue) |
Puts the given value into the child's path, relative to the given
parent's path.
|
default T |
put(Relation<String,T> aRelation) |
Adds the given element related to the given key.
|
default T[] |
putArray(String aPath,
T[] aValues) |
Sets the records below the given path in an array and replaces any
existing array.
|
default T[] |
putArray(T[] aValues) |
Applies the
putArray(Object[]) method for the root path "/". |
default void |
removeAll(String aPath) |
Removes all properties below the provided path.
|
isEmpty, size
containsKey, containsValue, get, get, keySet, use, values
put
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
childrenOf, directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, retrieve, retrieveFrom, retrieveTo, toDataStructure, toDataStructure, toExternalKey, toMap, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
default T put(Relation<String,T> aRelation)
put
in interface Dictionary.MutableDictionary<String,T>
aRelation
- the relationdefault T[] putArray(T[] aValues)
putArray(Object[])
method for the root path "/".aValues
- The values to be put.default T[] putArray(String aPath, T[] aValues)
PathMap
are reckoned to be part of an array when
they belong to the same hierarchy level and when their keys represent
integer numbers.
Given the below example, the elements below "/animals/dogs" can be
represented as an array with five elements (the path is denoted at
the left hand side of the assignment ":=" operator and the value at
the right and side accordingly):
PathMap.getArray(String)
for the
path "/animals/dogs" would contain {"ace", "bandit", "radar", "echo",
"snoopy"}. Calling isArray("/animals/dogs")
would return
true
whereas calling isArray("/animals")
would return false.aPath
- the pathaValues
- The values to be put.default T delete(String aKey)
delete
in interface Keys.MutableKeys<String,T>
aKey
- The key which's element is to be removed.default void removeAll(String aPath)
aPath
- The path from where to remove all properties.default T put(String aParentPath, String aChildPath, T aValue)
aParentPath
- The parent's path relative to which to put the
value.aChildPath
- The child's path, targets the value relative to the
parent's path.aValue
- The value to be added.default 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.aFrom
- The object which is to be inspected with the therein
contained values being added with their according determined
paths.default void insertFrom(Object aFrom, String aFromPath)
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.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.default void insertTo(String aToPath, Object aFrom)
insert(Object)
though starting insertion of object's
introspected values at the given "path".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.default void insert(String aToPath, Object aFrom, String aFromPath)
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".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.default void insert(PathMap<T> aFrom)
insert(Object)
.aFrom
- The PathMap
which is to be inspected with the
therein contained values being added with their according
determined paths.default void insertFrom(PathMap<T> aFrom, String aFromPath)
insertFrom(Object, String)
.aFrom
- The PathMap
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.default void insertTo(String aToPath, PathMap<T> aFrom)
insertTo(String, Object)
.aToPath
- The sub-path where to insert the object's introspected
values to.aFrom
- The PathMap
which is to be inspected with the
therein contained values being added with their according
determined paths.default void insert(String aToPath, PathMap<T> aFrom, String aFromPath)
insert(String, Object, String)
.aToPath
- The sub-path where to insert the object's introspected
values to.aFrom
- The PathMap
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.Copyright © 2018. All rights reserved.