Interface PathMap<T>
-
- Type Parameters:
T
- The type of the terminating elements.
- All Superinterfaces:
org.refcodes.mixin.AnnotatorAccessor
,Containable
,org.refcodes.mixin.DelimiterAccessor
,Dictionary<java.lang.String,T>
,org.refcodes.mixin.Dumpable
,Keys<K,V>
,org.refcodes.mixin.TypeAccessor<T>
- All Known Subinterfaces:
CanonicalMap
,CanonicalMap.CanonicalMapBuilder
,CanonicalMap.MutableCanonicalMap
,PathMap.MutablePathMap<T>
,PathMap.PathMapBuilder<T>
- All Known Implementing Classes:
CanonicalMapBuilderImpl
,CanonicalMapImpl
,PathMapBuilderImpl
,PathMapImpl
public interface PathMap<T> extends Dictionary<java.lang.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.isDirIndex(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.structure.Dictionary
Dictionary.MutableDictionary<K,V>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Keys
Keys.MutableKeys<K,V>, Keys.MutableValues<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Set<java.lang.String>
children()
Retrieves the entry names below the root including leaves as well as directories.default java.util.Set<java.lang.String>
children(java.lang.Object aPath)
Retrieves the entry names below the given path including leaves as well as directories.default java.util.Set<java.lang.String>
children(java.lang.Object... aPathElements)
Retrieves the entry names below the given path including leaves as well as directories.default java.util.Set<java.lang.String>
children(java.lang.String aPath)
Retrieves the entry names below the given path including leaves as well as directories.default java.util.Set<java.lang.String>
children(java.lang.String... aPathElements)
Retrieves the entry names below the given path including leaves as well as directories.default java.util.Set<java.lang.String>
children(java.util.Collection<?> aPathElements)
Retrieves the entry names below the given path including leaves as well as directories.default boolean
containsKey(java.lang.Object... aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.default boolean
containsKey(java.lang.String... aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.default boolean
containsKey(java.util.Collection<?> aPathElements)
Tests whether the path elements addressing the according path (key) exist as ofKeys.containsKey(Object)
.default java.util.Set<java.lang.String>
dirs()
Applies thedirs(String)
method for the root path "/".default java.util.Set<java.lang.String>
dirs(java.lang.Object aPath)
Retrieves the directory names below the given path excluding any entries representing leaves.default java.util.Set<java.lang.String>
dirs(java.lang.Object... aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves.default java.util.Set<java.lang.String>
dirs(java.lang.String aPath)
Retrieves the directory names below the given path excluding any entries representing leaves.default java.util.Set<java.lang.String>
dirs(java.lang.String... aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves.default java.util.Set<java.lang.String>
dirs(java.util.Collection<?> aPathElements)
Retrieves the directory names below the given path elements excluding any entries representing leaves.default java.util.Set<java.lang.String>
findPaths(T aValue)
Finds all paths whose values equal that of the given value.default java.lang.String
fromExternalPath(java.lang.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(java.lang.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(java.lang.String... 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
get(java.util.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(java.lang.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(java.lang.String aPath)
Returns the leaves below the given path in an array.default T[]
getArray(java.lang.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(java.util.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(java.lang.Object... aPathElements)
Returns the indexes pointing to elements of the given "array" path.default int[]
getArrayIndexes(java.lang.String aPath)
Returns the indexes pointing to elements of the given "array" path.default int[]
getArrayIndexes(java.lang.String... aPathElements)
Returns the indexes pointing to elements of the given "array" path.default int[]
getArrayIndexes(java.util.Collection<?> aPathElements)
Returns the indexes pointing to elements of the given "array" 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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(java.lang.String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(java.lang.String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int[]
getDirIndexes(java.util.Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.Object aPath)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(java.lang.Object... aPathElements)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(java.lang.String aPath)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(java.lang.String... aPathElements)
Determines whether the give path contains children as ofchildren(String)
.default boolean
hasChildren(java.util.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(java.lang.Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(java.lang.Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(java.lang.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(java.lang.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(java.lang.String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(java.lang.String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(java.lang.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(java.lang.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(java.util.Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
hasDirAt(java.util.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(java.lang.String aPath)
Tests whether there exists a parent path for the given path.default boolean
hasPath(java.lang.Object... aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
.default boolean
hasPath(java.lang.String aPath)
Determines whether the provided path represents a path within the givenPathMap
.default boolean
hasPath(java.lang.String... aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
.default boolean
hasPath(java.util.Collection<?> aPathElements)
Determines whether the provided path elements addressing the path represent a path within the givenPathMap
.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(java.lang.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(java.lang.Object[] aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array".default boolean
hasValueAt(java.lang.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(java.lang.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(java.lang.String[] aPathElements, int aIndex)
Determines whether the index below the path points to an element of an "array".default boolean
hasValueAt(java.lang.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(java.util.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(java.lang.Object aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.default boolean
isArray(java.lang.Object... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArray(java.lang.String aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.default boolean
isArray(java.lang.String... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArray(java.util.Collection<?> aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArrayIndex()
Applies theisArrayIndex(String)
method for the root path "/".default boolean
isArrayIndex(java.lang.Object aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.default boolean
isArrayIndex(java.lang.Object... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArrayIndex(java.lang.String aPath)
Determines as ofgetArray(String)
if the elements below the given path can be seen as an array.default boolean
isArrayIndex(java.lang.String... aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isArrayIndex(java.util.Collection<?> aPathElements)
Determines as ofgetArray(String)
if the elements below the given path elements can be seen as an array.default boolean
isChild(java.lang.Object... aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isChild(java.lang.String aPath)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isChild(java.lang.String... aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isChild(java.util.Collection<?> aPathElements)
Determines whether the give path points to an entry in terms ofchildren(String)
.default boolean
isDir(java.lang.Object aPath)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(java.lang.Object... aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(java.lang.String aPath)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(java.lang.String... aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDir(java.util.Collection<?> aPathElements)
Determines whether the give path points to a directory in terms ofdirs(String)
.default boolean
isDirIndex()
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isDirIndex(java.lang.Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isDirIndex(java.lang.String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isDirIndex(java.lang.String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isDirIndex(java.util.Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default boolean
isEqualTo(PathMap<?> aOther)
default boolean
isLeaf(java.lang.Object aPath)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
isLeaf(java.lang.Object... aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
isLeaf(java.lang.String aPath)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
isLeaf(java.lang.String... aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
isLeaf(java.util.Collection<?> aPathElements)
Determines whether the give path points to a leave in terms ofleaves(String)
.default boolean
isRootPath(java.lang.String aPath)
Determines whether the given path represents the toor path.default java.util.Set<java.lang.String>
keySet(java.lang.String aPath)
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(java.lang.Object aPath)
Returns the last index as ofgetArrayIndexes(String)
.default int
lastArrayIndex(java.lang.Object... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String[])
.default int
lastArrayIndex(java.lang.String aPath)
Returns the last index as ofgetArrayIndexes(String)
.default int
lastArrayIndex(java.lang.String... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String[])
.default int
lastArrayIndex(java.util.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(java.lang.Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(java.lang.Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(java.lang.String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(java.lang.String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
lastDirIndex(java.util.Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default java.util.Set<java.lang.String>
leaves()
Applies theleaves(String)
method for the root path "/".default java.util.Set<java.lang.String>
leaves(java.lang.Object aPath)
Retrieves the leaves names below the given path excluding any entries representing directories.default java.util.Set<java.lang.String>
leaves(java.lang.Object... aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories.default java.util.Set<java.lang.String>
leaves(java.lang.String aPath)
Retrieves the leaves names below the given path excluding any entries representing directories.default java.util.Set<java.lang.String>
leaves(java.lang.String... aPathElements)
Retrieves the leaves names below the given path elements excluding any entries representing directories.default java.util.Set<java.lang.String>
leaves(java.util.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(java.lang.Object aPath)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String)
.default int
nextArrayIndex(java.lang.Object... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String...)
.default int
nextArrayIndex(java.lang.String aPath)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String)
.default int
nextArrayIndex(java.lang.String... aPathElements)
Returns the next index to be used (and not used yet) as ofgetArrayIndexes(String...)
.default int
nextArrayIndex(java.util.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(java.lang.Object aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(java.lang.Object... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(java.lang.String aPath)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(java.lang.String... aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default int
nextDirIndex(java.util.Collection<?> aPathElements)
An indexed directory represents all elements which begin with a path which's last path element represents an index.default java.util.Set<java.lang.String>
paths()
Same asKeys.keySet()
with according semantics in the method name.default java.util.Set<java.lang.String>
paths(java.lang.Object aPath)
Same askeySet(String)
with according semantics in the method name.default java.util.Set<java.lang.String>
paths(java.lang.Object... aPathElements)
Same askeySet(String)
with according semantics in the method name.default java.util.Set<java.lang.String>
paths(java.lang.String aPath)
Same askeySet(String)
with according semantics in the method name.default java.util.Set<java.lang.String>
paths(java.lang.String... aPathElements)
Same askeySet(String)
with according semantics in the method name.default java.util.Set<java.lang.String>
paths(java.util.Collection<?> aPathElements)
Same askeySet(String)
with according semantics in the method name.default PathMap<T>
query(java.lang.Object... aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(java.lang.String aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(java.lang.String... aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(java.util.Collection<?> aQueryElements)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
query(java.util.regex.Pattern aRegExp)
Queries the keys of the instance using a regular expression as of the providedPattern
instance.default PathMap<T>
queryBetween(java.lang.Object[] aFromPath, java.lang.Object[] aPathQuery, java.lang.Object[] aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(java.lang.Object aFromPath, java.lang.Object aPathQuery, java.lang.Object aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(java.lang.String[] aFromPath, java.lang.String[] aPathQuery, java.lang.String[] aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(java.lang.String aFromPath, java.lang.String aPathQuery, java.lang.String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryBetween(java.lang.String aFromPath, java.util.regex.Pattern aRegExp, java.lang.String aToPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.default PathMap<T>
queryBetween(java.util.Collection<?> aFromPath, java.util.Collection<?> aPathQuery, java.util.Collection<?> aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(java.lang.Object[] aPathQuery, java.lang.Object[] aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(java.lang.Object aPathQuery, java.lang.Object aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(java.lang.String[] aPathQuery, java.lang.String[] aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(java.lang.String aPathQuery, java.lang.String aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(java.util.Collection<?> aPathQuery, java.util.Collection<?> aFromPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryFrom(java.util.regex.Pattern aRegExp, java.lang.String aFromPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.default java.util.Set<java.lang.String>
queryPaths(java.lang.Object aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default java.util.Set<java.lang.String>
queryPaths(java.lang.Object... aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default java.util.Set<java.lang.String>
queryPaths(java.lang.String aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default java.util.Set<java.lang.String>
queryPaths(java.lang.String... aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default java.util.Set<java.lang.String>
queryPaths(java.util.Collection<?> aPathQuery)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default java.util.Set<java.lang.String>
queryPaths(java.util.regex.Pattern aRegExp)
Queries the keys of the instance using a regular expression as of the providedPattern
.default PathMap<T>
queryTo(java.lang.Object[] aPathQuery, java.lang.String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(java.lang.Object aPathQuery, java.lang.String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(java.lang.String[] aPathQuery, java.lang.String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(java.lang.String aPathQuery, java.lang.String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(java.util.Collection<?> aPathQuery, java.lang.String aToPath)
Queries the keys of the instance using thePathMatcher
' matching patterns, similar to the wildcards '*', '?'default PathMap<T>
queryTo(java.util.regex.Pattern aRegExp, java.lang.String aToPath)
Queries the keys of the instance using a regular expression as of the providedPattern
.default PathMap<T>
retrieveBetween(java.lang.Object[] aFromPath, java.lang.Object[] aToPath)
default PathMap<T>
retrieveBetween(java.lang.Object aFromPath, java.lang.Object aToPath)
default PathMap<T>
retrieveBetween(java.lang.String[] aFromPath, java.lang.String[] aToPath)
default PathMap<T>
retrieveBetween(java.lang.String aFromPath, java.lang.String aToPath)
default PathMap<T>
retrieveBetween(java.util.Collection<?> aFromPath, java.util.Collection<?> aToPath)
default PathMap<T>
retrieveFrom(java.lang.Object aParentPath)
Gets the children elements of the provided parent's path, excluding the parent's path.default PathMap<T>
retrieveFrom(java.lang.Object... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.PathMap<T>
retrieveFrom(java.lang.String aFromPath)
default PathMap<T>
retrieveFrom(java.lang.String... aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
retrieveFrom(java.util.Collection<?> aPathElements)
Gets the children elements of the provided parent's path elements, excluding the parent's path.default PathMap<T>
retrieveTo(java.lang.Object aToPath)
default PathMap<T>
retrieveTo(java.lang.Object... aToPathElements)
PathMap<T>
retrieveTo(java.lang.String aToPath)
default PathMap<T>
retrieveTo(java.lang.String... aToPathElements)
default PathMap<T>
retrieveTo(java.util.Collection<?> aToPathElements)
default java.util.List<java.lang.String>
sortedKeys()
Retrieves an alphabetically sorted list containing all the keys found in the elements of this collection.default java.lang.Object
toDataStructure()
Applies thetoDataStructure(String)
method for the root path "/".java.lang.Object
toDataStructure(java.lang.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 java.lang.String
toExternalPath(java.lang.String aPath, char aDelimiter)
Converts the given key (path) to an external key by converting the default delimiterDelimiterAccessor.getDelimiter()
to the provided delimiter.default java.lang.String
toLeaf(java.lang.String aPath)
Returns the last path element from the given path.default java.util.Map<java.lang.String,?>
toMap()
Applies thetoMap(String)
method for the root path "/".default java.util.Map<java.lang.String,?>
toMap(java.lang.String aFromPath)
Creates a nestedMap
structure from thePathMap
's entries below the provided path.default java.lang.String
toNormalizedPath(java.lang.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 java.lang.String
toParentPath(java.lang.String aPath)
Returns the path representing the parent path for the given path.default java.lang.String
toPath(java.lang.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.default java.lang.String
toPath(java.lang.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 java.lang.String
toPath(java.util.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.default java.lang.String[]
toPathElements(java.lang.String aPath)
Retrieves the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.default java.util.List<java.lang.String>
toPathList(java.lang.String aPath)
Retrieves a mutableList
with the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.default java.util.Stack<java.lang.String>
toPathStack(java.lang.String aPath)
Retrieves aStack
with the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.default java.lang.String
toPropertyPath(java.lang.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.-
Methods inherited from interface org.refcodes.structure.Containable
isEmpty, size
-
Methods inherited from interface org.refcodes.structure.Keys
containsKey, containsValue, get, getOr, keySet, use, values
-
-
-
-
Method Detail
-
children
default java.util.Set<java.lang.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 java.util.Set<java.lang.String> children(java.util.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 java.util.Set<java.lang.String> children(java.lang.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 java.util.Set<java.lang.String> children(java.lang.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 java.util.Set<java.lang.String> children(java.lang.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 java.util.Set<java.lang.String> children(java.lang.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(java.util.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(java.lang.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(java.lang.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 java.util.Set<java.lang.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 java.util.Set<java.lang.String> dirs(java.util.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 java.util.Set<java.lang.String> dirs(java.lang.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 java.util.Set<java.lang.String> dirs(java.lang.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 java.util.Set<java.lang.String> dirs(java.lang.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 java.util.Set<java.lang.String> dirs(java.lang.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
.
-
fromExternalPath
default java.lang.String fromExternalPath(java.lang.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.
-
findPaths
default java.util.Set<java.lang.String> findPaths(T aValue)
Finds all paths whose values equal that of the given value.- Parameters:
aValue
- The value for wich to seek the paths.- Returns:
- The paths pointing to the according value.
-
get
default T get(java.util.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(java.lang.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(java.lang.String... 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)
-
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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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(java.lang.String aPath) throws java.lang.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:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
getArrayIndexes
default int[] getArrayIndexes(java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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(java.lang.String aPath) throws java.lang.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:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
getDirIndexes
default int[] getDirIndexes(java.lang.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 java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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)
(isLeaf(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(java.lang.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)
(isLeaf(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(java.lang.String aPath)
Determines whether the provided path represents a path within the givenPathMap
. The path not necessarily points to a leaf in terms of being a leave or a directory. UseisChild(String)
(isLeaf(String)
orisDir(String)
) if we have a leaf.- 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(java.lang.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)
(isLeaf(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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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.
-
isArray
default boolean isArray(java.lang.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.
-
isArrayIndex
default boolean isArrayIndex()
Applies theisArrayIndex(String)
method for the root path "/".- Returns:
- As of
isArrayIndex(String)
applied to the root path. - See Also:
isArrayIndex(String)
-
isArrayIndex
default boolean isArrayIndex(java.util.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.
-
isArrayIndex
default boolean isArrayIndex(java.lang.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.
-
isArrayIndex
default boolean isArrayIndex(java.lang.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.
-
isArrayIndex
default boolean isArrayIndex(java.lang.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.
-
isArrayIndex
default boolean isArrayIndex(java.lang.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.
-
isChild
default boolean isChild(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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.
-
isDirIndex
default boolean isDirIndex()
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)
(isLeaf(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.
-
isDirIndex
default boolean isDirIndex(java.util.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)
(isLeaf(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.
-
isDirIndex
default boolean isDirIndex(java.lang.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)
(isLeaf(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.
-
isDirIndex
default boolean isDirIndex(java.lang.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)
(isLeaf(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.
-
isDirIndex
default boolean isDirIndex(java.lang.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)
(isLeaf(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.
-
isLeaf
default boolean isLeaf(java.util.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.
-
isLeaf
default boolean isLeaf(java.lang.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.
-
isLeaf
default boolean isLeaf(java.lang.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.
-
isLeaf
default boolean isLeaf(java.lang.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.
-
isLeaf
default boolean isLeaf(java.lang.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(java.lang.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 java.util.Set<java.lang.String> keySet(java.lang.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
.
-
lastArrayIndex
default int lastArrayIndex() throws java.lang.IllegalArgumentException
Returns the last index as ofgetArrayIndexes()
.- Returns:
- The last index used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastArrayIndex
default int lastArrayIndex(java.util.Collection<?> aPathElements) throws java.lang.IllegalArgumentException
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 next index to be used (and not used yet) used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastArrayIndex
default int lastArrayIndex(java.lang.Object aPath) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastArrayIndex
default int lastArrayIndex(java.lang.Object... aPathElements) throws java.lang.IllegalArgumentException
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 next index to be used (and not used yet) used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastArrayIndex
default int lastArrayIndex(java.lang.String aPath) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastArrayIndex
default int lastArrayIndex(java.lang.String... aPathElements) throws java.lang.IllegalArgumentException
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 next index to be used (and not used yet) used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastDirIndex
default int lastDirIndex() throws java.lang.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 last index as ofgetDirIndexes()
.- Returns:
- The last index used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastDirIndex
default int lastDirIndex(java.util.Collection<?> aPathElements) throws java.lang.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 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 next index to be used (and not used yet) used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastDirIndex
default int lastDirIndex(java.lang.Object aPath) throws java.lang.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 last index as ofgetDirIndexes(String)
.- Parameters:
aPath
- The path from which to determine the last index.- Returns:
- The last index used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastDirIndex
default int lastDirIndex(java.lang.Object... aPathElements) throws java.lang.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 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 next index to be used (and not used yet) used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastDirIndex
default int lastDirIndex(java.lang.String aPath) throws java.lang.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 last index as ofgetDirIndexes(String)
.- Parameters:
aPath
- The path from which to determine the last index.- Returns:
- The last index used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
lastDirIndex
default int lastDirIndex(java.lang.String... aPathElements) throws java.lang.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 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 next index to be used (and not used yet) used by the "array".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
leaves
default java.util.Set<java.lang.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 java.util.Set<java.lang.String> leaves(java.util.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 java.util.Set<java.lang.String> leaves(java.lang.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 java.util.Set<java.lang.String> leaves(java.lang.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 java.util.Set<java.lang.String> leaves(java.lang.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 java.util.Set<java.lang.String> leaves(java.lang.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() throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextArrayIndex
default int nextArrayIndex(java.util.Collection<?> aPathElements) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextArrayIndex
default int nextArrayIndex(java.lang.Object aPath) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextArrayIndex
default int nextArrayIndex(java.lang.Object... aPathElements) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextArrayIndex
default int nextArrayIndex(java.lang.String aPath) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextArrayIndex
default int nextArrayIndex(java.lang.String... aPathElements) throws java.lang.IllegalArgumentException
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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextDirIndex
default int nextDirIndex() throws java.lang.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 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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextDirIndex
default int nextDirIndex(java.util.Collection<?> aPathElements) throws java.lang.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 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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextDirIndex
default int nextDirIndex(java.lang.Object aPath) throws java.lang.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 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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextDirIndex
default int nextDirIndex(java.lang.Object... aPathElements) throws java.lang.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 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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextDirIndex
default int nextDirIndex(java.lang.String aPath) throws java.lang.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 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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
nextDirIndex
default int nextDirIndex(java.lang.String... aPathElements) throws java.lang.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 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".
- Throws:
java.lang.IllegalArgumentException
- in case the path does not point to indexed elements.
-
paths
default java.util.Set<java.lang.String> paths()
Same asKeys.keySet()
with according semantics in the method name.- Returns:
- The paths which are assigned to values.
-
paths
default java.util.Set<java.lang.String> paths(java.util.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 java.util.Set<java.lang.String> paths(java.lang.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 java.util.Set<java.lang.String> paths(java.lang.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 java.util.Set<java.lang.String> paths(java.lang.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 java.util.Set<java.lang.String> paths(java.lang.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(java.util.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.util.regex.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(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.util.Collection<?> aFromPath, java.util.Collection<?> aPathQuery, java.util.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.Object aFromPath, java.lang.Object aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.Object[] aFromPath, java.lang.Object[] aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.String aFromPath, java.lang.String aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.String aFromPath, java.util.regex.Pattern aRegExp, java.lang.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(java.lang.String[] aFromPath, java.lang.String[] aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.util.Collection<?> aPathQuery, java.util.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.Object aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.Object[] aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.String aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.util.regex.Pattern aRegExp, java.lang.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(java.lang.String[] aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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 java.util.Set<java.lang.String> queryPaths(java.util.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default java.util.Set<java.lang.String> queryPaths(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default java.util.Set<java.lang.String> queryPaths(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default java.util.Set<java.lang.String> queryPaths(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default java.util.Set<java.lang.String> queryPaths(java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") we refer to as wildcards.- Parameters:
aPathQuery
- The path query including your wildcards.- Returns:
- The result contains the matching paths.
-
queryPaths
default java.util.Set<java.lang.String> queryPaths(java.util.regex.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.
-
queryTo
default PathMap<T> queryTo(java.util.Collection<?> aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.Object aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.Object[] aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.lang.String aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.util.regex.Pattern aRegExp, java.lang.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(java.lang.String[] aPathQuery, java.lang.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 ("*") matches zero or more characters within a path name. A double asterisk ("**") matches zero or more characters across directory levels. A question mark ("?") matches exactly one character within a path name. The single asterisk ("*"), the double asterisk ("**") and the question mark ("?") 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(java.util.Collection<?> aFromPath, java.util.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(java.lang.Object aFromPath, java.lang.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(java.lang.Object[] aFromPath, java.lang.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(java.lang.String aFromPath, java.lang.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(java.lang.String[] aFromPath, java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.util.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.util.List<java.lang.String> sortedKeys()
Retrieves an alphabetically sorted list containing all the keys found in the elements of this collection.- Returns:
- A sorted list with key objects being the keys of all elements in this collection.
-
toDataStructure
default java.lang.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
java.lang.Object toDataStructure(java.lang.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.- Parameters:
aFromPath
- The path below which thePathMap
to be converted into a data structure.- Returns:
- A data structure being a mixture of
Map
instances and arrays representing the data below the given path.
-
toExternalPath
default java.lang.String toExternalPath(java.lang.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.
-
toLeaf
default java.lang.String toLeaf(java.lang.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 java.util.Map<java.lang.String,?> toMap() throws java.lang.IllegalStateException
Applies thetoMap(String)
method for the root path "/".- Returns:
- As of
toMap(String)
applied to the root path. - Throws:
java.lang.IllegalStateException
- the illegal state exception
-
toMap
default java.util.Map<java.lang.String,?> toMap(java.lang.String aFromPath) throws java.lang.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:
java.lang.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 java.lang.String toNormalizedPath(java.lang.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 java.lang.String toParentPath(java.lang.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:
java.lang.IllegalArgumentException
- thrown in case there is no such parent path for the given path; test beforehand usinghasParentPath(String)
.
-
toPath
default java.lang.String toPath(java.util.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 java.lang.String toPath(java.lang.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 java.lang.String toPath(java.lang.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 java.lang.String[] toPathElements(java.lang.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 java.util.List<java.lang.String> toPathList(java.lang.String aPath)
Retrieves a mutableList
with the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.- Parameters:
aPath
- The path from which to retrieve the mutableList
containing the according path elements.- Returns:
- The mutable
List
containing the path elements excluding the delimiter.
-
toPathStack
default java.util.Stack<java.lang.String> toPathStack(java.lang.String aPath)
Retrieves aStack
with the path's elements separated from each other by the path delimiterDelimiterAccessor.getDelimiter()
.- Parameters:
aPath
- The path from which to retrieve theStack
containing the according path elements.- Returns:
- The
Stack
containing the path elements excluding the delimiter.
-
toPropertyPath
default java.lang.String toPropertyPath(java.lang.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.
-
isEqualTo
default boolean isEqualTo(PathMap<?> aOther)
-
-