-
- Type Parameters:
T
- The type of the terminating elements.
- All Superinterfaces:
org.refcodes.mixin.AnnotatorAccessor
,Containable
,org.refcodes.mixin.DelimiterAccessor
,Dictionary<String,T>
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.EmptyAccessor
,Keys<String,T>
,org.refcodes.mixin.TypeAccessor<T>
- All Known Subinterfaces:
CanonicalMap
,CanonicalMap.CanonicalMapBuilder
,CanonicalMap.MutableCanonicalMap
,ClassStructMap
,ClassStructMap.ClassStructMapBuilder
,ClassStructMap.MutableClassStructMap
,InterOperableMap<T>
,InterOperableMap.InterOperableMapBuilder<T>
,InterOperableMap.MutableInterOperableMap<T>
,PathMap.MutablePathMap<T>
,PathMap.PathMapBuilder<T>
,SimpleTypeMap
,SimpleTypeMap.MutableSimpleTypeMap
,SimpleTypeMap.SimpleTypeMapBuilder
- All Known Implementing Classes:
CanonicalMapBuilderImpl
,CanonicalMapImpl
,ClassStructMapBuilderImpl
,ClassStructMapImpl
,PathMapBuilderImpl
,PathMapImpl
,SimpleTypeMapBuilderImpl
,SimpleTypeMapImpl
public interface PathMap<T> extends Dictionary<String,T>, org.refcodes.mixin.TypeAccessor<T>, org.refcodes.mixin.Dumpable, org.refcodes.mixin.DelimiterAccessor, org.refcodes.mixin.AnnotatorAccessor
APathMap
is a flat map by which each element is addressed by a path; represented by thePathMap
's keys. Each path's elements is separated from each other by theDelimiterAccessor.getDelimiter()
character, which, by default, is set to '/'. For the sake of simplicity, we assume a path delimiter of '/' being used when describing the functioning of thePathMap
.The
PathMap
distinguishes between leaves and directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory).Given the example below, "dilbert", "otto", "loki" and "gred" are reckoned to be leaves whereas "animals", "dogs", "machines" and "robots" are recokned to be directories: *
- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
To address an element in a
PathMap
, an absolute path is to be provided, e.g. the provided path must start with the path delimiter. A valid path would look something like "/animals/dogs/otto".A path is also handled as an absolute path if it does not(!) begin with a delimiter, e.g. both paths "/machines/robots/greg" and "machines/robots/greg" point to the same "greg" leave.
Elements in a
PathMap
are reckoned to be an array when they belong to the same hierarchy level and when their keys represent integer numbers. In such a case additional array related functionality is at your hands. E.g.isIndexDir(String)
,getDirAt(String, int)
orgetArray(String)
.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 ":=" and the value at the right and side accordingly):
- "/animals/dogs/0" := "ace"
- "/animals/dogs/1" := "bandit"
- "/animals/dogs/2" := "radar"
- "/animals/dogs/3" := "echo"
- "/animals/dogs/4" := "snoopy"
getArray(String)
for the path "/animals/dogs" would contain {"ace", "bandit", "radar", "echo", "snoopy"}. CallingisArray("/animals/dogs")
would returntrue
whereas callingisArray("/animals")
would return false.Before processing, an implementation of the
PathMap
should calltoNormalizedPath(String)
for each path provided, which will remove any trailing path separators and add any missing prefixed delimiter.As all the keys in the
PathMap
represent paths, we can apply some path specific logic to aPathMap
. This is reflected by methods such asPathMap.MutablePathMap.insertFrom(Object, String)
andPathMap.MutablePathMap.insertTo(String, Object)
orretrieveFrom(String)
andretrieveTo(String)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PathMap.MutablePathMap<T>
ThePathMap.MutablePathMap
adds mutable functionality to thePathMap
.static interface
PathMap.PathMapBuilder<T>
ThePathMap.PathMapBuilder
adds builder functionality to thePathMap.MutablePathMap
.-
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.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.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>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Set<String>
children()
Retrieves the entry names below the root including leaves as well as directories.default Set<String>
children(Object aPath)
Retrieves the entry names below the given path including leaves as well as directories.default Set<String>
children(Object... aPathElements)
Retrieves the entry names below the given path including leaves as well as directories.default Set<String>
children(String aPath)
Retrieves the entry names below the given path including leaves as well as directories.default Set<String>
children(String... aPathElements)
Retrieves the entry names below the given path including leaves as well as directories.default Set<String>
children(Collection<?> aPathElements)
Retrieves the entry names below the given path including leaves as well as directories.default boolean
containsKey(Object... aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.default boolean
containsKey(String... aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.default boolean
containsKey(Collection<?> aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.default Set<String>
dirs()
Applies thedirs(String)
method for the root path "/".default Set<String>
dirs(Object aPath)
Retrieves the directory names below the given path excluding any entries representing leaves.default Set<String>
dirs(Object... aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves.default Set<String>
dirs(String aPath)
Retrieves the directory names below the given path excluding any entries representing leaves.default Set<String>
dirs(String... aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves.default Set<String>
dirs(Collection<?> aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves.default Set<String>
findPaths(T aValue)
Finds all paths whose values equal that of the given value.default String
fromExternalPath(String aPath, char... aDelimiters)
Converts an external key (path) which uses a different notation fromDelimiterAccessor.getDelimiter()
for the path delimiter and converts those to the default delimiter.default T
get(Object... aPathElements)
Experimental convenience method: Applies theKeys.get(Object)
method for the provided path elements by first converting them to aString
(if not being aString
already) and then concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default T
get(String... aPathElements)
Applies theKeys.get(Object)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default T
get(Collection<?> aPathElements)
Experimental convenience method: Applies theKeys.get(Object)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default T[]
getArray()
Applies thegetArray(String)
method for the root path "/".default T[]
getArray(Object... aPathElements)
Applies thegetArray(String)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default T[]
getArray(String aPath)
Returns the leaves below the given path in an array.default T[]
getArray(String... aPathElements)
Applies thegetArray(String)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default T[]
getArray(Collection<?> aPathElements)
Applies thegetArray(String)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default int[]
getArrayIndexes()
Returns the indexes pointing to elements of the root "array" path.default int[]
getArrayIndexes(Object... aPathElements)
Returns the indexes pointing to elements of the given "array" path.default int[]
getArrayIndexes(String aPath)
Returns the indexes pointing to elements of the given "array" path.default int[]
getArrayIndexes(String... aPathElements)
Returns the indexes pointing to elements of the given "array" path.default int[]
getArrayIndexes(Collection<?> aPathElements)
Returns the indexes pointing to elements of the given "array" path.default PathMap<T>
getDir(Object aPath)
Gets the children elements of the provided parent's path, excluding the parent's path.default PathMap<T>
getDir(Object... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
getDir(String aPath)
default PathMap<T>
getDir(String... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
getDir(Collection<?> aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
getDirAt(int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default PathMap<T>
getDirAt(Object[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default PathMap<T>
getDirAt(Object aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default PathMap<T>
getDirAt(String[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default PathMap<T>
getDirAt(String aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default PathMap<T>
getDirAt(Collection<?> aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes()
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default String
getRootPath()
Returns the path pointing to the root of thisPathMap
.default T
getValueAt(int aIndex)
Returns the value of an array at the root path with the given array index or null if there is none such value.default T
getValueAt(Object[] aPathElements, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.default T
getValueAt(Object aPath, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.default T
getValueAt(String[] aPathElements, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.default T
getValueAt(String aPath, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.default T
getValueAt(Collection<?> aPathElements, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.default boolean
hasChildren(Object aPath)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(Object... aPathElements)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(String aPath)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(String... aPathElements)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(Collection<?> aPathElements)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasDirAt(int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(Object[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(Object aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(String[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(String aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(Collection<?> aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasParentPath(String aPath)
Tests whether there exists a parent path for the given path.default boolean
hasPath(Object... aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
.default boolean
hasPath(String aPath)
Determines whether the provided path represents a path within the givenPathMap
.default boolean
hasPath(String... aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
.default boolean
hasPath(Collection<?> aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
.default boolean
hasSubDirs(Object aPath)
Determines whether the give path points to a directory which contains sub-directories.default boolean
hasSubDirs(Object... aPathElements)
Determines whether the give path points to a directory which contains sub-directories.default boolean
hasSubDirs(String aPath)
Determines whether the give path points to a directory which contains sub-directories.default boolean
hasSubDirs(Collection<?> aPathElements)
Determines whether the give path points to a directory which contains sub-directories.default boolean
hasValue(Object aPath)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
hasValue(Object... aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
hasValue(String aPath)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
hasValue(String... aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
hasValue(Collection<?> aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
hasValueAt(int aIndex)
Determines whether the index below the root points to an element of an "array" Given the following paths:/0/0aaa /1/1aaa
For indexes 0 and 1 you will get true, for all others you will get false.default boolean
hasValueAt(Object aPath)
Determines whether the path points to an index inside an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.default boolean
hasValueAt(Object[] aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array".default boolean
hasValueAt(Object aPath, int aIndex)
Determines whether the index below the path points to an element of an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.default boolean
hasValueAt(String aPath)
Determines whether the path points to an index inside an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.default boolean
hasValueAt(String[] aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array".default boolean
hasValueAt(String aPath, int aIndex)
Determines whether the index below the path points to an element of an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.default boolean
hasValueAt(Collection<?> aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array".default boolean
isArray()
Applies theisArray(String)
method for the root path "/".default boolean
isArray(Object aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.default boolean
isArray(Object... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArray(String aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.default boolean
isArray(String... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArray(Collection<?> aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isChild(Object... aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isChild(String aPath)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isChild(String... aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isChild(Collection<?> aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isDir(Object aPath)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(Object... aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(String aPath)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(String... aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(Collection<?> aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isEqualTo(PathMap<?> aOther)
default boolean
isIndexDir()
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isIndexDir(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isIndexDir(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isIndexDir(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isIndexDir(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isLeaf(Object aPath)
Determines whether the give path points to a leaf in terms ofdirs(String)
.default boolean
isLeaf(Object... aPathElements)
Determines whether the give path points to a leaf in terms ofdirs(String)
.default boolean
isLeaf(String aPath)
Determines whether the give path points to a leaf in terms ofleaves(String)
.default boolean
isLeaf(String... aPathElements)
Determines whether the give path points to a leaf in terms ofdirs(String)
.default boolean
isLeaf(Collection<?> aPathElements)
Determines whether the give path points to a leaf in terms ofdirs(String)
.default boolean
isRootPath(String aPath)
Determines whether the given path represents the toor path.default Set<String>
keySet(Object aPath)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.default Set<String>
keySet(Object... aPathElements)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.default Set<String>
keySet(String aPath)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.default Set<String>
keySet(String... aPathElements)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.default Set<String>
keySet(Collection<?> aPathElements)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.default int
lastArrayIndex()
Returns the last index as ofgetArrayIndexes()
.default int
lastArrayIndex(Object aPath)
Returns the last index as ofgetArrayIndexes(String)
.default int
lastArrayIndex(Object... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String[])
.default int
lastArrayIndex(String aPath)
Returns the last index as ofgetArrayIndexes(String)
.default int
lastArrayIndex(String... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String[])
.default int
lastArrayIndex(Collection<?> aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(Collection)
.default int
lastDirIndex()
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default Set<String>
leaves()
Applies theleaves(String)
method for the root path "/".default Set<String>
leaves(Object aPath)
Retrieves the leaves names below the given path excluding any entries representing directories.default Set<String>
leaves(Object... aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories.default Set<String>
leaves(String aPath)
Retrieves the leaves names below the given path excluding any entries representing directories.default Set<String>
leaves(String... aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories.default Set<String>
leaves(Collection<?> aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories.default int
nextArrayIndex()
Returns the next index to be used (and not used yet) as ofgetArrayIndexes()
.default int
nextArrayIndex(Object aPath)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String)
.default int
nextArrayIndex(Object... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String...)
.default int
nextArrayIndex(String aPath)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String)
.default int
nextArrayIndex(String... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String...)
.default int
nextArrayIndex(Collection<?> aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(Collection)
.default int
nextDirIndex()
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default Set<String>
paths()
Same asKeys.keySet()
with according semantics in the method name.default Set<String>
paths(Object aPath)
Same askeySet(String)
with according semantics in the method name.default Set<String>
paths(Object... aPathElements)
Same askeySet(String)
with according semantics in the method name.default Set<String>
paths(String aPath)
Same askeySet(String)
with according semantics in the method name.default Set<String>
paths(String... aPathElements)
Same askeySet(String)
with according semantics in the method name.default Set<String>
paths(Collection<?> aPathElements)
Same askeySet(String)
with according semantics in the method name.default PathMap<T>
query(Object... aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(String aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(String... aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(Collection<?> aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(Pattern aRegExp)
Queries the keys of the instance using a regular expression as of the providedPattern
instance.default PathMap<T>
queryBetween(Object[] aFromPath, Object[] aPathQuery, Object[] aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(Object aFromPath, Object aPathQuery, Object aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(String[] aFromPath, String[] aPathQuery, String[] aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(String aFromPath, String aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(String aFromPath, Pattern aRegExp, String aToPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.default PathMap<T>
queryBetween(Collection<?> aFromPath, Collection<?> aPathQuery, Collection<?> aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(Object[] aPathQuery, Object[] aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(Object aPathQuery, Object aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(String[] aPathQuery, String[] aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(String aPathQuery, String aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(Collection<?> aPathQuery, Collection<?> aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(Pattern aRegExp, String aFromPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.default Set<String>
queryPaths(Object aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default Set<String>
queryPaths(Object... aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default Set<String>
queryPaths(String aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default Set<String>
queryPaths(String... aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default Set<String>
queryPaths(Collection<?> aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default Set<String>
queryPaths(Pattern aRegExp)
Queries the keys of the instance using a regular expression as of the providedPattern
.default PathMap<T>
queryTo(Object[] aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(Object aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(String[] aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(String aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(Collection<?> aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(Pattern aRegExp, String aToPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.default PathMap<T>
retrieveBetween(Object[] aFromPath, Object[] aToPath)
default PathMap<T>
retrieveBetween(Object aFromPath, Object aToPath)
default PathMap<T>
retrieveBetween(String[] aFromPath, String[] aToPath)
default PathMap<T>
retrieveBetween(String aFromPath, String aToPath)
default PathMap<T>
retrieveBetween(Collection<?> aFromPath, Collection<?> aToPath)
default PathMap<T>
retrieveFrom(Object aParentPath)
Gets the children elements of the provided parent's path, excluding the parent's path.default PathMap<T>
retrieveFrom(Object... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.PathMap<T>
retrieveFrom(String aFromPath)
default PathMap<T>
retrieveFrom(String... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
retrieveFrom(Collection<?> aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
retrieveTo(Object aToPath)
default PathMap<T>
retrieveTo(Object... aToPathElements)
PathMap<T>
retrieveTo(String aToPath)
default PathMap<T>
retrieveTo(String... aToPathElements)
default PathMap<T>
retrieveTo(Collection<?> aToPathElements)
default List<String>
sortedKeys()
Retrieves an alphabetically sorted list containing all the keys found in the elements of this collection.default List<String>
sortedKeys(Object aPath)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection.default List<String>
sortedKeys(Object... aPathElements)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection.default List<String>
sortedKeys(String aPath)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection.default List<String>
sortedKeys(String... aPathElements)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection.default List<String>
sortedKeys(Collection<?> aPathElements)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection.default List<String>
sortedKeys(Comparator<String> aComparator)
Retrieves a sorted list as of the providedComparator
containing all the keys found in the elements of this collection.default List<String>
sortedKeys(Comparator<String> aComparator, Object aPath)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(Comparator<String> aComparator, Object... aPathElements)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(Comparator<String> aComparator, String aPath)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(Comparator<String> aComparator, String... aPathElements)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(Comparator<String> aComparator, Collection<?> aPathElements)
Retrieves a sorted list as of the providedComparator
containing all the keys found in the elements of this collection.default List<String>
sortedKeys(PathSortStrategy aPathSortStrategy)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found in the elements of this collection.default List<String>
sortedKeys(PathSortStrategy aPathSortStrategy, Object aPath)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(PathSortStrategy aPathSortStrategy, Object... aPathElements)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(PathSortStrategy aPathSortStrategy, String aPath)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(PathSortStrategy aPathSortStrategy, String... aPathElements)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.default List<String>
sortedKeys(PathSortStrategy aPathSortStrategy, Collection<?> aPathElements)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.default Object
toDataStructure()
Applies thetoDataStructure(String)
method for the root path "/".Object
toDataStructure(String aFromPath)
Similar to thetoMap(String)
method, though in case all the keys of a nestedMap
instance (applicable to the rootMap
as well) represent an array (as ofgetArray( 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.default String
toExternalPath(String aPath, char aDelimiter)
Converts the given key (path) to an external key by converting the default delimiterDelimiterAccessor.getDelimiter()
to the provided delimiter.default <TYPE> void
toInstance(String aFromPath, TYPE aInstance)
Updates the instance with thisPathMap
's data.default <TYPE> void
toInstance(TYPE aInstance)
Updates the instance with thisPathMap
's data.default String
toLeaf(String aPath)
Returns the last path element from the given path.default Map<String,?>
toMap()
Applies thetoMap(String)
method for the root path "/".default Map<String,?>
toMap(String aFromPath)
default String
toNormalizedPath(String aPath)
Normalizes a path for it to start with the delimiter (as ofDelimiterAccessor.getDelimiter()
) and for it not to end with a delimiter.default String
toParentPath(String aPath)
Returns the path representing the parent path for the given path.default String
toPath(Object aPath)
Creates a normalized path from the provided object.default String
toPath(Object... aPathElements)
default String
toPath(String... aPathElements)
Creates a normalized path from the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.default String
toPath(Collection<?> aPathElements)
default String[]
toPathElements(String aPath)
Retrieves the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.default List<String>
toPathList(String aPath)
Retrieves a mutableList
with the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.default Stack<String>
toPathStack(String aPath)
default String
toPropertyPath(String aPath)
Converts the properties for saving; that when saved, them properties will not start with a delimiter, making them (when there are no sub-paths for the properties) look just like normal well known properties, enabling interchangeability with other systems reading the properties.default <TYPE> TYPE
toType(Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(Class<TYPE> aType, Object... aFromPathElements)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(Class<TYPE> aType, String... aFromPathElements)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(Object[] aFromPathElements, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(Object aFromPath, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(String[] aFromPathElements, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(String aFromPath, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.default <TYPE> TYPE
toType(Collection<?> aFromPathElements, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.-
Methods inherited from interface org.refcodes.struct.Containable
size
-
Methods inherited from interface org.refcodes.struct.Keys
containsKey, containsValue, get, getOr, keySet, use, values
-
-
-
-
Method Detail
-
children
default Set<String> children()
Retrieves the entry names below the root including leaves as well as directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths "/dog/cat" and "/cat/mouse" in thePathMap
and we callleaves()
, then the resultingSet
will contain the values "dog" and "cat".- Returns:
- The relative directory names starting at the root path contained
in this
PathMap
.
-
children
default Set<String> children(Collection<?> aPathElements)
Retrieves the entry names below the given path including leaves as well as directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
children(String)
with "/animals", then the resultingSet
will just contain "dogs" and "loki"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPathElements
- The path elements from which to start retrieving the children.- Returns:
- The child names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
children
default Set<String> children(Object aPath)
Retrieves the entry names below the given path including leaves as well as directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs" and "loki"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPath
- The path from which to start retrieving the children.- Returns:
- The child names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
children
default Set<String> children(Object... aPathElements)
Retrieves the entry names below the given path including leaves as well as directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
children(String)
with "/animals", then the resultingSet
will just contain "dogs" and "loki"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPathElements
- The path elements from which to start retrieving the children.- Returns:
- The child names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
children
default Set<String> children(String aPath)
Retrieves the entry names below the given path including leaves as well as directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs" and "loki"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPath
- The path from which to start retrieving the children.- Returns:
- The child names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
children
default Set<String> children(String... aPathElements)
Retrieves the entry names below the given path including leaves as well as directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
children(String)
with "/animals", then the resultingSet
will just contain "dogs" and "loki"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPathElements
- The path elements from which to start retrieving the children.- Returns:
- The child names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
containsKey
default boolean containsKey(Collection<?> aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.- Parameters:
aPathElements
- The path elements of the path representing the key.- Returns:
- True in case the element for the according path exists.
-
containsKey
default boolean containsKey(Object... aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.- Parameters:
aPathElements
- The path elements of the path representing the key.- Returns:
- True in case the element for the according path exists.
-
containsKey
default boolean containsKey(String... aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.- Parameters:
aPathElements
- The path elements of the path representing the key.- Returns:
- True in case the element for the according path exists.
-
dirs
default Set<String> dirs()
Applies thedirs(String)
method for the root path "/".- Returns:
- As of
dirs(String)
applied to the root path. - See Also:
dirs(String)
-
dirs
default Set<String> dirs(Collection<?> aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPathElements
- The path elements from which to start retrieving the directories.- Returns:
- The directory names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
dirs
default Set<String> dirs(Object aPath)
Retrieves the directory names below the given path excluding any entries representing leaves. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPath
- The path from which to start retrieving the directories.- Returns:
- The directory names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
dirs
default Set<String> dirs(Object... aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPathElements
- The path elements from which to start retrieving the directories.- Returns:
- The directory names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
dirs
default Set<String> dirs(String aPath)
Retrieves the directory names below the given path excluding any entries representing leaves. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPath
- The path from which to start retrieving the directories.- Returns:
- The directory names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
dirs
default Set<String> dirs(String... aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
dirs(String)
with "/animals", then the resultingSet
will just contain "dogs"; calling "/" will retrieve "animals" and "machines".- Parameters:
aPathElements
- The path elements from which to start retrieving the directories.- Returns:
- The directory names (excluding the preceding given path) of the
directories below the given path contained within this
PathMap
.
-
findPaths
default Set<String> findPaths(T aValue)
Finds all paths whose values equal that of the given value.- Parameters:
aValue
- The value for which to seek the paths.- Returns:
- The paths pointing to the according value.
-
fromExternalPath
default String fromExternalPath(String aPath, char... aDelimiters)
Converts an external key (path) which uses a different notation fromDelimiterAccessor.getDelimiter()
for the path delimiter and converts those to the default delimiter.- Parameters:
aPath
- The key which's delimiters are to be converted to the defaultDelimiterAccessor.getDelimiter()
delimiter.aDelimiters
- The "external" delimiters in question.- Returns:
- The converted key using the default delimiter
DelimiterAccessor.getDelimiter()
instead of the provided delimiters.
-
get
default T get(Collection<?> aPathElements)
Experimental convenience method: Applies theKeys.get(Object)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- As of
Keys.get(Object)
applied path the path elements. - See Also:
Keys.get(Object)
-
get
default T get(Object... aPathElements)
Experimental convenience method: Applies theKeys.get(Object)
method for the provided path elements by first converting them to aString
(if not being aString
already) and then concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- As of
Keys.get(Object)
applied path the path elements. - See Also:
Keys.get(Object)
-
get
default T get(String... aPathElements)
Applies theKeys.get(Object)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- The value as of
Keys.get(Object)
applied with the path from the path elements. - See Also:
Keys.get(Object)
-
getArray
default T[] getArray()
Applies thegetArray(String)
method for the root path "/".- Returns:
- As of
getArray(String)
applied to the root path. - See Also:
getArray(String)
-
getArray
default T[] getArray(Collection<?> aPathElements)
Applies thegetArray(String)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- As of
getArray(String)
applied path the path elements. - See Also:
getArray(String)
-
getArray
default T[] getArray(Object... aPathElements)
Applies thegetArray(String)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- As of
getArray(String)
applied path the path elements. - See Also:
getArray(String)
-
getArray
default T[] getArray(String aPath)
Returns the leaves below the given path in an array. Leaves in aPathMap
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):- "/animals/dogs/0" := "ace"
- "/animals/dogs/1" := "bandit"
- "/animals/dogs/2" := "radar"
- "/animals/dogs/3" := "echo"
- "/animals/dogs/4" := "snoopy"
getArray(String)
for the path "/animals/dogs" would contain {"ace", "bandit", "radar", "echo", "snoopy"}. CallingisArray("/animals/dogs")
would returntrue
whereas callingisArray("/animals")
would return false.- Parameters:
aPath
- the path- Returns:
- An array of the leaves found below the given path.
-
getArray
default T[] getArray(String... aPathElements)
Applies thegetArray(String)
method for the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- As of
getArray(String)
applied path the path elements. - See Also:
getArray(String)
-
getArrayIndexes
default int[] getArrayIndexes()
Returns the indexes pointing to elements of the root "array" path. You may use the methodgetValueAt(int)
to address the value at the given index. Given the following paths:/0/0aaa /1/1bbb /2/2ccc
The root path "/" points to an array with the three indexes "0", "1" and "2".- Returns:
- The indexes which can be used
-
getArrayIndexes
default int[] getArrayIndexes(Collection<?> aPathElements)
Returns the indexes pointing to elements of the given "array" path. You may use the methodgetValueAt(Collection, int)
to address the value at the given index. Given the following paths:/root/child/0/0aaa /root/child/1/1bbb /root/child/2/2ccc
The path "/root/child" points to an array with the three indexes "0", "1" and "2".- Parameters:
aPathElements
- The elements of the path for which to get the indexes.- Returns:
- The indexes which can be used
-
getArrayIndexes
default int[] getArrayIndexes(Object... aPathElements)
Returns the indexes pointing to elements of the given "array" path. You may use the methodgetValueAt(Object[], int)
to address the value at the given index. Given the following paths:/root/child/0/0aaa /root/child/1/1bbb /root/child/2/2ccc
The path "/root/child" points to an array with the three indexes "0", "1" and "2".- Parameters:
aPathElements
- The elements of the path for which to get the indexes.- Returns:
- The indexes which can be used
-
getArrayIndexes
default int[] getArrayIndexes(String aPath) throws IllegalArgumentException
Returns the indexes pointing to elements of the given "array" path. You may use the methodgetValueAt(String, int)
to address the value at the given index. Given the following paths:/root/child/0/0aaa /root/child/1/1bbb /root/child/2/2ccc
The path "/root/child" points to an array with the three indexes "0", "1" and "2".- Parameters:
aPath
- The path for which to get the indexes.- Returns:
- The indexes which can be used.
- Throws:
IllegalArgumentException
- in case the path does not point to indexed elements.
-
getArrayIndexes
default int[] getArrayIndexes(String... aPathElements)
Returns the indexes pointing to elements of the given "array" path. You may use the methodgetValueAt(String[], int)
to address the value at the given index. Given the following paths:/root/child/0/0aaa /root/child/1/1bbb /root/child/2/2ccc
The path "/root/child" points to an array with the three indexes "0", "1" and "2".- Parameters:
aPathElements
- The elements of the path for which to get the indexes.- Returns:
- The indexes which can be used
-
getDirAt
default PathMap<T> getDirAt(Collection<?> aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the elements of the given index below the path of the path "array" path. Given the following paths and index = 1 with a queried path "/root/child":/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
You will get a result containing all the elements which's keys begin with "/root/child/1/".The keys of the result will exclude the path "prefix" "/root/child/1".- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path from which to get the indexed elements.- Returns:
- The indexed elements without the indexed path "prefixes".
-
getDirAt
default PathMap<T> getDirAt(int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the elements of the given index below the path of the root "array" path. Given the following paths and index = 1:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
You will get a result containing all the elements which's keys begin with "/1/". The keys of the result will exclude the path "prefix" "/1".- Parameters:
aIndex
- The index which to use.- Returns:
- The indexed elements without the indexed path "prefixes".
-
getDirAt
default PathMap<T> getDirAt(Object aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the elements of the given index below the path of the path "array" path. Given the following paths and index = 1 with a queried path "/root/child":/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
You will get a result containing all the elements which's keys begin with "/root/child/1/". The keys of the result will exclude the path "prefix" "/root/child/1".- Parameters:
aIndex
- The index which to use.aPath
- The path from which to get the indexed elements.- Returns:
- The indexed elements without the indexed path "prefixes".
-
getDirAt
default PathMap<T> getDirAt(Object[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the elements of the given index below the path of the path "array" path. Given the following paths and index = 1 with a queried path "/root/child":/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
You will get a result containing all the elements which's keys begin with "/root/child/1/".The keys of the result will exclude the path "prefix" "/root/child/1".- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path from which to get the indexed elements.- Returns:
- The indexed elements without the indexed path "prefixes".
-
getDirAt
default PathMap<T> getDirAt(String aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the elements of the given index below the path of the path "array" path. Given the following paths and index = 1 with a queried path "/root/child":/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
You will get a result containing all the elements which's keys begin with "/root/child/1/".The keys of the result will exclude the path "prefix" "/root/child/1".- Parameters:
aIndex
- The index which to use.aPath
- The path from which to get the indexed elements.- Returns:
- The indexed elements without the indexed path "prefixes".
-
getDirAt
default PathMap<T> getDirAt(String[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the elements of the given index below the path of the path "array" path. Given the following paths and index = 1 with a queried path "/root/child":/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
You will get a result containing all the elements which's keys begin with "/root/child/1/".The keys of the result will exclude the path "prefix" "/root/child/1".- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path from which to get the indexed elements.- Returns:
- The indexed elements without the indexed path "prefixes".
-
getDirIndexes
default int[] getDirIndexes()
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the indexes pointing to elements of the root "array" path. You may use the methodgetDirAt(int)
to address the sub-map at the given index. Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
The root path points to an index path with the two indexes "0" and "1".- Returns:
- The indexes which can be used
-
getDirIndexes
default int[] getDirIndexes(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the indexes pointing to elements of the given "array" path. You may use the methodgetDirAt(Collection, int)
to address the sub-map at the given index. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an index path with the two indexes "0" and "1".- Parameters:
aPathElements
- The elements of the path for which to get the indexes.- Returns:
- The indexes which can be used
-
getDirIndexes
default int[] getDirIndexes(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the indexes pointing to elements of the given "array" path. You may use the methodgetDirAt(Object[], int)
to address the sub-map at the given index. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an index path with the two indexes "0" and "1".- Parameters:
aPathElements
- The elements of the path for which to get the indexes.- Returns:
- The indexes which can be used
-
getDirIndexes
default int[] getDirIndexes(String aPath) throws IllegalArgumentException
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the indexes pointing to elements of the given "array" path. You may use the methodgetDirAt(String, int)
to address the sub-map at the given index. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an index path with the two indexes "0" and "1".- Parameters:
aPath
- The path for which to get the indexes.- Returns:
- The indexes which can be used.
- Throws:
IllegalArgumentException
- in case the path does not point to indexed elements.
-
getDirIndexes
default int[] getDirIndexes(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the indexes pointing to elements of the given "array" path. You may use the methodgetDirAt(String[], int)
to address the sub-map at the given index. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an index path with the two indexes "0" and "1".- Parameters:
aPathElements
- The elements of the path for which to get the indexes.- Returns:
- The indexes which can be used
-
getRootPath
default String getRootPath()
Returns the path pointing to the root of thisPathMap
. By default the Root-Path consists just of the one delimiterDelimiterAccessor.getDelimiter()
character.- Returns:
- The path pointing to the root of this
PathMap
.
-
getValueAt
default T getValueAt(Collection<?> aPathElements, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.- Parameters:
aPathElements
- The path elements for the path pointing to the array.aIndex
- The index inside the array for which to get a value.- Returns:
- The value or null if there is none such value.
-
getValueAt
default T getValueAt(int aIndex)
Returns the value of an array at the root path with the given array index or null if there is none such value.- Parameters:
aIndex
- The index inside the array for which to get a value.- Returns:
- The value or null if there is none such value.
-
getValueAt
default T getValueAt(Object aPath, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.- Parameters:
aPath
- The path pointing to the array.aIndex
- The index inside the array for which to get a value.- Returns:
- The value or null if there is none such value.
-
getValueAt
default T getValueAt(Object[] aPathElements, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.- Parameters:
aPathElements
- The path elements for the path pointing to the array.aIndex
- The index inside the array for which to get a value.- Returns:
- The value or null if there is none such value.
-
getValueAt
default T getValueAt(String aPath, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.- Parameters:
aPath
- The path pointing to the array.aIndex
- The index inside the array for which to get a value.- Returns:
- The value or null if there is none such value.
-
getValueAt
default T getValueAt(String[] aPathElements, int aIndex)
Returns the value of an array at the given path path with the given array index or null if there is none such value.- Parameters:
aPathElements
- The path elements for the path pointing to the array.aIndex
- The index inside the array for which to get a value.- Returns:
- The value or null if there is none such value.
-
hasChildren
default boolean hasChildren(Collection<?> aPathElements)
Determines whether the give path contains children as ofchildren(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
hasChildren
default boolean hasChildren(Object aPath)
Determines whether the give path contains children as ofchildren(String)
.- Parameters:
aPath
- The path for which to determine whether it contains entries.- Returns:
- True in case the given path contains children.
-
hasChildren
default boolean hasChildren(Object... aPathElements)
Determines whether the give path contains children as ofchildren(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
hasChildren
default boolean hasChildren(String aPath)
Determines whether the give path contains children as ofchildren(String)
.- Parameters:
aPath
- The path for which to determine whether it contains entries.- Returns:
- True in case the given path contains children.
-
hasChildren
default boolean hasChildren(String... aPathElements)
Determines whether the give path contains children as ofchildren(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
hasDirAt
default boolean hasDirAt(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the path points to an index inside an indexed "array" Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
For paths "/0" and "/1" you will get true, for all others you will get false.- Parameters:
aPathElements
- The path elements including the index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(Collection<?> aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the index below the path points to an element of an indexed "array". Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the index below the root points to an element of an indexed "array" Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
For indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the path points to an index inside an indexed "array" Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
For paths "/0" and "/1" you will get true, for all others you will get false.- Parameters:
aPath
- The path including the index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the path points to an index inside an indexed "array" Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
For paths "/0" and "/1" you will get true, for all others you will get false.- Parameters:
aPathElements
- The path elements including the index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(Object aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the index below the path points to an element of an indexed "array" Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPath
- The path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(Object[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the index below the path points to an element of an indexed "array". Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the path points to an index inside an indexed "array" Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
For paths "/0" and "/1" you will get true, for all others you will get false.- Parameters:
aPath
- The path including the index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the path points to an index inside an indexed "array" Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
For paths "/0" and "/1" you will get true, for all others you will get false.- Parameters:
aPathElements
- The path elements including the index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(String aPath, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the index below the path points to an element of an indexed "array" Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPath
- The path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasDirAt
default boolean hasDirAt(String[] aPathElements, int aIndex)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the index below the path points to an element of an indexed "array". Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasParentPath
default boolean hasParentPath(String aPath)
Tests whether there exists a parent path for the given path. Given we have a path "/animals/dogs/otto", then its parent path is "/animals/dogs".- Parameters:
aPath
- The path for which to test if it has the parent path.- Returns:
- True in case the path has a parent, else false.
-
hasPath
default boolean hasPath(Collection<?> aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf.- Parameters:
aPathElements
- The path elements addressing the path to be tested.- Returns:
- True in case we have a path being contained in the given
PathMap
, else false.
-
hasPath
default boolean hasPath(Object... aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf.- Parameters:
aPathElements
- The path elements addressing the path to be tested.- Returns:
- True in case we have a path being contained in the given
PathMap
, else false.
-
hasPath
default boolean hasPath(String aPath)
Determines whether the provided path represents a path within the givenPathMap
. The path not either points to a a leaf or a directory as ofisChild(String)
. UsehasValue(String)
to explicitly test if we have a leaf orisDir(String)
to explicitly test if we have a directory.- Parameters:
aPath
- The path to be tested.- Returns:
- True in case we have a path being contained in the given
PathMap
, else false.
-
hasPath
default boolean hasPath(String... aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf.- Parameters:
aPathElements
- The path elements addressing the path to be tested.- Returns:
- True in case we have a path being contained in the given
PathMap
, else false.
-
hasValueAt
default boolean hasValueAt(Collection<?> aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array". Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(int aIndex)
Determines whether the index below the root points to an element of an "array" Given the following paths:/0/0aaa /1/1aaa
For indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(Object aPath)
Determines whether the path points to an index inside an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aPath
- The path including the index for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(Object aPath, int aIndex)
Determines whether the index below the path points to an element of an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPath
- The path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(Object[] aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array". Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(String aPath)
Determines whether the path points to an index inside an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aPath
- The path including the index for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(String aPath, int aIndex)
Determines whether the index below the path points to an element of an "array" Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPath
- The path for which to test.- Returns:
- True if the path at the index points to an array element.
-
hasValueAt
default boolean hasValueAt(String[] aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array". Given the following paths:/root/child/0/0bbb /root/child/1/1bbb /bla/abc /bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for all others you will get false.- Parameters:
aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.- Returns:
- True if the path at the index points to an array element.
-
isArray
default boolean isArray()
Applies theisArray(String)
method for the root path "/".- Returns:
- As of
isArray(String)
applied to the root path. - See Also:
isArray(String)
-
isArray
default boolean isArray(String... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.- Parameters:
aPathElements
- the path elements- Returns:
- True in case we have an array structure below the path or not.
-
isArray
default boolean isArray(Collection<?> aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.- Parameters:
aPathElements
- the path elements- Returns:
- True in case we have an array structure below the path or not.
-
isArray
default boolean isArray(Object aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.- Parameters:
aPath
- the path- Returns:
- True in case we have an array structure below the path or not.
-
isArray
default boolean isArray(Object... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.- Parameters:
aPathElements
- the path elements- Returns:
- True in case we have an array structure below the path or not.
-
isArray
default boolean isArray(String aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.- Parameters:
aPath
- the path which to test.- Returns:
- True in case we have an array structure below the path or not.
-
isChild
default boolean isChild(Collection<?> aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
isChild
default boolean isChild(Object... aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
isChild
default boolean isChild(String aPath)
Determines whether the give path points to an entry in terms ofchildren(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
isChild
default boolean isChild(String... aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a entry.- Returns:
- True in case the given path points to a entry, else false.
-
isDir
default boolean isDir(Collection<?> aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a directory.- Returns:
- True in case the given path points to a directory, else false.
-
isDir
default boolean isDir(Object aPath)
Determines whether the give path points to a directory in terms ofdirs(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a directory.- Returns:
- True in case the given path points to a directory, else false.
-
isDir
default boolean isDir(Object... aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a directory.- Returns:
- True in case the given path points to a directory, else false.
-
isDir
default boolean isDir(String aPath)
Determines whether the give path points to a directory in terms ofdirs(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a directory.- Returns:
- True in case the given path points to a directory, else false.
-
isDir
default boolean isDir(String... aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a directory.- Returns:
- True in case the given path points to a directory, else false.
-
isLeaf
default boolean isLeaf(Collection<?> aPathElements)
Determines whether the give path points to a leaf in terms ofdirs(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a leaf.- Returns:
- True in case the given path points to a leaf, else false.
-
isLeaf
default boolean isLeaf(Object aPath)
Determines whether the give path points to a leaf in terms ofdirs(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a leaf.- Returns:
- True in case the given path points to a leaf, else false.
-
isLeaf
default boolean isLeaf(Object... aPathElements)
Determines whether the give path points to a leaf in terms ofdirs(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a leaf.- Returns:
- True in case the given path points to a leaf, else false.
-
isLeaf
default boolean isLeaf(String aPath)
Determines whether the give path points to a leaf in terms ofleaves(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a leaf.- Returns:
- True in case the given path points to a leaf, else false.
-
isLeaf
default boolean isLeaf(String... aPathElements)
Determines whether the give path points to a leaf in terms ofdirs(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a leaf.- Returns:
- True in case the given path points to a leaf, else false.
-
isIndexDir
default boolean isIndexDir()
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the root path represents an "array" path with indexes within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf. Given the following paths:/0/0aaa /0/0bbb /0/0bbb /1/1aaa /1/1bbb /1/1bbb
The root path points to an indexed path with the two indexes "0" and "1".- Returns:
- True in case we have a path points to an array being contained in
the given
PathMap
, else false.
-
isIndexDir
default boolean isIndexDir(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the provided path elements represent an "array" path with indexes within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an indexed path with the two indexes "0" and "1".- Parameters:
aPathElements
- The elements of the path to be tested.- Returns:
- True in case we have a path points to an array being contained in
the given
PathMap
, else false.
-
isIndexDir
default boolean isIndexDir(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the provided path elements represent an "array" path with indexes within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an indexed path with the two indexes "0" and "1".- Parameters:
aPathElements
- The elements of the path to be tested.- Returns:
- True in case we have a path points to an array being contained in
the given
PathMap
, else false.
-
isIndexDir
default boolean isIndexDir(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the provided path represents an "array" path with indexes within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an indexed path with the two indexes "0" and "1".- Parameters:
aPath
- The path to be tested.- Returns:
- True in case we have a path points to an array being contained in
the given
PathMap
, else false.
-
isIndexDir
default boolean isIndexDir(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Determines whether the provided path elements represent an "array" path with indexes within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(hasValue(String)
orisDir(String)
) if we have a leaf. Given the following paths:/root/child/0/0aaa /root/child/0/0bbb /root/child/0/0bbb /root/child/1/1aaa /root/child/1/1bbb /root/child/1/1bbb
The path "/root/child" points to an indexed path with the two indexes "0" and "1".- Parameters:
aPathElements
- The elements of the path to be tested.- Returns:
- True in case we have a path points to an array being contained in
the given
PathMap
, else false.
-
isEqualTo
default boolean isEqualTo(PathMap<?> aOther)
Determines whether thisPathMap
contains the same paths and equal assigned values as the provided otherPathMap
. May be used for implementing anObject.equals(Object)
method.
-
hasSubDirs
default boolean hasSubDirs(Collection<?> aPathElements)
Determines whether the give path points to a directory which contains sub-directories.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a directory containing sub-directories.- Returns:
- True in case the given path points to a directory containing sub-directories, else false.
-
hasSubDirs
default boolean hasSubDirs(Object aPath)
Determines whether the give path points to a directory which contains sub-directories.- Parameters:
aPath
- The path for which to determine whether it points to a directory containing sub-directories.- Returns:
- True in case the given path points to a directory containing sub-directories, else false.
-
hasSubDirs
default boolean hasSubDirs(Object... aPathElements)
Determines whether the give path points to a directory which contains sub-directories.- Parameters:
aPathElements
- The path elements for which to determine whether them point to a directory containing sub-directories.- Returns:
- True in case the given path points to a directory containing sub-directories, else false.
-
hasSubDirs
default boolean hasSubDirs(String aPath)
Determines whether the give path points to a directory which contains sub-directories.- Parameters:
aPath
- The path for which to determine whether it points to a directory containing sub-directories.- Returns:
- True in case the given path points to a directory containing sub-directories, else false.
-
hasValue
default boolean hasValue(Collection<?> aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them points to a leave.- Returns:
- True in case the given path points to a leave, else false.
-
hasValue
default boolean hasValue(Object aPath)
Determines whether the give path points to a leave in terms ofleaves(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a leave.- Returns:
- True in case the given path points to a leave, else false.
-
hasValue
default boolean hasValue(Object... aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them points to a leave.- Returns:
- True in case the given path points to a leave, else false.
-
hasValue
default boolean hasValue(String aPath)
Determines whether the give path points to a leave in terms ofleaves(String)
.- Parameters:
aPath
- The path for which to determine whether it points to a leave.- Returns:
- True in case the given path points to a leave, else false.
-
hasValue
default boolean hasValue(String... aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.- Parameters:
aPathElements
- The path elements for which to determine whether them points to a leave.- Returns:
- True in case the given path points to a leave, else false.
-
isRootPath
default boolean isRootPath(String aPath)
Determines whether the given path represents the toor path.- Parameters:
aPath
- The path to be tested.- Returns:
- True in case we have a root path, else false.
-
keySet
default Set<String> keySet(String aPath)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.- Parameters:
aPath
- The path from which to start retrieving the paths.- Returns:
- The relative paths starting at the given path (excluding the
preceding given path) contained in this
PathMap
.
-
keySet
default Set<String> keySet(Collection<?> aPathElements)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.- Parameters:
aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- The relative paths starting at the given path (excluding the
preceding given path) contained in this
PathMap
.
-
keySet
default Set<String> keySet(Object aPath)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.- Parameters:
aPath
- The path from which to start retrieving the paths.- Returns:
- The relative paths starting at the given path (excluding the
preceding given path) contained in this
PathMap
.
-
keySet
default Set<String> keySet(Object... aPathElements)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.- Parameters:
aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- The relative paths starting at the given path (excluding the
preceding given path) contained in this
PathMap
.
-
keySet
default Set<String> keySet(String... aPathElements)
Same asKeys.keySet()
with the difference, that only the paths are contained belonging to the given path, excluding the given path.- Parameters:
aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- The relative paths starting at the given path (excluding the
preceding given path) contained in this
PathMap
.
-
lastArrayIndex
default int lastArrayIndex()
Returns the last index as ofgetArrayIndexes()
.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastArrayIndex
default int lastArrayIndex(Collection<?> aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(Collection)
.- Parameters:
aPathElements
- The elements of the path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastArrayIndex
default int lastArrayIndex(Object aPath)
Returns the last index as ofgetArrayIndexes(String)
.- Parameters:
aPath
- The path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastArrayIndex
default int lastArrayIndex(Object... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String[])
.- Parameters:
aPathElements
- The elements of the path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastArrayIndex
default int lastArrayIndex(String aPath)
Returns the last index as ofgetArrayIndexes(String)
.- Parameters:
aPath
- The path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastArrayIndex
default int lastArrayIndex(String... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String[])
.- Parameters:
aPathElements
- The elements of the path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastDirIndex
default int lastDirIndex()
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the last index as ofgetDirIndexes()
.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastDirIndex
default int lastDirIndex(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(Collection)
.- Parameters:
aPathElements
- The elements of the path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastDirIndex
default int lastDirIndex(Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the last index as ofgetDirIndexes(String)
.- Parameters:
aPath
- The path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastDirIndex
default int lastDirIndex(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(String[])
.- Parameters:
aPathElements
- The elements of the path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastDirIndex
default int lastDirIndex(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the last index as ofgetDirIndexes(String)
.- Parameters:
aPath
- The path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
lastDirIndex
default int lastDirIndex(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(String[])
.- Parameters:
aPathElements
- The elements of the path from which to determine the last index.- Returns:
- The last index used by the "array" or -1 if there is none element in the array (or no array at all).
-
leaves
default Set<String> leaves()
Applies theleaves(String)
method for the root path "/".- Returns:
- As of
leaves(String)
applied to the root path. - See Also:
leaves(String)
-
leaves
default Set<String> leaves(Collection<?> aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
leaves(String)
with "/animals", then the resultingSet
will just contain "loki"; calling "/animals/dogs" will retrieve "dilbert" and "otto".- Parameters:
aPathElements
- The path elements from which to start retrieving the leaves.- Returns:
- The leave names (excluding the preceding given path) of the
leaves below the given path contained within this
PathMap
.
-
leaves
default Set<String> leaves(Object aPath)
Retrieves the leaves names below the given path excluding any entries representing directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
leaves(String)
with "/animals", then the resultingSet
will just contain "loki"; calling "/animals/dogs" will retrieve "dilbert" and "otto".- Parameters:
aPath
- The path from which to start retrieving the leaves.- Returns:
- The leave names (excluding the preceding given path) of the
leaves below the given path contained within this
PathMap
.
-
leaves
default Set<String> leaves(Object... aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
leaves(String)
with "/animals", then the resultingSet
will just contain "loki"; calling "/animals/dogs" will retrieve "dilbert" and "otto".- Parameters:
aPathElements
- The path elements from which to start retrieving the leaves.- Returns:
- The leave names (excluding the preceding given path) of the
leaves below the given path contained within this
PathMap
.
-
leaves
default Set<String> leaves(String aPath)
Retrieves the leaves names below the given path excluding any entries representing directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
leaves(String)
with "/animals", then the resultingSet
will just contain "loki"; calling "/animals/dogs" will retrieve "dilbert" and "otto".- Parameters:
aPath
- The path from which to start retrieving the leaves.- Returns:
- The leave names (excluding the preceding given path) of the
leaves below the given path contained within this
PathMap
.
-
leaves
default Set<String> leaves(String... aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories. A leave is reckoned to be the last path element in a path pointing to a value. In contrast a directory is reckoned to be be a path element pointing to a succeeding child path element (sub-directory). Given we have values for paths in ourPathMap
:- "/animals/dogs/dilbert"
- "/animals/dogs/otto"
- "/animals/loki"
- "/machines/robots/greg"
leaves(String)
with "/animals", then the resultingSet
will just contain "loki"; calling "/animals/dogs" will retrieve "dilbert" and "otto".- Parameters:
aPathElements
- The path elements from which to start retrieving the leaves.- Returns:
- The leave names (excluding the preceding given path) of the
leaves below the given path contained within this
PathMap
.
-
nextArrayIndex
default int nextArrayIndex()
Returns the next index to be used (and not used yet) as ofgetArrayIndexes()
.- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextArrayIndex
default int nextArrayIndex(Collection<?> aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(Collection)
.- Parameters:
aPathElements
- The elements of the path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextArrayIndex
default int nextArrayIndex(Object aPath)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String)
.- Parameters:
aPath
- The path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextArrayIndex
default int nextArrayIndex(Object... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String...)
.- Parameters:
aPathElements
- The elements of the path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextArrayIndex
default int nextArrayIndex(String aPath)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String)
.- Parameters:
aPath
- The path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextArrayIndex
default int nextArrayIndex(String... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String...)
.- Parameters:
aPathElements
- The elements of the path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextDirIndex
default int nextDirIndex()
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes()
.- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextDirIndex
default int nextDirIndex(Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(Collection)
.- Parameters:
aPathElements
- The elements of the path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextDirIndex
default int nextDirIndex(Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(String)
.- Parameters:
aPath
- The path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextDirIndex
default int nextDirIndex(Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(String...)
.- Parameters:
aPathElements
- The elements of the path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextDirIndex
default int nextDirIndex(String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(String)
.- Parameters:
aPath
- The path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
nextDirIndex
default int nextDirIndex(String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index. There may by many sub-paths for the same indexed path which are all are included by the according directory. Returns the next index to be used (and not used yet) as ofgetDirIndexes(String...)
.- Parameters:
aPathElements
- The elements of the path from which to determine the next index to be used (and not used yet).- Returns:
- The next index to be used (and not used yet) as of the "array".
-
paths
default Set<String> paths()
Same asKeys.keySet()
with according semantics in the method name.- Returns:
- The paths which are assigned to values.
-
paths
default Set<String> paths(Collection<?> aPathElements)
Same askeySet(String)
with according semantics in the method name.- Parameters:
aPathElements
- The path elements from which to start seeking.- Returns:
- The paths (excluding the preceding given path) which are assigned to values.
-
paths
default Set<String> paths(Object aPath)
Same askeySet(String)
with according semantics in the method name.- Parameters:
aPath
- The path from which to start seeking.- Returns:
- The paths (excluding the preceding given path) which are assigned to values.
-
paths
default Set<String> paths(Object... aPathElements)
Same askeySet(String)
with according semantics in the method name.- Parameters:
aPathElements
- The path elements from which to start seeking.- Returns:
- The paths (excluding the preceding given path) which are assigned to values.
-
paths
default Set<String> paths(String aPath)
Same askeySet(String)
with according semantics in the method name.- Parameters:
aPath
- The path from which to start seeking.- Returns:
- The paths (excluding the preceding given path) which are assigned to values.
-
paths
default Set<String> paths(String... aPathElements)
Same askeySet(String)
with according semantics in the method name.- Parameters:
aPathElements
- The path elements from which to start seeking.- Returns:
- The paths (excluding the preceding given path) which are assigned to values.
-
query
default PathMap<T> query(Collection<?> aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aQueryElements
- The elements representing the path query including your wildcards.- Returns:
- The result contains the matching paths with the according values.
-
query
default PathMap<T> query(Object... aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aQueryElements
- The elements representing the path query including your wildcards.- Returns:
- The result contains the matching paths with the according values.
-
query
default PathMap<T> query(Pattern aRegExp)
Queries the keys of the instance using a regular expression as of the providedPattern
instance.- Parameters:
aRegExp
- The regular expression to be used for the query.- Returns:
- The matching properties.
-
query
default PathMap<T> query(String aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths with the according values.
-
query
default PathMap<T> query(String... aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aQueryElements
- The elements representing the path query including your wildcards.- Returns:
- The result contains the matching paths with the according values.
-
queryBetween
default PathMap<T> queryBetween(Collection<?> aFromPath, Collection<?> aPathQuery, Collection<?> aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aFromPath
- The path from where to start querying and extracting the paths.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the from-path and the to-path) with the according values.
-
queryBetween
default PathMap<T> queryBetween(Object aFromPath, Object aPathQuery, Object aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aFromPath
- The path from where to start querying and extracting the paths.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the from-path and the to-path) with the according values.
-
queryBetween
default PathMap<T> queryBetween(Object[] aFromPath, Object[] aPathQuery, Object[] aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aFromPath
- The path from where to start querying and extracting the paths.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the from-path and the to-path) with the according values.
-
queryBetween
default PathMap<T> queryBetween(String aFromPath, Pattern aRegExp, String aToPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.- Parameters:
aFromPath
- The path from where to start querying and extracting the paths.aRegExp
- The regular expression to be used for the query.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the from-path and the to-path) with the according values.
-
queryBetween
default PathMap<T> queryBetween(String aFromPath, String aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aFromPath
- The path from where to start querying and extracting the paths.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the from-path and the to-path) with the according values.
-
queryBetween
default PathMap<T> queryBetween(String[] aFromPath, String[] aPathQuery, String[] aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aFromPath
- The path from where to start querying and extracting the paths.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the from-path and the to-path) with the according values.
-
queryFrom
default PathMap<T> queryFrom(Collection<?> aPathQuery, Collection<?> aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the paths.- Returns:
- The result contains the matching paths (with respect to the from-path) with the according values.
-
queryFrom
default PathMap<T> queryFrom(Object aPathQuery, Object aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the paths.- Returns:
- The result contains the matching paths (with respect to the from-path) with the according values.
-
queryFrom
default PathMap<T> queryFrom(Object[] aPathQuery, Object[] aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the paths.- Returns:
- The result contains the matching paths (with respect to the from-path) with the according values.
-
queryFrom
default PathMap<T> queryFrom(Pattern aRegExp, String aFromPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.- Parameters:
aRegExp
- The regular expression to be used for the query.aFromPath
- The path from where to start querying and extracting the paths.- Returns:
- The result contains the matching paths (with respect to the from-path) with the according values.
-
queryFrom
default PathMap<T> queryFrom(String aPathQuery, String aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the paths.- Returns:
- The result contains the matching paths (with respect to the from-path) with the according values.
-
queryFrom
default PathMap<T> queryFrom(String[] aPathQuery, String[] aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the paths.- Returns:
- The result contains the matching paths (with respect to the from-path) with the according values.
-
queryPaths
default Set<String> queryPaths(Collection<?> aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default Set<String> queryPaths(Object aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default Set<String> queryPaths(Object... aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default Set<String> queryPaths(Pattern aRegExp)
Queries the keys of the instance using a regular expression as of the providedPattern
.- Parameters:
aRegExp
- The regular expression to be used for the query.- Returns:
- The result contains the matching paths.
-
queryPaths
default Set<String> queryPaths(String... aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default Set<String> queryPaths(String aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryTo
default PathMap<T> queryTo(Collection<?> aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the to-path) with the according values.
-
queryTo
default PathMap<T> queryTo(Object aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the to-path) with the according values.
-
queryTo
default PathMap<T> queryTo(Object[] aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the to-path) with the according values.
-
queryTo
default PathMap<T> queryTo(Pattern aRegExp, String aToPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.- Parameters:
aRegExp
- The regular expression to be used for the query.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the to-path) with the according values.
-
queryTo
default PathMap<T> queryTo(String aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the to-path) with the according values.
-
queryTo
default PathMap<T> queryTo(String[] aPathQuery, String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?' and '**' known when querying folders of a filesystem: ThePathMatcher
applies the following rules from the ANT path pattern to the query provided: A single asterisk ("*" as ofWildcard.FILE
) matches zero or more characters within a path name. A double asterisk ("**" as ofWildcard.PATH
) matches zero or more characters across directory levels. A question mark ("?" as ofWildcard.CHAR
) matches exactly one character within a path name. The single asterisk ("*" as ofWildcard.FILE
), the double asterisk ("**" as ofWildcard.PATH
) and the question mark ("?" as ofWildcard.CHAR
) we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.- Returns:
- The result contains the matching paths (with respect to the to-path) with the according values.
-
retrieveBetween
default PathMap<T> retrieveBetween(Collection<?> aFromPath, Collection<?> aToPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be relocated to the provided "to-path".- Parameters:
aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.- Returns:
- The
PathMap
with the elements below the provided path "from-path" relocated to the given "to-path".
-
retrieveBetween
default PathMap<T> retrieveBetween(Object aFromPath, Object aToPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be relocated to the provided "to-path".- Parameters:
aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.- Returns:
- The
PathMap
with the elements below the provided path "from-path" relocated to the given "to-path".
-
retrieveBetween
default PathMap<T> retrieveBetween(Object[] aFromPath, Object[] aToPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be relocated to the provided "to-path".- Parameters:
aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.- Returns:
- The
PathMap
with the elements below the provided path "from-path" relocated to the given "to-path".
-
retrieveBetween
default PathMap<T> retrieveBetween(String aFromPath, String aToPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be relocated to the provided "to-path".- Parameters:
aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.- Returns:
- The
PathMap
with the elements below the provided path "from-path" relocated to the given "to-path".
-
retrieveBetween
default PathMap<T> retrieveBetween(String[] aFromPath, String[] aToPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be relocated to the provided "to-path".- Parameters:
aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.- Returns:
- The
PathMap
with the elements below the provided path "from-path" relocated to the given "to-path".
-
retrieveFrom
default PathMap<T> retrieveFrom(Collection<?> aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.- Parameters:
aPathElements
- The path elements from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
retrieveFrom
default PathMap<T> retrieveFrom(Object aParentPath)
Gets the children elements of the provided parent's path, excluding the parent's path.- Parameters:
aParentPath
- The path from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
retrieveFrom
default PathMap<T> retrieveFrom(Object... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.- Parameters:
aPathElements
- The path elements from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
retrieveFrom
PathMap<T> 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 callretrieveFrom(String)
with "/dog", then the resultingPathMap
will contain the path "/cat" for that value.
-
retrieveFrom
default PathMap<T> retrieveFrom(String... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.- Parameters:
aPathElements
- The path elements from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
getDir
default PathMap<T> getDir(Collection<?> aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.- Parameters:
aPathElements
- The path elements from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
getDir
default PathMap<T> getDir(Object aPath)
Gets the children elements of the provided parent's path, excluding the parent's path.- Parameters:
aPath
- The path from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
getDir
default PathMap<T> getDir(Object... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.- Parameters:
aPathElements
- The path elements from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
getDir
default PathMap<T> getDir(String aPath)
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 callgetDir(String)
with "/dog", then the resultingPathMap
will contain the path "/cat" for that value.
-
getDir
default PathMap<T> getDir(String... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.- Parameters:
aPathElements
- The path elements from where to retrieve the children.- Returns:
- The children of the given parent's path.
-
retrieveTo
default PathMap<T> retrieveTo(Collection<?> aToPathElements)
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 callretrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.
-
retrieveTo
default PathMap<T> retrieveTo(Object 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 callretrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.
-
retrieveTo
default PathMap<T> retrieveTo(Object... aToPathElements)
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 callretrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.
-
retrieveTo
PathMap<T> 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 callretrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.
-
retrieveTo
default PathMap<T> retrieveTo(String... aToPathElements)
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 callretrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.
-
sortedKeys
default List<String> sortedKeys()
Retrieves an alphabetically sorted list containing all the keys found in the elements of this collection. Sorts theKeys.keySet()
using thePathSortStrategy.DEFAULT
sorting strategy.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Collection<?> aPathElements)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection. Sorts thekeySet(String)
using thePathSortStrategy.DEFAULT
sorting strategy.- Parameters:
aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Object aPath)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection. Sorts thekeySet(String)
using thePathSortStrategy.DEFAULT
sorting strategy.- Parameters:
aPath
- The path from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Object... aPathElements)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection. Sorts thekeySet(String)
using thePathSortStrategy.DEFAULT
sorting strategy.- Parameters:
aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(String... aPathElements)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection. Sorts thekeySet(String)
using thePathSortStrategy.DEFAULT
sorting strategy.- Parameters:
aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(String aPath)
Retrieves an alphabetically sorted list containing the keys found below the given path of this collection. Sorts thekeySet(String)
using thePathSortStrategy.DEFAULT
sorting strategy.- Parameters:
aPath
- The path from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(PathSortStrategy aPathSortStrategy)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found in the elements of this collection.- Parameters:
aPathSortStrategy
- The sorting strategy to be used when sorting theKeys.keySet()
.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, Collection<?> aPathElements)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.- Parameters:
aPathSortStrategy
- The sorting strategy to be used when sorting theKeys.keySet()
.aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, Object aPath)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.- Parameters:
aPathSortStrategy
- The sorting strategy to be used when sorting theKeys.keySet()
.aPath
- The path from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, Object... aPathElements)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.- Parameters:
aPathSortStrategy
- The sorting strategy to be used when sorting theKeys.keySet()
.aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, String... aPathElements)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.- Parameters:
aPathSortStrategy
- The sorting strategy to be used when sorting theKeys.keySet()
.aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, String aPath)
Retrieves a sorted list as of the providedPathSortStrategy
containing all the keys found below the given path of this collection.- Parameters:
aPathSortStrategy
- The sorting strategy to be used when sorting theKeys.keySet()
.aPath
- The path from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Comparator<String> aComparator)
Retrieves a sorted list as of the providedComparator
containing all the keys found in the elements of this collection.- Parameters:
aComparator
- TheComparator
to be used when sorting theKeys.keySet()
.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Comparator<String> aComparator, Collection<?> aPathElements)
Retrieves a sorted list as of the providedComparator
containing all the keys found in the elements of this collection.- Parameters:
aComparator
- TheComparator
to be used when sorting theKeys.keySet()
.aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Comparator<String> aComparator, Object aPath)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.- Parameters:
aComparator
- The sorting strategy to be used when sorting theKeys.keySet()
.aPath
- The path from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Comparator<String> aComparator, Object... aPathElements)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.- Parameters:
aComparator
- The sorting strategy to be used when sorting theKeys.keySet()
.aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Comparator<String> aComparator, String... aPathElements)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.- Parameters:
aComparator
- The sorting strategy to be used when sorting theKeys.keySet()
.aPathElements
- The path elements from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
sortedKeys
default List<String> sortedKeys(Comparator<String> aComparator, String aPath)
Retrieves a sorted list as of the providedComparator
containing all the keys found below the given path of this collection.- Parameters:
aComparator
- The sorting strategy to be used when sorting theKeys.keySet()
.aPath
- The path from which to start retrieving the paths.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
toDataStructure
default Object toDataStructure()
Applies thetoDataStructure(String)
method for the root path "/".- Returns:
- As of
toDataStructure(String)
applied to the root path. - See Also:
toDataStructure(String)
-
toDataStructure
Object toDataStructure(String aFromPath)
Similar to thetoMap(String)
method, though in case all the keys of a nestedMap
instance (applicable to the rootMap
as well) represent an array (as ofgetArray( 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.
-
toExternalPath
default String toExternalPath(String aPath, char aDelimiter)
Converts the given key (path) to an external key by converting the default delimiterDelimiterAccessor.getDelimiter()
to the provided delimiter. In case we have a provided delimiter different from the commonly used path delimiters "/" or "\", then a prefixed delimiter is removed.- Parameters:
aPath
- The key which is to be converted to its external representation.aDelimiter
- The delimiter to be used for the external representation instead if the default delimiterDelimiterAccessor.getDelimiter()
.- Returns:
- The external representation of the key as of the provided delimiter.
-
toInstance
default <TYPE> void toInstance(String aFromPath, TYPE aInstance)
Updates the instance with thisPathMap
's data. Instances inside the instance may not be updated!- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPath
- The path representing the root from which to take the data for the instance.aInstance
- The instance to be updated with the herein contained data.
-
toInstance
default <TYPE> void toInstance(TYPE aInstance)
Updates the instance with thisPathMap
's data. Instances inside the instance may not be updated!- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aInstance
- The instance to be updated with the herein contained data.
-
toLeaf
default String toLeaf(String aPath)
Returns the last path element from the given path.- Parameters:
aPath
- The path for which to get the last path element.- Returns:
- The last path element or null if there is none path elements in the path.
-
toMap
default Map<String,?> toMap() throws IllegalStateException
Applies thetoMap(String)
method for the root path "/".- Returns:
- As of
toMap(String)
applied to the root path. - Throws:
IllegalStateException
- the illegal state exception
-
toMap
default Map<String,?> toMap(String aFromPath) throws IllegalStateException
Creates a nestedMap
structure from thePathMap
's entries below the provided path. Each element of the paths (below the provided path), except of the last (pointing to the path's value) is represented by aMap
contained in the preceeding's path element.- Parameters:
aFromPath
- The path from which to start retrieving the sub-paths which will be the root directories in the returnedMap
- Returns:
- The nested Map representing this
PathMap
starting from the given path. - Throws:
IllegalStateException
- in case thePathMap
contains a path which points to a value and which is also part of other paths. Such a state cannot be represented by a nestedMap
structure as the element would represent a leaf and a node at the same time.
-
toNormalizedPath
default String toNormalizedPath(String aPath)
Normalizes a path for it to start with the delimiter (as ofDelimiterAccessor.getDelimiter()
) and for it not to end with a delimiter. This implementation will return in emptyString
in case the path is an emptyString
or the path just consists of a delimiter: Any missing prefixed (starting) delimiter is added and any suffixed delimiters are removed, ending up with an emptyString
- Parameters:
aPath
- The path to be normalized.- Returns:
- The normalized path; afterwards (in case the path was not an
empty
String
or just the delimiter itself) it starts with a delimiter and does not end with a delimiter.
-
toParentPath
default String toParentPath(String aPath)
Returns the path representing the parent path for the given path. Given we have a path "/animals/dogs/otto", then its parent path is "/animals/dogs".- Parameters:
aPath
- The path for which to get the parent's path.- Returns:
- The parent path.
- Throws:
IllegalArgumentException
- thrown in case there is no such parent path for the given path; test beforehand usinghasParentPath(String)
.
-
toPath
default String toPath(Collection<?> aPathElements)
Creates a normalized path from the provided path elements by first converting them to aString
(if not being aString
already) and then concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- The concatenated and normalized path.
-
toPath
default String toPath(Object aPath)
Creates a normalized path from the provided object.- Parameters:
aPath
- The path object to be converted to an according path.- Returns:
- The normalized path.
-
toPath
default String toPath(Object... aPathElements)
Creates a normalized path from the provided path elements by first converting them to aString
(if not being aString
already) and then concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- The concatenated and normalized path.
-
toPath
default String toPath(String... aPathElements)
Creates a normalized path from the provided path elements by concatenating the elements with the path delimiterDelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate path delimiters.- Parameters:
aPathElements
- The elements of the path to be concatenated with the path delimiter.- Returns:
- The concatenated and normalized path.
-
toPathElements
default String[] toPathElements(String aPath)
Retrieves the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.- Parameters:
aPath
- The path from which to retrieve the elements.- Returns:
- The elements excluding the delimiter.
-
toPathList
default List<String> toPathList(String aPath)
Retrieves a mutableList
with the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.
-
toPropertyPath
default String toPropertyPath(String aPath)
Converts the properties for saving; that when saved, them properties will not start with a delimiter, making them (when there are no sub-paths for the properties) look just like normal well known properties, enabling interchangeability with other systems reading the properties.- Parameters:
aPath
- The path to be normalized.- Returns:
- The normalized path; afterwards it does not start with a delimiter any more.
-
toType
default <TYPE> TYPE toType(Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(Object aFromPath, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPath
- The path representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(Object[] aFromPathElements, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPathElements
- The path elements representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(Class<TYPE> aType, Object... aFromPathElements)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPathElements
- The path elements representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(String[] aFromPathElements, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPathElements
- The path elements representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(Class<TYPE> aType, String... aFromPathElements)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPathElements
- The path elements representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(Collection<?> aFromPathElements, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPathElements
- The path elements representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
toType
default <TYPE> TYPE toType(String aFromPath, Class<TYPE> aType)
Creates an instance of the given type filled with thisPathMap
's data.- Type Parameters:
TYPE
- the generic type if which to create an instance.- Parameters:
aFromPath
- The path representing the root from which to take the data for the instance.aType
- the type if the instance to be filled with the herein contained data.- Returns:
- the instance initialized with the herein contained data.
-
-