Package com.evolveum.midpoint.prism.path
Class PathSet
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.path.PathSet
- All Implemented Interfaces:
Freezable,Serializable,Iterable<ItemPath>,Collection<ItemPath>,Set<ItemPath>
A "safe" set of
ItemPath - i.e. the one where (e.g.) presence is checked using ItemPath.equivalent(ItemPath),
not Object.equals(Object) method.
Slower than standard set! Operations are evaluated in `O(n)` time.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(@NotNull Collection<? extends ItemPath> c) voidclear()booleanbooleancontainsAll(@NotNull Collection<?> c) booleancontainsRelated(@NotNull ItemPath path) Returns `true` it the set (at least partially) covers given item.booleancontainsSubpathOrEquivalent(@NotNull ItemPath path) static PathSetempty()Returns immutable empty path set.@NotNull NameKeyedMap<ItemName,PathSet> factor()Factors the path set on the first segment of the paths.booleanisEmpty()iterator()static @NotNull PathSetReturns immutablePathSet.protected void@NotNull PathSetStrips the prefix from a set of paths.booleanbooleanremoveAll(@NotNull Collection<?> c) booleanretainAll(@NotNull Collection<?> c) intsize()@NotNull Object[]toArray()<T> @NotNull T[]toArray(@NotNull T[] a) toString()Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutableMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
PathSet
public PathSet() -
PathSet
-
-
Method Details
-
empty
Returns immutable empty path set. -
of
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
containsSubpathOrEquivalent
-
iterator
-
toArray
-
toArray
@NotNull public <T> @NotNull T[] toArray(@NotNull @NotNull T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<ItemPath>- Specified by:
containsAllin interfaceSet<ItemPath>
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear() -
factor
Factors the path set on the first segment of the paths. Assumes that each of the paths begins with a name. -
remainder
Strips the prefix from a set of paths. Non-matching (unrelated) paths are ignored, i.e. _NOT_ transformed to empty path. -
toString
-
performFreeze
protected void performFreeze()- Overrides:
performFreezein classAbstractFreezable
-
containsRelated
Returns `true` it the set (at least partially) covers given item.
-