Interface DeltaSetTriple<T>
- All Superinterfaces:
DebugDumpable
,Foreachable<T>
,Serializable
,ShortDumpable
,SimpleVisitable<T>
- All Known Subinterfaces:
PrismValueDeltaSetTriple<V>
- All Known Implementing Classes:
AbstractDelegatedPrismValueDeltaSetTriple
,DeltaSetTripleImpl
,PrismValueDeltaSetTripleImpl
,SourceTriple
public interface DeltaSetTriple<T>
extends DebugDumpable, ShortDumpable, Serializable, SimpleVisitable<T>, Foreachable<T>
The triple of values (added, unchanged, deleted) that represents difference between two collections of values.
The DeltaSetTriple is used as a result of a "diff" operation or it is constructed to determine a ObjectDelta or PropertyDelta. It is a very useful structure in numerous situations when dealing with relative changes.
DeltaSetTriple (similarly to other parts of this system) deal only with unordered values.
- Author:
- Radovan Semancik
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllToMinusSet
(Collection<T> items) void
addAllToPlusSet
(Collection<T> items) void
addAllToSet
(PlusMinusZero destination, Collection<T> items) void
addAllToZeroSet
(Collection<T> items) void
addToMinusSet
(T item) void
addToPlusSet
(T item) void
addToSet
(PlusMinusZero destination, T item) void
addToZeroSet
(T item) default void
clear()
void
void
void
void
debugDumpSets
(StringBuilder sb, Consumer<T> dumper, int indent) static <T> DeltaSetTriple<T>
diff
(Collection<T> valuesOld, Collection<T> valuesNew, PrismContext prismContext) Compares two (unordered) collections and creates a triple describing the differences.void
Process each element of every set.@NotNull Collection<T>
@NotNull Collection<T>
@NotNull Collection<T>
@NotNull Collection<T>
getSet
(PlusMinusZero whichSet) @NotNull Collection<T>
boolean
boolean
boolean
boolean
isEmpty()
boolean
void
merge
(DeltaSetTriple<T> triple) boolean
presentInMinusSet
(T item) boolean
presentInPlusSet
(T item) boolean
presentInZeroSet
(T item) void
simpleAccept
(SimpleVisitor<T> visitor) int
size()
stream()
<X> void
transform
(DeltaSetTriple<X> transformTarget, Transformer<T, X> transformer) union()
Returns all values, regardless of the internal sets.Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDump, shortDumpLazily
-
Method Details
-
diff
static <T> DeltaSetTriple<T> diff(Collection<T> valuesOld, Collection<T> valuesNew, PrismContext prismContext) Compares two (unordered) collections and creates a triple describing the differences. -
getZeroSet
-
getPlusSet
-
getMinusSet
-
hasPlusSet
boolean hasPlusSet() -
hasZeroSet
boolean hasZeroSet() -
hasMinusSet
boolean hasMinusSet() -
isZeroOnly
boolean isZeroOnly() -
addToPlusSet
-
addToMinusSet
-
addToZeroSet
-
addAllToPlusSet
-
addAllToMinusSet
-
addAllToZeroSet
-
getSet
-
addAllToSet
-
addToSet
-
presentInPlusSet
-
presentInMinusSet
-
presentInZeroSet
-
clearPlusSet
void clearPlusSet() -
clearMinusSet
void clearMinusSet() -
clearZeroSet
void clearZeroSet() -
size
int size() -
union
Collection<T> union()Returns all values, regardless of the internal sets. -
getAnyValue
T getAnyValue() -
getAllValues
Collection<T> getAllValues() -
stream
-
getNonNegativeValues
-
getNonPositiveValues
-
merge
-
clone
-
isEmpty
boolean isEmpty() -
foreach
Process each element of every set. This is different from the visitor. Visitor will go deep inside, foreach will remain on the surface.- Specified by:
foreach
in interfaceForeachable<T>
-
simpleAccept
- Specified by:
simpleAccept
in interfaceSimpleVisitable<T>
-
transform
-
debugDumpSets
-
toHumanReadableString
String toHumanReadableString() -
clear
default void clear()
-