Modifier and Type | Method | Description |
---|---|---|
static <T> void |
retrieveFrom(PathMap<T> aFromPathMap,
String aFromPath,
PathMap.PathMapBuilder<T> aToPathMap) |
Hook method for implementing the
PathMap.retrieveFrom(String)
method. |
static <T> void |
retrieveTo(PathMap<T> aFromPathMap,
String aToPath,
PathMap.PathMapBuilder<T> aToPathMap) |
Hook method for implementing the
PathMap.retrieveTo(String)
method. |
static Object |
toDataStructure(PathMap<?> aPathMap,
String aFromPath) |
Hook method for implementing the
PathMap.toDataStructure()
method. |
static String |
toGenericPath(PathMap<?> aPathMap,
String aPath) |
Normalizes the path as of
PathMap.toNormalizedPath(String) and
unifies it so that a path never ends with a delimiter
(DelimiterAccessor.getDelimiter() ). |
public static <T> void retrieveFrom(PathMap<T> aFromPathMap, String aFromPath, PathMap.PathMapBuilder<T> aToPathMap)
PathMap.retrieveFrom(String)
method.T
- The type of the PathMap
the functionality is to be
applied to.aFromPathMap
- The PathMap
from which to retrieve.aFromPath
- The path from where to start extracting the paths.aToPathMap
- The PathMap.PathMapBuilder
which to put the result in.public static <T> void retrieveTo(PathMap<T> aFromPathMap, String aToPath, PathMap.PathMapBuilder<T> aToPathMap)
PathMap.retrieveTo(String)
method.T
- The type of the PathMap
the functionality is to be
applied to.aFromPathMap
- The PathMap
from which to retrieve.aToPath
- The path where to relocate the paths of this
PathMap
to.aToPathMap
- The PathMap.PathMapBuilder
which to put the result in.public static Object toDataStructure(PathMap<?> aPathMap, String aFromPath)
PathMap.toDataStructure()
method.public static String toGenericPath(PathMap<?> aPathMap, String aPath)
PathMap.toNormalizedPath(String)
and
unifies it so that a path never ends with a delimiter
(DelimiterAccessor.getDelimiter()
). This is necessary as the root path is
represented just by the delimiter, meaning that it also ends with the
delimiter, though generic operations may require that a path must not end
with the delimiter. This means that the root path is an empty
String
.aPathMap
- The PathMap
for which to unify the path.aPath
- The path to be unified.Copyright © 2021. All rights reserved.