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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(@NotNull Collection<? extends ItemPath> c) void
clear()
boolean
boolean
containsAll
(@NotNull Collection<?> c) boolean
containsRelated
(@NotNull ItemPath path) Returns `true` it the set (at least partially) covers given item.boolean
containsSubpathOrEquivalent
(@NotNull ItemPath path) static PathSet
empty()
Returns immutable empty path set.@NotNull NameKeyedMap<ItemName,
PathSet> factor()
Factors the path set on the first segment of the paths.boolean
isEmpty()
iterator()
static @NotNull PathSet
Returns immutablePathSet
.protected void
@NotNull PathSet
Strips the prefix from a set of paths.boolean
boolean
removeAll
(@NotNull Collection<?> c) boolean
retainAll
(@NotNull Collection<?> c) int
size()
@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, isMutable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
Methods 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:
containsAll
in interfaceCollection<ItemPath>
- Specified by:
containsAll
in 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:
performFreeze
in classAbstractFreezable
-
containsRelated
Returns `true` it the set (at least partially) covers given item.
-