Package com.evolveum.midpoint.prism.path
Class ItemPathCollectionsUtil
java.lang.Object
com.evolveum.midpoint.prism.path.ItemPathCollectionsUtil
Methods that operate on path collections.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ItemPath[]asPathArray(QName... names) static UniformItemPath[]asUniformPathArray(PrismContext prismContext, QName... names) static booleancontainsEquivalent(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a path equivalent to `pathToBeFound`.static booleancontainsRelated(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a path related to (overlapping) the given one.static booleancontainsSubpath(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a sub-path (prefix) of the given path.static booleancontainsSubpathOrEquivalent(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a subpath of or equivalent path to the given path.static booleancontainsSuperpath(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a superpath of the given path.static booleancontainsSuperpathOrEquivalent(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a superpath of or equivalent path to the given path.static <T> TgetFromMap(Map<ItemPath, T> map, ItemPath itemPath) static <T> TgetFromMap(Map<UniformItemPath, T> map, UniformItemPath itemPath) pathListFromStrings(List<String> pathsAsStrings, PrismContext prismContext) static <T> voidputAllToMap(Map<UniformItemPath, T> target, Map<UniformItemPath, T> source) static <T> TputToMap(Map<UniformItemPath, T> map, UniformItemPath itemPath, T value) remainder(Collection<? extends ItemPath> paths, ItemPath prefix, boolean alsoEquivalent) Strips the prefix from a set of paths.
- 
Constructor Details- 
ItemPathCollectionsUtilpublic ItemPathCollectionsUtil()
 
- 
- 
Method Details- 
containsEquivalentpublic static boolean containsEquivalent(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a path equivalent to `pathToBeFound`.
- 
containsSubpathReturns true if the collection contains a sub-path (prefix) of the given path. I.e. having collection = { `A/B`, `A/C` } then the method for this collection and `path` returns: - `path` = `A/B` -> `false` - `path` = `A` -> `false` - `path` = `A/B/C` -> `true` as `A/B` is a sub-path (prefix) for `A/B/C` - `path` = `X` -> `false`
- 
containsSuperpathOrEquivalentpublic static boolean containsSuperpathOrEquivalent(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a superpath of or equivalent path to the given path. I.e. having collection = { A/B, A/C } then the method for this collection and 'pathToBeFound' returns: - pathToBeFound = A/B -> true - pathToBeFound = A -> true - pathToBeFound = A/B/C -> false - pathToBeFound = X -> false
- 
containsSuperpathpublic static boolean containsSuperpath(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a superpath of the given path. I.e. having collection = { A/B, A/C } then the method for this collection and 'path' returns: - path = A/B -> false - path = A -> true - path = A/B/C -> false - path = X -> false
- 
containsSubpathOrEquivalentpublic static boolean containsSubpathOrEquivalent(Collection<? extends ItemPath> paths, ItemPath pathToBeFound) Returns true if the collection contains a subpath of or equivalent path to the given path. I.e. having collection = { A/B, A/C } then the method for this collection and 'path' returns: - path = A/B -> true - path = A -> false - path = A/B/C -> true - path = X -> false
- 
containsRelatedReturns true if the collection contains a path related to (overlapping) the given one. By related-to/overlapping we mean that the set covers the given path either fully (i.e. it contains an equivalent path or a sub-path), or partially (i.e. it contains a super-path). I.e. having collection = { `A/B`, `A/C` } then the method for this collection and `path` returns: - `path` = `A/B` -> `true` - `path` = `A` -> `true` - `path` = `A/B/C` -> `true` - `path` = `X` -> `false`
- 
remainderpublic static List<ItemPath> remainder(Collection<? extends ItemPath> paths, ItemPath prefix, boolean alsoEquivalent) Strips the prefix from a set of paths.- Parameters:
- alsoEquivalent- If true, 'prefix' in paths is processed as well (resulting in empty path). Otherwise, it is skipped.
 
- 
pathListFromStrings@NotNull public static @NotNull List<ItemPath> pathListFromStrings(List<String> pathsAsStrings, PrismContext prismContext) 
- 
asPathArray
- 
asUniformPathArray
- 
putToMap
- 
putAllToMap
- 
getFromMap
- 
getFromMap
 
-