T
- The type of the terminating elements.org.refcodes.mixin.AnnotatorAccessor
, Containable
, org.refcodes.mixin.DelimiterAccessor
, Dictionary<String,T>
, org.refcodes.mixin.Dumpable
, Keys<K,V>
, org.refcodes.mixin.TypeAccessor<T>
CanonicalMap
, CanonicalMap.CanonicalMapBuilder
, CanonicalMap.MutableCanonicalMap
, ClassStructMap
, ClassStructMap.ClassStructMapBuilder
, ClassStructMap.MutableClassStructMap
, InterOperableMap<T>
, InterOperableMap.InterOperableMapBuilder<T>
, InterOperableMap.MutableInterOperableMap<T>
, PathMap.MutablePathMap<T>
, PathMap.PathMapBuilder<T>
, SimpleTypeMap
, SimpleTypeMap.MutableSimpleTypeMap
, SimpleTypeMap.SimpleTypeMapBuilder
CanonicalMapBuilderImpl
, CanonicalMapImpl
, ClassStructMapBuilderImpl
, ClassStructMapImpl
, PathMapBuilderImpl
, PathMapImpl
, SimpleTypeMapBuilderImpl
, SimpleTypeMapImpl
public interface PathMap<T> extends Dictionary<String,T>, org.refcodes.mixin.TypeAccessor<T>, org.refcodes.mixin.Dumpable, org.refcodes.mixin.DelimiterAccessor, org.refcodes.mixin.AnnotatorAccessor
PathMap
is a flat map by which each element is addressed by a path;
represented by the PathMap
's keys. Each path's elements is separated
from each other by the DelimiterAccessor.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 the PathMap
.
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: *
To address an element in a PathMap
, an absolute path is to be
provided, e.g. the provided path must start with the path delimiter. A valid
path would look something like "/animals/dogs/otto".
A path is also handled as an absolute path if it does not(!) begin with a delimiter, e.g. both paths "/machines/robots/greg" and "machines/robots/greg" point to the same "greg" leave.
Elements in a PathMap
are reckoned to be an array when they belong to
the same hierarchy level and when their keys represent integer numbers. In
such a case additional array related functionality is at your hands. E.g.
isIndexDir(String)
, getDirAt(String, int)
or
getArray(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):
getArray(String)
for the path
"/animals/dogs" would contain {"ace", "bandit", "radar", "echo", "snoopy"}.
Calling isArray("/animals/dogs")
would return true
whereas calling isArray("/animals")
would return false.
Before processing, an implementation of the PathMap
should call
toNormalizedPath(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 a PathMap
. This is reflected by methods such
as PathMap.MutablePathMap.insertFrom(Object, String)
and
PathMap.MutablePathMap.insertTo(String, Object)
or
retrieveFrom(String)
and retrieveTo(String)
.
Modifier and Type | Interface | Description |
---|---|---|
static interface |
PathMap.MutablePathMap<T> |
The
PathMap.MutablePathMap adds mutable functionality to the
PathMap . |
static interface |
PathMap.PathMapBuilder<T> |
The
PathMap.PathMapBuilder adds builder functionality to the
PathMap.MutablePathMap . |
org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B extends org.refcodes.mixin.AnnotatorAccessor.AnnotatorBuilder<B>>, org.refcodes.mixin.AnnotatorAccessor.AnnotatorMutator, org.refcodes.mixin.AnnotatorAccessor.AnnotatorProperty
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
Dictionary.MutableDictionary<K,V>
Keys.MutableKeys<K,V>, Keys.MutableValues<K,V>
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object>
Modifier and Type | Field | Description |
---|---|---|
static char |
ANNOTATOR |
|
static char |
DELIMITER |
Modifier and Type | Method | Description |
---|---|---|
default Set<String> |
children() |
Retrieves the entry names below the root including leaves as well as
directories.
|
default Set<String> |
children(Object aPath) |
Retrieves the entry names below the given path including leaves as well
as directories.
|
default Set<String> |
children(Object... aPathElements) |
Retrieves the entry names below the given path including leaves as well
as directories.
|
default Set<String> |
children(String aPath) |
Retrieves the entry names below the given path including leaves as well
as directories.
|
default Set<String> |
children(String... aPathElements) |
Retrieves the entry names below the given path including leaves as well
as directories.
|
default Set<String> |
children(Collection<?> aPathElements) |
Retrieves the entry names below the given path including leaves as well
as directories.
|
default boolean |
containsKey(Object... aPathElements) |
Tests whether the path elements addressing the according path (key) exist
as of
Keys.containsKey(Object) . |
default boolean |
containsKey(String... aPathElements) |
Tests whether the path elements addressing the according path (key) exist
as of
Keys.containsKey(Object) . |
default boolean |
containsKey(Collection<?> aPathElements) |
Tests whether the path elements addressing the according path (key) exist
as of
Keys.containsKey(Object) . |
default Set<String> |
dirs() |
Applies the
dirs(String) method for the root path "/". |
default Set<String> |
dirs(Object aPath) |
Retrieves the directory names below the given path excluding any entries
representing leaves.
|
default Set<String> |
dirs(Object... aPathElements) |
Retrieves the directory names below the given path elements excluding any
entries representing leaves.
|
default Set<String> |
dirs(String aPath) |
Retrieves the directory names below the given path excluding any entries
representing leaves.
|
default Set<String> |
dirs(String... aPathElements) |
Retrieves the directory names below the given path elements excluding any
entries representing leaves.
|
default Set<String> |
dirs(Collection<?> aPathElements) |
Retrieves the directory names below the given path elements excluding any
entries representing leaves.
|
default Set<String> |
findPaths(T aValue) |
Finds all paths whose values equal that of the given value.
|
default String |
fromExternalPath(String aPath,
char... aDelimiters) |
Converts an external key (path) which uses a different notation from
DelimiterAccessor.getDelimiter() for the path delimiter and converts those to the
default delimiter. |
default T |
get(Object... aPathElements) |
Experimental convenience method: Applies the
Keys.get(Object) method
for the provided path elements by first converting them to a
String (if not being a String already) and then
concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter() in between and taking care to avoid duplicate
path delimiters. |
default T |
get(String... aPathElements) |
Experimental convenience method: Applies the
Keys.get(Object) method
for the provided path elements by concatenating the elements with the
path delimiter DelimiterAccessor.getDelimiter() in between and taking care to
avoid duplicate path delimiters. |
default T |
get(Collection<?> aPathElements) |
Experimental convenience method: Applies the
Keys.get(Object) method
for the provided path elements by concatenating the elements with the
path delimiter DelimiterAccessor.getDelimiter() in between and taking care to
avoid duplicate path delimiters. |
default T[] |
getArray() |
Applies the
getArray(String) method for the root path "/". |
default T[] |
getArray(Object... aPathElements) |
Applies the
getArray(String) method for the provided path
elements by concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter() in between and taking care to avoid duplicate
path delimiters. |
default T[] |
getArray(String aPath) |
Returns the leaves below the given path in an array.
|
default T[] |
getArray(String... aPathElements) |
Applies the
getArray(String) method for the provided path
elements by concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter() in between and taking care to avoid duplicate
path delimiters. |
default T[] |
getArray(Collection<?> aPathElements) |
Applies the
getArray(String) method for the provided path
elements by concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter() in between and taking care to avoid duplicate
path delimiters. |
default int[] |
getArrayIndexes() |
Returns the indexes pointing to elements of the root "array" path.
|
default int[] |
getArrayIndexes(Object... aPathElements) |
Returns the indexes pointing to elements of the given "array" path.
|
default int[] |
getArrayIndexes(String aPath) |
Returns the indexes pointing to elements of the given "array" path.
|
default int[] |
getArrayIndexes(String... aPathElements) |
Returns the indexes pointing to elements of the given "array" path.
|
default int[] |
getArrayIndexes(Collection<?> aPathElements) |
Returns the indexes pointing to elements of the given "array" path.
|
default PathMap<T> |
getDir(Object aPath) |
Gets the children elements of the provided parent's path, excluding the
parent's path.
|
default PathMap<T> |
getDir(Object... aPathElements) |
Gets the children elements of the provided parent's path elements,
excluding the parent's path.
|
default PathMap<T> |
getDir(String aPath) |
|
default PathMap<T> |
getDir(String... aPathElements) |
Gets the children elements of the provided parent's path elements,
excluding the parent's path.
|
default PathMap<T> |
getDir(Collection<?> aPathElements) |
Gets the children elements of the provided parent's path elements,
excluding the parent's path.
|
default PathMap<T> |
getDirAt(int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default PathMap<T> |
getDirAt(Object[] aPathElements,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default PathMap<T> |
getDirAt(Object aPath,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default PathMap<T> |
getDirAt(String[] aPathElements,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default PathMap<T> |
getDirAt(String aPath,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default PathMap<T> |
getDirAt(Collection<?> aPathElements,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int[] |
getDirIndexes() |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int[] |
getDirIndexes(Object... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int[] |
getDirIndexes(String aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int[] |
getDirIndexes(String... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int[] |
getDirIndexes(Collection<?> aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default String |
getRootPath() |
Returns the path pointing to the root of this
PathMap . |
default T |
getValueAt(int aIndex) |
Returns the value of an array at the root path with the given array index
or null if there is none such value.
|
default T |
getValueAt(Object[] aPathElements,
int aIndex) |
Returns the value of an array at the given path path with the given array
index or null if there is none such value.
|
default T |
getValueAt(Object aPath,
int aIndex) |
Returns the value of an array at the given path path with the given array
index or null if there is none such value.
|
default T |
getValueAt(String[] aPathElements,
int aIndex) |
Returns the value of an array at the given path path with the given array
index or null if there is none such value.
|
default T |
getValueAt(String aPath,
int aIndex) |
Returns the value of an array at the given path path with the given array
index or null if there is none such value.
|
default T |
getValueAt(Collection<?> aPathElements,
int aIndex) |
Returns the value of an array at the given path path with the given array
index or null if there is none such value.
|
default boolean |
hasChildren(Object aPath) |
Determines whether the give path contains children as of
children(String) . |
default boolean |
hasChildren(Object... aPathElements) |
Determines whether the give path contains children as of
children(String) . |
default boolean |
hasChildren(String aPath) |
Determines whether the give path contains children as of
children(String) . |
default boolean |
hasChildren(String... aPathElements) |
Determines whether the give path contains children as of
children(String) . |
default boolean |
hasChildren(Collection<?> aPathElements) |
Determines whether the give path contains children as of
children(String) . |
default boolean |
hasDirAt(int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(Object aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(Object... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(Object[] aPathElements,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(Object aPath,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(String aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(String... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(String[] aPathElements,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(String aPath,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(Collection<?> aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasDirAt(Collection<?> aPathElements,
int aIndex) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
hasParentPath(String aPath) |
Tests whether there exists a parent path for the given path.
|
default boolean |
hasPath(Object... aPathElements) |
Determines whether the provided path elements addressing the path
represent a path within the given
PathMap . |
default boolean |
hasPath(String aPath) |
Determines whether the provided path represents a path within the given
PathMap . |
default boolean |
hasPath(String... aPathElements) |
Determines whether the provided path elements addressing the path
represent a path within the given
PathMap . |
default boolean |
hasPath(Collection<?> aPathElements) |
Determines whether the provided path elements addressing the path
represent a path within the given
PathMap . |
default boolean |
hasSubDirs(Object aPath) |
Determines whether the give path points to a directory which contains
sub-directories.
|
default boolean |
hasSubDirs(Object... aPathElements) |
Determines whether the give path points to a directory which contains
sub-directories.
|
default boolean |
hasSubDirs(String aPath) |
Determines whether the give path points to a directory which contains
sub-directories.
|
default boolean |
hasSubDirs(Collection<?> aPathElements) |
Determines whether the give path points to a directory which contains
sub-directories.
|
default boolean |
hasValue(Object aPath) |
Determines whether the give path points to a leave in terms of
leaves(String) . |
default boolean |
hasValue(Object... aPathElements) |
Determines whether the give path points to a leave in terms of
leaves(String) . |
default boolean |
hasValue(String aPath) |
Determines whether the give path points to a leave in terms of
leaves(String) . |
default boolean |
hasValue(String... aPathElements) |
Determines whether the give path points to a leave in terms of
leaves(String) . |
default boolean |
hasValue(Collection<?> aPathElements) |
Determines whether the give path points to a leave in terms of
leaves(String) . |
default boolean |
hasValueAt(int aIndex) |
Determines whether the index below the root points to an element of an
"array" Given the following paths:
/0/0aaa
/1/1aaa
For indexes 0 and 1 you will get true, for all others you will
get false. |
default boolean |
hasValueAt(Object aPath) |
Determines whether the path points to an index inside an "array" Given
the following paths:
/root/child/0/0bbb
/root/child/1/1bbb
/bla/abc
/bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for
all others you will get false. |
default boolean |
hasValueAt(Object[] aPathElements,
int aIndex) |
Determines whether the index below the path points to an element of an
"array".
|
default boolean |
hasValueAt(Object aPath,
int aIndex) |
Determines whether the index below the path points to an element of an
"array" Given the following paths:
/root/child/0/0bbb
/root/child/1/1bbb
/bla/abc
/bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for
all others you will get false. |
default boolean |
hasValueAt(String aPath) |
Determines whether the path points to an index inside an "array" Given
the following paths:
/root/child/0/0bbb
/root/child/1/1bbb
/bla/abc
/bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for
all others you will get false. |
default boolean |
hasValueAt(String[] aPathElements,
int aIndex) |
Determines whether the index below the path points to an element of an
"array".
|
default boolean |
hasValueAt(String aPath,
int aIndex) |
Determines whether the index below the path points to an element of an
"array" Given the following paths:
/root/child/0/0bbb
/root/child/1/1bbb
/bla/abc
/bla/xyz
For path "/root/child" and indexes 0 and 1 you will get true, for
all others you will get false. |
default boolean |
hasValueAt(Collection<?> aPathElements,
int aIndex) |
Determines whether the index below the path points to an element of an
"array".
|
default boolean |
isArray() |
Applies the
isArray(String) method for the root path "/". |
default boolean |
isArray(Object aPath) |
Determines as of
getArray(String) if the elements below the
given path can be seen as an array. |
default boolean |
isArray(Object... aPathElements) |
Determines as of
getArray(String) if the elements below the
given path elements can be seen as an array. |
default boolean |
isArray(String aPath) |
Determines as of
getArray(String) if the elements below the
given path can be seen as an array. |
default boolean |
isArray(String... aPathElements) |
Determines as of
getArray(String) if the elements below the
given path elements can be seen as an array. |
default boolean |
isArray(Collection<?> aPathElements) |
Determines as of
getArray(String) if the elements below the
given path elements can be seen as an array. |
default boolean |
isChild(Object... aPathElements) |
Determines whether the give path points to an entry in terms of
children(String) . |
default boolean |
isChild(String aPath) |
Determines whether the give path points to an entry in terms of
children(String) . |
default boolean |
isChild(String... aPathElements) |
Determines whether the give path points to an entry in terms of
children(String) . |
default boolean |
isChild(Collection<?> aPathElements) |
Determines whether the give path points to an entry in terms of
children(String) . |
default boolean |
isDir(Object aPath) |
Determines whether the give path points to a directory in terms of
dirs(String) . |
default boolean |
isDir(Object... aPathElements) |
Determines whether the give path points to a directory in terms of
dirs(String) . |
default boolean |
isDir(String aPath) |
Determines whether the give path points to a directory in terms of
dirs(String) . |
default boolean |
isDir(String... aPathElements) |
Determines whether the give path points to a directory in terms of
dirs(String) . |
default boolean |
isDir(Collection<?> aPathElements) |
Determines whether the give path points to a directory in terms of
dirs(String) . |
default boolean |
isEqualTo(PathMap<?> aOther) |
|
default boolean |
isIndexDir() |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
isIndexDir(Object... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
isIndexDir(String aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
isIndexDir(String... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
isIndexDir(Collection<?> aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default boolean |
isLeaf(Object aPath) |
Determines whether the give path points to a leaf in terms of
dirs(String) . |
default boolean |
isLeaf(Object... aPathElements) |
Determines whether the give path points to a leaf in terms of
dirs(String) . |
default boolean |
isLeaf(String aPath) |
Determines whether the give path points to a leaf in terms of
leaves(String) . |
default boolean |
isLeaf(String... aPathElements) |
Determines whether the give path points to a leaf in terms of
dirs(String) . |
default boolean |
isLeaf(Collection<?> aPathElements) |
Determines whether the give path points to a leaf in terms of
dirs(String) . |
default boolean |
isRootPath(String aPath) |
Determines whether the given path represents the toor path.
|
default Set<String> |
keySet(Object aPath) |
Same as
Keys.keySet() with the difference, that only the paths are
contained belonging to the given path, excluding the given path. |
default Set<String> |
keySet(Object... aPathElements) |
Same as
Keys.keySet() with the difference, that only the paths are
contained belonging to the given path, excluding the given path. |
default Set<String> |
keySet(String aPath) |
Same as
Keys.keySet() with the difference, that only the paths are
contained belonging to the given path, excluding the given path. |
default Set<String> |
keySet(String... aPathElements) |
Same as
Keys.keySet() with the difference, that only the paths are
contained belonging to the given path, excluding the given path. |
default Set<String> |
keySet(Collection<?> aPathElements) |
Same as
Keys.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 of
getArrayIndexes() . |
default int |
lastArrayIndex(Object aPath) |
Returns the last index as of
getArrayIndexes(String) . |
default int |
lastArrayIndex(Object... aPathElements) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(String[]) . |
default int |
lastArrayIndex(String aPath) |
Returns the last index as of
getArrayIndexes(String) . |
default int |
lastArrayIndex(String... aPathElements) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(String[]) . |
default int |
lastArrayIndex(Collection<?> aPathElements) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(Collection) . |
default int |
lastDirIndex() |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
lastDirIndex(Object aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
lastDirIndex(Object... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
lastDirIndex(String aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
lastDirIndex(String... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
lastDirIndex(Collection<?> aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default Set<String> |
leaves() |
Applies the
leaves(String) method for the root path "/". |
default Set<String> |
leaves(Object aPath) |
Retrieves the leaves names below the given path excluding any entries
representing directories.
|
default Set<String> |
leaves(Object... aPathElements) |
Retrieves the leaves names below the given path elements excluding any
entries representing directories.
|
default Set<String> |
leaves(String aPath) |
Retrieves the leaves names below the given path excluding any entries
representing directories.
|
default Set<String> |
leaves(String... aPathElements) |
Retrieves the leaves names below the given path elements excluding any
entries representing directories.
|
default Set<String> |
leaves(Collection<?> aPathElements) |
Retrieves the leaves names below the given path elements excluding any
entries representing directories.
|
default int |
nextArrayIndex() |
Returns the next index to be used (and not used yet) as of
getArrayIndexes() . |
default int |
nextArrayIndex(Object aPath) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(String) . |
default int |
nextArrayIndex(Object... aPathElements) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(String...) . |
default int |
nextArrayIndex(String aPath) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(String) . |
default int |
nextArrayIndex(String... aPathElements) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(String...) . |
default int |
nextArrayIndex(Collection<?> aPathElements) |
Returns the next index to be used (and not used yet) as of
getArrayIndexes(Collection) . |
default int |
nextDirIndex() |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
nextDirIndex(Object aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
nextDirIndex(Object... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
nextDirIndex(String aPath) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
nextDirIndex(String... aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default int |
nextDirIndex(Collection<?> aPathElements) |
An indexed directory represents all elements which begin with a path
which's last path element represents an index.
|
default Set<String> |
paths() |
Same as
Keys.keySet() with according semantics in the method name. |
default Set<String> |
paths(Object aPath) |
Same as
keySet(String) with according semantics in the method
name. |
default Set<String> |
paths(Object... aPathElements) |
Same as
keySet(String) with according semantics in the method
name. |
default Set<String> |
paths(String aPath) |
Same as
keySet(String) with according semantics in the method
name. |
default Set<String> |
paths(String... aPathElements) |
Same as
keySet(String) with according semantics in the method
name. |
default Set<String> |
paths(Collection<?> aPathElements) |
Same as
keySet(String) with according semantics in the method
name. |
default PathMap<T> |
query(Object... aQueryElements) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
query(String aPathQuery) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
query(String... aQueryElements) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
query(Collection<?> aQueryElements) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
query(Pattern aRegExp) |
Queries the keys of the instance using a regular expression as of the
provided
Pattern instance. |
default PathMap<T> |
queryBetween(Object[] aFromPath,
Object[] aPathQuery,
Object[] aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryBetween(Object aFromPath,
Object aPathQuery,
Object aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryBetween(String[] aFromPath,
String[] aPathQuery,
String[] aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryBetween(String aFromPath,
String aPathQuery,
String aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryBetween(String aFromPath,
Pattern aRegExp,
String aToPath) |
Queries the keys of the instance using a regular expression as of the
provided
Pattern . |
default PathMap<T> |
queryBetween(Collection<?> aFromPath,
Collection<?> aPathQuery,
Collection<?> aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryFrom(Object[] aPathQuery,
Object[] aFromPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryFrom(Object aPathQuery,
Object aFromPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryFrom(String[] aPathQuery,
String[] aFromPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryFrom(String aPathQuery,
String aFromPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryFrom(Collection<?> aPathQuery,
Collection<?> aFromPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryFrom(Pattern aRegExp,
String aFromPath) |
Queries the keys of the instance using a regular expression as of the
provided
Pattern . |
default Set<String> |
queryPaths(Object aPathQuery) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default Set<String> |
queryPaths(Object... aPathQuery) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default Set<String> |
queryPaths(String aPathQuery) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default Set<String> |
queryPaths(String... aPathQuery) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default Set<String> |
queryPaths(Collection<?> aPathQuery) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default Set<String> |
queryPaths(Pattern aRegExp) |
Queries the keys of the instance using a regular expression as of the
provided
Pattern . |
default PathMap<T> |
queryTo(Object[] aPathQuery,
String aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryTo(Object aPathQuery,
String aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryTo(String[] aPathQuery,
String aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryTo(String aPathQuery,
String aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryTo(Collection<?> aPathQuery,
String aToPath) |
Queries the keys of the instance using the
PathMatcher ' matching
patterns, similar to the wildcards '*', '?' |
default PathMap<T> |
queryTo(Pattern aRegExp,
String aToPath) |
Queries the keys of the instance using a regular expression as of the
provided
Pattern . |
default PathMap<T> |
retrieveBetween(Object[] aFromPath,
Object[] aToPath) |
|
default PathMap<T> |
retrieveBetween(Object aFromPath,
Object aToPath) |
|
default PathMap<T> |
retrieveBetween(String[] aFromPath,
String[] aToPath) |
|
default PathMap<T> |
retrieveBetween(String aFromPath,
String aToPath) |
|
default PathMap<T> |
retrieveBetween(Collection<?> aFromPath,
Collection<?> aToPath) |
|
default PathMap<T> |
retrieveFrom(Object aParentPath) |
Gets the children elements of the provided parent's path, excluding the
parent's path.
|
default PathMap<T> |
retrieveFrom(Object... aPathElements) |
Gets the children elements of the provided parent's path elements,
excluding the parent's path.
|
PathMap<T> |
retrieveFrom(String aFromPath) |
|
default PathMap<T> |
retrieveFrom(String... aPathElements) |
Gets the children elements of the provided parent's path elements,
excluding the parent's path.
|
default PathMap<T> |
retrieveFrom(Collection<?> aPathElements) |
Gets the children elements of the provided parent's path elements,
excluding the parent's path.
|
default PathMap<T> |
retrieveTo(Object aToPath) |
|
default PathMap<T> |
retrieveTo(Object... aToPathElements) |
|
PathMap<T> |
retrieveTo(String aToPath) |
|
default PathMap<T> |
retrieveTo(String... aToPathElements) |
|
default PathMap<T> |
retrieveTo(Collection<?> aToPathElements) |
|
default List<String> |
sortedKeys() |
Retrieves an alphabetically sorted list containing all the keys found in
the elements of this collection.
|
default List<String> |
sortedKeys(Object aPath) |
Retrieves an alphabetically sorted list containing the keys found below
the given path of this collection.
|
default List<String> |
sortedKeys(Object... aPathElements) |
Retrieves an alphabetically sorted list containing the keys found below
the given path of this collection.
|
default List<String> |
sortedKeys(String aPath) |
Retrieves an alphabetically sorted list containing the keys found below
the given path of this collection.
|
default List<String> |
sortedKeys(String... aPathElements) |
Retrieves an alphabetically sorted list containing the keys found below
the given path of this collection.
|
default List<String> |
sortedKeys(Collection<?> aPathElements) |
Retrieves an alphabetically sorted list containing the keys found below
the given path of this collection.
|
default List<String> |
sortedKeys(Comparator<String> aComparator) |
Retrieves a sorted list as of the provided
Comparator containing
all the keys found in the elements of this collection. |
default List<String> |
sortedKeys(Comparator<String> aComparator,
Object aPath) |
Retrieves a sorted list as of the provided
Comparator containing
all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(Comparator<String> aComparator,
Object... aPathElements) |
Retrieves a sorted list as of the provided
Comparator containing
all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(Comparator<String> aComparator,
String aPath) |
Retrieves a sorted list as of the provided
Comparator containing
all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(Comparator<String> aComparator,
String... aPathElements) |
Retrieves a sorted list as of the provided
Comparator containing
all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(Comparator<String> aComparator,
Collection<?> aPathElements) |
Retrieves a sorted list as of the provided
Comparator containing
all the keys found in the elements of this collection. |
default List<String> |
sortedKeys(PathSortStrategy aPathSortStrategy) |
Retrieves a sorted list as of the provided
PathSortStrategy
containing all the keys found in the elements of this collection. |
default List<String> |
sortedKeys(PathSortStrategy aPathSortStrategy,
Object aPath) |
Retrieves a sorted list as of the provided
PathSortStrategy
containing all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(PathSortStrategy aPathSortStrategy,
Object... aPathElements) |
Retrieves a sorted list as of the provided
PathSortStrategy
containing all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(PathSortStrategy aPathSortStrategy,
String aPath) |
Retrieves a sorted list as of the provided
PathSortStrategy
containing all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(PathSortStrategy aPathSortStrategy,
String... aPathElements) |
Retrieves a sorted list as of the provided
PathSortStrategy
containing all the keys found below the given path of this collection. |
default List<String> |
sortedKeys(PathSortStrategy aPathSortStrategy,
Collection<?> aPathElements) |
Retrieves a sorted list as of the provided
PathSortStrategy
containing all the keys found below the given path of this collection. |
default Object |
toDataStructure() |
Applies the
toDataStructure(String) method for the root path
"/". |
Object |
toDataStructure(String aFromPath) |
Similar to the
toMap(String) method, though in case all the keys
of a nested Map instance (applicable to the root Map as
well) represent an array (as of getArray( String) ), then an
array is generated where the index of each value in the Map is
represented by the number representation of the Map 's key for
that value. |
default String |
toExternalPath(String aPath,
char aDelimiter) |
Converts the given key (path) to an external key by converting the
default delimiter
DelimiterAccessor.getDelimiter() to the provided delimiter. |
default <TYPE> void |
toInstance(String aFromPath,
TYPE aInstance) |
Updates the instance with this
PathMap 's data. |
default <TYPE> void |
toInstance(TYPE aInstance) |
Updates the instance with this
PathMap 's data. |
default String |
toLeaf(String aPath) |
Returns the last path element from the given path.
|
default Map<String,?> |
toMap() |
Applies the
toMap(String) method for the root path "/". |
default Map<String,?> |
toMap(String aFromPath) |
|
default String |
toNormalizedPath(String aPath) |
Normalizes a path for it to start with the delimiter (as of
DelimiterAccessor.getDelimiter() ) and for it not to end with a delimiter. |
default String |
toParentPath(String aPath) |
Returns the path representing the parent path for the given path.
|
default String |
toPath(Object... aPathElements) |
|
default String |
toPath(String... aPathElements) |
Creates a normalized path from the provided path elements by
concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter() in between and taking care to avoid duplicate
path delimiters. |
default String |
toPath(Collection<?> aPathElements) |
|
default String[] |
toPathElements(String aPath) |
Retrieves the path's elements separated from each other by the path
delimiter
DelimiterAccessor.getDelimiter() . |
default List<String> |
toPathList(String aPath) |
Retrieves a mutable
List with the path's elements separated from
each other by the path delimiter DelimiterAccessor.getDelimiter() . |
default Stack<String> |
toPathStack(String aPath) |
|
default String |
toPropertyPath(String aPath) |
Converts the properties for saving; that when saved, them properties will
not start with a delimiter, making them (when there are no sub-paths for
the properties) look just like normal well known properties, enabling
interchangeability with other systems reading the properties.
|
default <TYPE> TYPE |
toType(Class<TYPE> aType) |
Creates an instance of the given type filled with this
PathMap 's
data. |
default <TYPE> TYPE |
toType(String aFromPath,
Class<TYPE> aType) |
Creates an instance of the given type filled with this
PathMap 's
data. |
isEmpty, size
containsKey, containsValue, get, getOr, keySet, use, values
default Set<String> children()
PathMap
and we call leaves()
, then the resulting
Set
will contain the values "dog" and "cat".PathMap
.default Set<String> children(Collection<?> aPathElements)
PathMap
:
children(String)
with "/animals", then the
resulting Set
will just contain "dogs" and "loki"; calling "/"
will retrieve "animals" and "machines".aPathElements
- The path elements from which to start retrieving the
children.PathMap
.default Set<String> children(Object aPath)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs" and "loki"; calling "/" will
retrieve "animals" and "machines".aPath
- The path from which to start retrieving the children.PathMap
.default Set<String> children(Object... aPathElements)
PathMap
:
children(String)
with "/animals", then the
resulting Set
will just contain "dogs" and "loki"; calling "/"
will retrieve "animals" and "machines".aPathElements
- The path elements from which to start retrieving the
children.PathMap
.default Set<String> children(String aPath)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs" and "loki"; calling "/" will
retrieve "animals" and "machines".aPath
- The path from which to start retrieving the children.PathMap
.default Set<String> children(String... aPathElements)
PathMap
:
children(String)
with "/animals", then the
resulting Set
will just contain "dogs" and "loki"; calling "/"
will retrieve "animals" and "machines".aPathElements
- The path elements from which to start retrieving the
children.PathMap
.default boolean containsKey(Collection<?> aPathElements)
Keys.containsKey(Object)
.aPathElements
- The path elements of the path representing the key.default boolean containsKey(Object... aPathElements)
Keys.containsKey(Object)
.aPathElements
- The path elements of the path representing the key.default boolean containsKey(String... aPathElements)
Keys.containsKey(Object)
.aPathElements
- The path elements of the path representing the key.default Set<String> dirs()
dirs(String)
method for the root path "/".dirs(String)
applied to the root path.dirs(String)
default Set<String> dirs(Collection<?> aPathElements)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs"; calling "/" will retrieve "animals"
and "machines".aPathElements
- The path elements from which to start retrieving the
directories.PathMap
.default Set<String> dirs(Object aPath)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs"; calling "/" will retrieve "animals"
and "machines".aPath
- The path from which to start retrieving the directories.PathMap
.default Set<String> dirs(Object... aPathElements)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs"; calling "/" will retrieve "animals"
and "machines".aPathElements
- The path elements from which to start retrieving the
directories.PathMap
.default Set<String> dirs(String aPath)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs"; calling "/" will retrieve "animals"
and "machines".aPath
- The path from which to start retrieving the directories.PathMap
.default Set<String> dirs(String... aPathElements)
PathMap
:
dirs(String)
with "/animals", then the resulting
Set
will just contain "dogs"; calling "/" will retrieve "animals"
and "machines".aPathElements
- The path elements from which to start retrieving the
directories.PathMap
.default Set<String> findPaths(T aValue)
aValue
- The value for which to seek the paths.default String fromExternalPath(String aPath, char... aDelimiters)
DelimiterAccessor.getDelimiter()
for the path delimiter and converts those to the
default delimiter.aPath
- The key which's delimiters are to be converted to the
default DelimiterAccessor.getDelimiter()
delimiter.aDelimiters
- The "external" delimiters in question.DelimiterAccessor.getDelimiter()
instead of the provided delimiters.default T get(Collection<?> aPathElements)
Keys.get(Object)
method
for the provided path elements by concatenating the elements with the
path delimiter DelimiterAccessor.getDelimiter()
in between and taking care to
avoid duplicate path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.Keys.get(Object)
applied path the path elements.Keys.get(Object)
default T get(Object... aPathElements)
Keys.get(Object)
method
for the provided path elements by first converting them to a
String
(if not being a String
already) and then
concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.Keys.get(Object)
applied path the path elements.Keys.get(Object)
default T get(String... aPathElements)
Keys.get(Object)
method
for the provided path elements by concatenating the elements with the
path delimiter DelimiterAccessor.getDelimiter()
in between and taking care to
avoid duplicate path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.Keys.get(Object)
applied path the path elements.Keys.get(Object)
default T[] getArray()
getArray(String)
method for the root path "/".getArray(String)
applied to the root path.getArray(String)
default T[] getArray(Collection<?> aPathElements)
getArray(String)
method for the provided path
elements by concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.getArray(String)
applied path the path elements.getArray(String)
default T[] getArray(Object... aPathElements)
getArray(String)
method for the provided path
elements by concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.getArray(String)
applied path the path elements.getArray(String)
default T[] getArray(String aPath)
PathMap
are reckoned to be part of an array when they belong to
the same hierarchy level and when their keys represent integer numbers.
Given the below example, the elements below "/animals/dogs" can be
represented as an array with five elements (the path is denoted at the
left hand side of the assignment ":=" operator and the value at the right
and side accordingly):
getArray(String)
for the path
"/animals/dogs" would contain {"ace", "bandit", "radar", "echo",
"snoopy"}. Calling isArray("/animals/dogs")
would return
true
whereas calling isArray("/animals")
would
return false.aPath
- the pathdefault T[] getArray(String... aPathElements)
getArray(String)
method for the provided path
elements by concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.getArray(String)
applied path the path elements.getArray(String)
default int[] getArrayIndexes()
getValueAt(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".default int[] getArrayIndexes(Collection<?> aPathElements)
getValueAt(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".aPathElements
- The elements of the path for which to get the
indexes.default int[] getArrayIndexes(Object... aPathElements)
getValueAt(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".aPathElements
- The elements of the path for which to get the
indexes.default int[] getArrayIndexes(String aPath) throws IllegalArgumentException
getValueAt(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".aPath
- The path for which to get the indexes.IllegalArgumentException
- in case the path does not point to
indexed elements.default int[] getArrayIndexes(String... aPathElements)
getValueAt(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".aPathElements
- The elements of the path for which to get the
indexes.default PathMap<T> getDirAt(Collection<?> aPathElements, int aIndex)
/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".aIndex
- The index which to use.aPathElements
- The elements of the path from which to get the
indexed elements.default PathMap<T> getDirAt(int aIndex)
/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".aIndex
- The index which to use.default PathMap<T> getDirAt(Object aPath, int aIndex)
/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".aIndex
- The index which to use.aPath
- The path from which to get the indexed elements.default PathMap<T> getDirAt(Object[] aPathElements, int aIndex)
/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".aIndex
- The index which to use.aPathElements
- The elements of the path from which to get the
indexed elements.default PathMap<T> getDirAt(String aPath, int aIndex)
/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".aIndex
- The index which to use.aPath
- The path from which to get the indexed elements.default PathMap<T> getDirAt(String[] aPathElements, int aIndex)
/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".aIndex
- The index which to use.aPathElements
- The elements of the path from which to get the
indexed elements.default int[] getDirIndexes()
getDirAt(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".default int[] getDirIndexes(Collection<?> aPathElements)
getDirAt(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".aPathElements
- The elements of the path for which to get the
indexes.default int[] getDirIndexes(Object... aPathElements)
getDirAt(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".aPathElements
- The elements of the path for which to get the
indexes.default int[] getDirIndexes(String aPath) throws IllegalArgumentException
getDirAt(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".aPath
- The path for which to get the indexes.IllegalArgumentException
- in case the path does not point to
indexed elements.default int[] getDirIndexes(String... aPathElements)
getDirAt(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".aPathElements
- The elements of the path for which to get the
indexes.default String getRootPath()
PathMap
. By default
the Root-Path consists just of the one delimiter DelimiterAccessor.getDelimiter()
character.PathMap
.default T getValueAt(Collection<?> aPathElements, int aIndex)
aPathElements
- The path elements for the path pointing to the
array.aIndex
- The index inside the array for which to get a value.default T getValueAt(int aIndex)
aIndex
- The index inside the array for which to get a value.default T getValueAt(Object aPath, int aIndex)
aPath
- The path pointing to the array.aIndex
- The index inside the array for which to get a value.default T getValueAt(Object[] aPathElements, int aIndex)
aPathElements
- The path elements for the path pointing to the
array.aIndex
- The index inside the array for which to get a value.default T getValueAt(String aPath, int aIndex)
aPath
- The path pointing to the array.aIndex
- The index inside the array for which to get a value.default T getValueAt(String[] aPathElements, int aIndex)
aPathElements
- The path elements for the path pointing to the
array.aIndex
- The index inside the array for which to get a value.default boolean hasChildren(Collection<?> aPathElements)
children(String)
.aPathElements
- The path elements for which to determine whether
them point to a entry.default boolean hasChildren(Object aPath)
children(String)
.aPath
- The path for which to determine whether it contains entries.default boolean hasChildren(Object... aPathElements)
children(String)
.aPathElements
- The path elements for which to determine whether
them point to a entry.default boolean hasChildren(String aPath)
children(String)
.aPath
- The path for which to determine whether it contains entries.default boolean hasChildren(String... aPathElements)
children(String)
.aPathElements
- The path elements for which to determine whether
them point to a entry.default boolean hasDirAt(Collection<?> aPathElements)
/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.aPathElements
- The path elements including the index which to use.default boolean hasDirAt(Collection<?> aPathElements, int aIndex)
/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.aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.default boolean hasDirAt(int aIndex)
/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.aIndex
- The index which to use.default boolean hasDirAt(Object aPath)
/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.aPath
- The path including the index which to use.default boolean hasDirAt(Object... aPathElements)
/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.aPathElements
- The path elements including the index which to use.default boolean hasDirAt(Object aPath, int aIndex)
/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.aIndex
- The index which to use.aPath
- The path for which to test.default boolean hasDirAt(Object[] aPathElements, int aIndex)
/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.aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.default boolean hasDirAt(String aPath)
/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.aPath
- The path including the index which to use.default boolean hasDirAt(String... aPathElements)
/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.aPathElements
- The path elements including the index which to use.default boolean hasDirAt(String aPath, int aIndex)
/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.aIndex
- The index which to use.aPath
- The path for which to test.default boolean hasDirAt(String[] aPathElements, int aIndex)
/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.aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.default boolean hasParentPath(String aPath)
aPath
- The path for which to test if it has the parent path.default boolean hasPath(Collection<?> aPathElements)
PathMap
. The path not
necessarily points to a leaf in terms of being a leave or a directory.
Use isChild(String)
(hasValue(String)
or
isDir(String)
) if we have a leaf.aPathElements
- The path elements addressing the path to be tested.PathMap
, else false.default boolean hasPath(Object... aPathElements)
PathMap
. The path not
necessarily points to a leaf in terms of being a leave or a directory.
Use isChild(String)
(hasValue(String)
or
isDir(String)
) if we have a leaf.aPathElements
- The path elements addressing the path to be tested.PathMap
, else false.default boolean hasPath(String aPath)
PathMap
. The path not either points to a a leaf or a directory as
of isChild(String)
. Use hasValue(String)
to explicitly
test if we have a leaf or isDir(String)
to explicitly test if we
have a directory.aPath
- The path to be tested.PathMap
, else false.default boolean hasPath(String... aPathElements)
PathMap
. The path not
necessarily points to a leaf in terms of being a leave or a directory.
Use isChild(String)
(hasValue(String)
or
isDir(String)
) if we have a leaf.aPathElements
- The path elements addressing the path to be tested.PathMap
, else false.default boolean hasValueAt(Collection<?> aPathElements, int aIndex)
/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.aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.default boolean hasValueAt(int aIndex)
/0/0aaa
/1/1aaa
For indexes 0 and 1 you will get true, for all others you will
get false.aIndex
- The index which to use.default boolean hasValueAt(Object aPath)
/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.aPath
- The path including the index for which to test.default boolean hasValueAt(Object aPath, int aIndex)
/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.aIndex
- The index which to use.aPath
- The path for which to test.default boolean hasValueAt(Object[] aPathElements, int aIndex)
/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.aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.default boolean hasValueAt(String aPath)
/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.aPath
- The path including the index for which to test.default boolean hasValueAt(String aPath, int aIndex)
/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.aIndex
- The index which to use.aPath
- The path for which to test.default boolean hasValueAt(String[] aPathElements, int aIndex)
/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.aIndex
- The index which to use.aPathElements
- The elements of the path for which to test.default boolean isArray()
isArray(String)
method for the root path "/".isArray(String)
applied to the root path.isArray(String)
default boolean isArray(String... aPathElements)
getArray(String)
if the elements below the
given path elements can be seen as an array.aPathElements
- the path elementsdefault boolean isArray(Collection<?> aPathElements)
getArray(String)
if the elements below the
given path elements can be seen as an array.aPathElements
- the path elementsdefault boolean isArray(Object aPath)
getArray(String)
if the elements below the
given path can be seen as an array.aPath
- the pathdefault boolean isArray(Object... aPathElements)
getArray(String)
if the elements below the
given path elements can be seen as an array.aPathElements
- the path elementsdefault boolean isArray(String aPath)
getArray(String)
if the elements below the
given path can be seen as an array.aPath
- the path which to test.default boolean isChild(Collection<?> aPathElements)
children(String)
.aPathElements
- The path elements for which to determine whether
them point to a entry.default boolean isChild(Object... aPathElements)
children(String)
.aPathElements
- The path elements for which to determine whether
them point to a entry.default boolean isChild(String aPath)
children(String)
.aPath
- The path for which to determine whether it points to a
entry.default boolean isChild(String... aPathElements)
children(String)
.aPathElements
- The path elements for which to determine whether
them point to a entry.default boolean isDir(Collection<?> aPathElements)
dirs(String)
.aPathElements
- The path elements for which to determine whether
them point to a directory.default boolean isDir(Object aPath)
dirs(String)
.aPath
- The path for which to determine whether it points to a
directory.default boolean isDir(Object... aPathElements)
dirs(String)
.aPathElements
- The path elements for which to determine whether
them point to a directory.default boolean isDir(String aPath)
dirs(String)
.aPath
- The path for which to determine whether it points to a
directory.default boolean isDir(String... aPathElements)
dirs(String)
.aPathElements
- The path elements for which to determine whether
them point to a directory.default boolean isLeaf(Collection<?> aPathElements)
dirs(String)
.aPathElements
- The path elements for which to determine whether
them point to a leaf.default boolean isLeaf(Object aPath)
dirs(String)
.aPath
- The path for which to determine whether it points to a leaf.default boolean isLeaf(Object... aPathElements)
dirs(String)
.aPathElements
- The path elements for which to determine whether
them point to a leaf.default boolean isLeaf(String aPath)
leaves(String)
.aPath
- The path for which to determine whether it points to a leaf.default boolean isLeaf(String... aPathElements)
dirs(String)
.aPathElements
- The path elements for which to determine whether
them point to a leaf.default boolean isIndexDir()
PathMap
. The path not
necessarily points to a leaf in terms of being a leave or a directory.
Use isChild(String)
(hasValue(String)
or
isDir(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".PathMap
, else false.default boolean isIndexDir(Collection<?> aPathElements)
PathMap
.
The path not necessarily points to a leaf in terms of being a leave or a
directory. Use isChild(String)
(hasValue(String)
or
isDir(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".aPathElements
- The elements of the path to be tested.PathMap
, else false.default boolean isIndexDir(Object... aPathElements)
PathMap
.
The path not necessarily points to a leaf in terms of being a leave or a
directory. Use isChild(String)
(hasValue(String)
or
isDir(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".aPathElements
- The elements of the path to be tested.PathMap
, else false.default boolean isIndexDir(String aPath)
PathMap
. The path not
necessarily points to a leaf in terms of being a leave or a directory.
Use isChild(String)
(hasValue(String)
or
isDir(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".aPath
- The path to be tested.PathMap
, else false.default boolean isIndexDir(String... aPathElements)
PathMap
.
The path not necessarily points to a leaf in terms of being a leave or a
directory. Use isChild(String)
(hasValue(String)
or
isDir(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".aPathElements
- The elements of the path to be tested.PathMap
, else false.default boolean isEqualTo(PathMap<?> aOther)
PathMap
contains the same paths and equal
assigned values as the provided other PathMap
. May be used for
implementing an Object.equals(Object)
method.default boolean hasSubDirs(Collection<?> aPathElements)
aPathElements
- The path elements for which to determine whether
them point to a directory containing sub-directories.default boolean hasSubDirs(Object aPath)
aPath
- The path for which to determine whether it points to a
directory containing sub-directories.default boolean hasSubDirs(Object... aPathElements)
aPathElements
- The path elements for which to determine whether
them point to a directory containing sub-directories.default boolean hasSubDirs(String aPath)
aPath
- The path for which to determine whether it points to a
directory containing sub-directories.default boolean hasValue(Collection<?> aPathElements)
leaves(String)
.aPathElements
- The path elements for which to determine whether
them points to a leave.default boolean hasValue(Object aPath)
leaves(String)
.aPath
- The path for which to determine whether it points to a
leave.default boolean hasValue(Object... aPathElements)
leaves(String)
.aPathElements
- The path elements for which to determine whether
them points to a leave.default boolean hasValue(String aPath)
leaves(String)
.aPath
- The path for which to determine whether it points to a
leave.default boolean hasValue(String... aPathElements)
leaves(String)
.aPathElements
- The path elements for which to determine whether
them points to a leave.default boolean isRootPath(String aPath)
aPath
- The path to be tested.default Set<String> keySet(String aPath)
Keys.keySet()
with the difference, that only the paths are
contained belonging to the given path, excluding the given path.aPath
- The path from which to start retrieving the paths.PathMap
.default Set<String> keySet(Collection<?> aPathElements)
Keys.keySet()
with the difference, that only the paths are
contained belonging to the given path, excluding the given path.aPathElements
- The path elements from which to start retrieving the
paths.PathMap
.default Set<String> keySet(Object aPath)
Keys.keySet()
with the difference, that only the paths are
contained belonging to the given path, excluding the given path.aPath
- The path from which to start retrieving the paths.PathMap
.default Set<String> keySet(Object... aPathElements)
Keys.keySet()
with the difference, that only the paths are
contained belonging to the given path, excluding the given path.aPathElements
- The path elements from which to start retrieving the
paths.PathMap
.default Set<String> keySet(String... aPathElements)
Keys.keySet()
with the difference, that only the paths are
contained belonging to the given path, excluding the given path.aPathElements
- The path elements from which to start retrieving the
paths.PathMap
.default int lastArrayIndex()
getArrayIndexes()
.default int lastArrayIndex(Collection<?> aPathElements)
getArrayIndexes(Collection)
.aPathElements
- The elements of the path from which to determine the
last index.default int lastArrayIndex(Object aPath)
getArrayIndexes(String)
.aPath
- The path from which to determine the last index.default int lastArrayIndex(Object... aPathElements)
getArrayIndexes(String[])
.aPathElements
- The elements of the path from which to determine the
last index.default int lastArrayIndex(String aPath)
getArrayIndexes(String)
.aPath
- The path from which to determine the last index.default int lastArrayIndex(String... aPathElements)
getArrayIndexes(String[])
.aPathElements
- The elements of the path from which to determine the
last index.default int lastDirIndex()
getDirIndexes()
.default int lastDirIndex(Collection<?> aPathElements)
getDirIndexes(Collection)
.aPathElements
- The elements of the path from which to determine the
last index.default int lastDirIndex(Object aPath)
getDirIndexes(String)
.aPath
- The path from which to determine the last index.default int lastDirIndex(Object... aPathElements)
getDirIndexes(String[])
.aPathElements
- The elements of the path from which to determine the
last index.default int lastDirIndex(String aPath)
getDirIndexes(String)
.aPath
- The path from which to determine the last index.default int lastDirIndex(String... aPathElements)
getDirIndexes(String[])
.aPathElements
- The elements of the path from which to determine the
last index.default Set<String> leaves()
leaves(String)
method for the root path "/".leaves(String)
applied to the root path.leaves(String)
default Set<String> leaves(Collection<?> aPathElements)
PathMap
:
leaves(String)
with "/animals", then the resulting
Set
will just contain "loki"; calling "/animals/dogs" will
retrieve "dilbert" and "otto".aPathElements
- The path elements from which to start retrieving the
leaves.PathMap
.default Set<String> leaves(Object aPath)
PathMap
:
leaves(String)
with "/animals", then the resulting
Set
will just contain "loki"; calling "/animals/dogs" will
retrieve "dilbert" and "otto".aPath
- The path from which to start retrieving the leaves.PathMap
.default Set<String> leaves(Object... aPathElements)
PathMap
:
leaves(String)
with "/animals", then the resulting
Set
will just contain "loki"; calling "/animals/dogs" will
retrieve "dilbert" and "otto".aPathElements
- The path elements from which to start retrieving the
leaves.PathMap
.default Set<String> leaves(String aPath)
PathMap
:
leaves(String)
with "/animals", then the resulting
Set
will just contain "loki"; calling "/animals/dogs" will
retrieve "dilbert" and "otto".aPath
- The path from which to start retrieving the leaves.PathMap
.default Set<String> leaves(String... aPathElements)
PathMap
:
leaves(String)
with "/animals", then the resulting
Set
will just contain "loki"; calling "/animals/dogs" will
retrieve "dilbert" and "otto".aPathElements
- The path elements from which to start retrieving the
leaves.PathMap
.default int nextArrayIndex()
getArrayIndexes()
.default int nextArrayIndex(Collection<?> aPathElements)
getArrayIndexes(Collection)
.aPathElements
- The elements of the path from which to determine the
next index to be used (and not used yet).default int nextArrayIndex(Object aPath)
getArrayIndexes(String)
.aPath
- The path from which to determine the next index to be used
(and not used yet).default int nextArrayIndex(Object... aPathElements)
getArrayIndexes(String...)
.aPathElements
- The elements of the path from which to determine the
next index to be used (and not used yet).default int nextArrayIndex(String aPath)
getArrayIndexes(String)
.aPath
- The path from which to determine the next index to be used
(and not used yet).default int nextArrayIndex(String... aPathElements)
getArrayIndexes(String...)
.aPathElements
- The elements of the path from which to determine the
next index to be used (and not used yet).default int nextDirIndex()
getDirIndexes()
.default int nextDirIndex(Collection<?> aPathElements)
getDirIndexes(Collection)
.aPathElements
- The elements of the path from which to determine the
next index to be used (and not used yet).default int nextDirIndex(Object aPath)
getDirIndexes(String)
.aPath
- The path from which to determine the next index to be used
(and not used yet).default int nextDirIndex(Object... aPathElements)
getDirIndexes(String...)
.aPathElements
- The elements of the path from which to determine the
next index to be used (and not used yet).default int nextDirIndex(String aPath)
getDirIndexes(String)
.aPath
- The path from which to determine the next index to be used
(and not used yet).default int nextDirIndex(String... aPathElements)
getDirIndexes(String...)
.aPathElements
- The elements of the path from which to determine the
next index to be used (and not used yet).default Set<String> paths()
Keys.keySet()
with according semantics in the method name.default Set<String> paths(Collection<?> aPathElements)
keySet(String)
with according semantics in the method
name.aPathElements
- The path elements from which to start seeking.default Set<String> paths(Object aPath)
keySet(String)
with according semantics in the method
name.aPath
- The path from which to start seeking.default Set<String> paths(Object... aPathElements)
keySet(String)
with according semantics in the method
name.aPathElements
- The path elements from which to start seeking.default Set<String> paths(String aPath)
keySet(String)
with according semantics in the method
name.aPath
- The path from which to start seeking.default Set<String> paths(String... aPathElements)
keySet(String)
with according semantics in the method
name.aPathElements
- The path elements from which to start seeking.default PathMap<T> query(Collection<?> aQueryElements)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aQueryElements
- The elements representing the path query including
your wildcards.default PathMap<T> query(Object... aQueryElements)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aQueryElements
- The elements representing the path query including
your wildcards.default PathMap<T> query(Pattern aRegExp)
Pattern
instance.aRegExp
- The regular expression to be used for the query.default PathMap<T> query(String aPathQuery)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.default PathMap<T> query(String... aQueryElements)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aQueryElements
- The elements representing the path query including
your wildcards.default PathMap<T> queryBetween(Collection<?> aFromPath, Collection<?> aPathQuery, Collection<?> aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.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.default PathMap<T> queryBetween(Object aFromPath, Object aPathQuery, Object aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.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.default PathMap<T> queryBetween(Object[] aFromPath, Object[] aPathQuery, Object[] aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.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.default PathMap<T> queryBetween(String aFromPath, Pattern aRegExp, String aToPath)
Pattern
.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.default PathMap<T> queryBetween(String aFromPath, String aPathQuery, String aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.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.default PathMap<T> queryBetween(String[] aFromPath, String[] aPathQuery, String[] aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.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.default PathMap<T> queryFrom(Collection<?> aPathQuery, Collection<?> aFromPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the
paths.default PathMap<T> queryFrom(Object aPathQuery, Object aFromPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the
paths.default PathMap<T> queryFrom(Object[] aPathQuery, Object[] aFromPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the
paths.default PathMap<T> queryFrom(Pattern aRegExp, String aFromPath)
Pattern
.aRegExp
- The regular expression to be used for the query.aFromPath
- The path from where to start querying and extracting the
paths.default PathMap<T> queryFrom(String aPathQuery, String aFromPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the
paths.default PathMap<T> queryFrom(String[] aPathQuery, String[] aFromPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aFromPath
- The path from where to start querying and extracting the
paths.default Set<String> queryPaths(Collection<?> aPathQuery)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.default Set<String> queryPaths(Object aPathQuery)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.default Set<String> queryPaths(Object... aPathQuery)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.default Set<String> queryPaths(Pattern aRegExp)
Pattern
.aRegExp
- The regular expression to be used for the query.default Set<String> queryPaths(String... aPathQuery)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.default Set<String> queryPaths(String aPathQuery)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.default PathMap<T> queryTo(Collection<?> aPathQuery, String aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.default PathMap<T> queryTo(Object aPathQuery, String aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.default PathMap<T> queryTo(Object[] aPathQuery, String aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.default PathMap<T> queryTo(Pattern aRegExp, String aToPath)
Pattern
.aRegExp
- The regular expression to be used for the query.aToPath
- The path where to relocate the result to.default PathMap<T> queryTo(String aPathQuery, String aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.default PathMap<T> queryTo(String[] aPathQuery, String aToPath)
PathMatcher
' matching
patterns, similar to the wildcards '*', '?' and '**' known when querying
folders of a filesystem: The PathMatcher
applies the following
rules from the ANT path pattern to the query provided: A single asterisk
("*" as of Wildcard.FILE
) matches zero or more characters within
a path name. A double asterisk ("**" as of Wildcard.PATH
) matches
zero or more characters across directory levels. A question mark ("?" as
of Wildcard.CHAR
) matches exactly one character within a path
name. The single asterisk ("*" as of Wildcard.FILE
), the double
asterisk ("**" as of Wildcard.PATH
) and the question mark ("?" as
of Wildcard.CHAR
) we refer to as wildcards.aPathQuery
- The path query including your wildcards.aToPath
- The path where to relocate the result to.default PathMap<T> retrieveBetween(Collection<?> aFromPath, Collection<?> aToPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be relocated to the
provided "to-path".aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.PathMap
with the elements below the provided path
"from-path" relocated to the given "to-path".default PathMap<T> retrieveBetween(Object aFromPath, Object aToPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be relocated to the
provided "to-path".aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.PathMap
with the elements below the provided path
"from-path" relocated to the given "to-path".default PathMap<T> retrieveBetween(Object[] aFromPath, Object[] aToPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be relocated to the
provided "to-path".aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.PathMap
with the elements below the provided path
"from-path" relocated to the given "to-path".default PathMap<T> retrieveBetween(String aFromPath, String aToPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be relocated to the
provided "to-path".aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.PathMap
with the elements below the provided path
"from-path" relocated to the given "to-path".default PathMap<T> retrieveBetween(String[] aFromPath, String[] aToPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be relocated to the
provided "to-path".aFromPath
- The path from where to start extracting the paths.aToPath
- The path where to relocate the extracted paths to.PathMap
with the elements below the provided path
"from-path" relocated to the given "to-path".default PathMap<T> retrieveFrom(Collection<?> aPathElements)
aPathElements
- The path elements from where to retrieve the
children.default PathMap<T> retrieveFrom(Object aParentPath)
aParentPath
- The path from where to retrieve the children.default PathMap<T> retrieveFrom(Object... aPathElements)
aPathElements
- The path elements from where to retrieve the
children.PathMap<T> retrieveFrom(String aFromPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be the root paths for the
new PathMap
. Given we have a value for path "/dog/cat" in the
PathMap
and we call retrieveFrom(String)
with "/dog",
then the resulting PathMap
will contain the path "/cat" for that
value.default PathMap<T> retrieveFrom(String... aPathElements)
aPathElements
- The path elements from where to retrieve the
children.default PathMap<T> getDir(Collection<?> aPathElements)
aPathElements
- The path elements from where to retrieve the
children.default PathMap<T> getDir(Object aPath)
aPath
- The path from where to retrieve the children.default PathMap<T> getDir(Object... aPathElements)
aPathElements
- The path elements from where to retrieve the
children.default PathMap<T> getDir(String aPath)
PathMap
from the elements of this PathMap
found below the "from-path". The sub-paths will be the root paths for the
new PathMap
. Given we have a value for path "/dog/cat" in the
PathMap
and we call getDir(String)
with "/dog", then the
resulting PathMap
will contain the path "/cat" for that value.default PathMap<T> getDir(String... aPathElements)
aPathElements
- The path elements from where to retrieve the
children.default PathMap<T> retrieveTo(Collection<?> aToPathElements)
PathMap
from this PathMap
's elements with
the paths relocated to the provided "to-path". Given we have a value for
path "/dog/cat" in the PathMap
and we call
retrieveTo(String)
with "/animals", then the resulting
PathMap
will contain the path "/animals/dog/cat" for that value.default PathMap<T> retrieveTo(Object aToPath)
PathMap
from this PathMap
's elements with
the paths relocated to the provided "to-path". Given we have a value for
path "/dog/cat" in the PathMap
and we call
retrieveTo(String)
with "/animals", then the resulting
PathMap
will contain the path "/animals/dog/cat" for that value.default PathMap<T> retrieveTo(Object... aToPathElements)
PathMap
from this PathMap
's elements with
the paths relocated to the provided "to-path". Given we have a value for
path "/dog/cat" in the PathMap
and we call
retrieveTo(String)
with "/animals", then the resulting
PathMap
will contain the path "/animals/dog/cat" for that value.PathMap<T> retrieveTo(String aToPath)
PathMap
from this PathMap
's elements with
the paths relocated to the provided "to-path". Given we have a value for
path "/dog/cat" in the PathMap
and we call
retrieveTo(String)
with "/animals", then the resulting
PathMap
will contain the path "/animals/dog/cat" for that value.default PathMap<T> retrieveTo(String... aToPathElements)
PathMap
from this PathMap
's elements with
the paths relocated to the provided "to-path". Given we have a value for
path "/dog/cat" in the PathMap
and we call
retrieveTo(String)
with "/animals", then the resulting
PathMap
will contain the path "/animals/dog/cat" for that value.default List<String> sortedKeys()
Keys.keySet()
using the PathSortStrategy.DEFAULT
sorting strategy.default List<String> sortedKeys(Collection<?> aPathElements)
keySet(String)
using the
PathSortStrategy.DEFAULT
sorting strategy.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(Object aPath)
keySet(String)
using the
PathSortStrategy.DEFAULT
sorting strategy.aPath
- The path from which to start retrieving the paths.default List<String> sortedKeys(Object... aPathElements)
keySet(String)
using the
PathSortStrategy.DEFAULT
sorting strategy.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(String... aPathElements)
keySet(String)
using the
PathSortStrategy.DEFAULT
sorting strategy.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(String aPath)
keySet(String)
using the
PathSortStrategy.DEFAULT
sorting strategy.aPath
- The path from which to start retrieving the paths.default List<String> sortedKeys(PathSortStrategy aPathSortStrategy)
PathSortStrategy
containing all the keys found in the elements of this collection.aPathSortStrategy
- The sorting strategy to be used when sorting the
Keys.keySet()
.default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, Collection<?> aPathElements)
PathSortStrategy
containing all the keys found below the given path of this collection.aPathSortStrategy
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, Object aPath)
PathSortStrategy
containing all the keys found below the given path of this collection.aPathSortStrategy
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPath
- The path from which to start retrieving the paths.default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, Object... aPathElements)
PathSortStrategy
containing all the keys found below the given path of this collection.aPathSortStrategy
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, String... aPathElements)
PathSortStrategy
containing all the keys found below the given path of this collection.aPathSortStrategy
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(PathSortStrategy aPathSortStrategy, String aPath)
PathSortStrategy
containing all the keys found below the given path of this collection.aPathSortStrategy
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPath
- The path from which to start retrieving the paths.default List<String> sortedKeys(Comparator<String> aComparator)
Comparator
containing
all the keys found in the elements of this collection.aComparator
- The Comparator
to be used when sorting the
Keys.keySet()
.default List<String> sortedKeys(Comparator<String> aComparator, Collection<?> aPathElements)
Comparator
containing
all the keys found in the elements of this collection.aComparator
- The Comparator
to be used when sorting the
Keys.keySet()
.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(Comparator<String> aComparator, Object aPath)
Comparator
containing
all the keys found below the given path of this collection.aComparator
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPath
- The path from which to start retrieving the paths.default List<String> sortedKeys(Comparator<String> aComparator, Object... aPathElements)
Comparator
containing
all the keys found below the given path of this collection.aComparator
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(Comparator<String> aComparator, String... aPathElements)
Comparator
containing
all the keys found below the given path of this collection.aComparator
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPathElements
- The path elements from which to start retrieving the
paths.default List<String> sortedKeys(Comparator<String> aComparator, String aPath)
Comparator
containing
all the keys found below the given path of this collection.aComparator
- The sorting strategy to be used when sorting the
Keys.keySet()
.aPath
- The path from which to start retrieving the paths.default Object toDataStructure()
toDataStructure(String)
method for the root path
"/".toDataStructure(String)
applied to the root path.toDataStructure(String)
Object toDataStructure(String aFromPath)
toMap(String)
method, though in case all the keys
of a nested Map
instance (applicable to the root Map
as
well) represent an array (as of getArray( String)
), then an
array is generated where the index of each value in the Map
is
represented by the number representation of the Map
's key for
that value. The result is a data structure consisting of Map
instances and arrays.default String toExternalPath(String aPath, char aDelimiter)
DelimiterAccessor.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.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 delimiter
DelimiterAccessor.getDelimiter()
.default <TYPE> void toInstance(String aFromPath, TYPE aInstance)
PathMap
's data. Instances inside
the instance may not be updated!TYPE
- the generic type if which to create an instance.aFromPath
- The path representing the root from which to take the
data for the instance.aInstance
- The instance to be updated with the herein contained
data.default <TYPE> void toInstance(TYPE aInstance)
PathMap
's data. Instances inside
the instance may not be updated!TYPE
- the generic type if which to create an instance.aInstance
- The instance to be updated with the herein contained
data.default String toLeaf(String aPath)
aPath
- The path for which to get the last path element.default Map<String,?> toMap() throws IllegalStateException
toMap(String)
method for the root path "/".toMap(String)
applied to the root path.IllegalStateException
- the illegal state exceptiondefault Map<String,?> toMap(String aFromPath) throws IllegalStateException
Map
structure from the PathMap
'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 a Map
contained in the preceeding's path element.aFromPath
- The path from which to start retrieving the sub-paths
which will be the root directories in the returned Map
PathMap
starting from
the given path.IllegalStateException
- in case the PathMap
contains a path
which points to a value and which is also part of other paths.
Such a state cannot be represented by a nested Map
structure as the element would represent a leaf and a node at the
same time.default String toNormalizedPath(String aPath)
DelimiterAccessor.getDelimiter()
) and for it not to end with a delimiter. This
implementation will return in empty String
in case the path is an
empty String
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 empty String
aPath
- The path to be normalized.String
or just the delimiter itself) it starts with
a delimiter and does not end with a delimiter.default String toParentPath(String aPath)
aPath
- The path for which to get the parent's path.IllegalArgumentException
- thrown in case there is no such parent
path for the given path; test beforehand using
hasParentPath(String)
.default String toPath(Collection<?> aPathElements)
String
(if not being a String
already) and then concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.default String toPath(Object... aPathElements)
String
(if not being a String
already) and then concatenating the elements with the path delimiter
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.default String toPath(String... aPathElements)
DelimiterAccessor.getDelimiter()
in between and taking care to avoid duplicate
path delimiters.aPathElements
- The elements of the path to be concatenated with the
path delimiter.default String[] toPathElements(String aPath)
DelimiterAccessor.getDelimiter()
.aPath
- The path from which to retrieve the elements.default List<String> toPathList(String aPath)
List
with the path's elements separated from
each other by the path delimiter DelimiterAccessor.getDelimiter()
.default String toPropertyPath(String aPath)
aPath
- The path to be normalized.default <TYPE> TYPE toType(Class<TYPE> aType)
PathMap
's
data.TYPE
- the generic type if which to create an instance.aType
- the type if the instance to be filled with the herein
contained data.default <TYPE> TYPE toType(String aFromPath, Class<TYPE> aType)
PathMap
's
data.TYPE
- the generic type if which to create an instance.aFromPath
- The path representing the root from which to take the
data for the instance.aType
- the type if the instance to be filled with the herein
contained data.Copyright © 2021. All rights reserved.