Interface DeltaSetTriple<T>
- All Superinterfaces:
DebugDumpable,Foreachable<T>,Serializable,ShortDumpable,SimpleVisitable<T>
- All Known Subinterfaces:
PrismValueDeltaSetTriple<V>
- All Known Implementing Classes:
AbstractDelegatedPrismValueDeltaSetTriple,AssociationSynchronizationResult,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
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllToMinusSet(Collection<T> items) voidaddAllToPlusSet(Collection<T> items) voidaddAllToSet(PlusMinusZero destination, Collection<T> items) voidaddAllToZeroSet(Collection<T> items) voidaddToMinusSet(T item) voidaddToPlusSet(T item) voidaddToSet(PlusMinusZero destination, T item) voidaddToZeroSet(T item) default voidclear()voidvoidvoidvoiddebugDumpSets(StringBuilder sb, Consumer<T> dumper, int indent) static <T> DeltaSetTriple<T>diff(Collection<T> valuesOld, Collection<T> valuesNew) Compares two (unordered) collections and creates a triple describing the differences.voidforeach(DeltaSetTriple.SetAwareProcessor<T> processor) voidProcess each element of every set.@NotNull Collection<T>@NotNull Collection<T>@NotNull Collection<T>@NotNull Collection<T>getSet(PlusMinusZero whichSet) @NotNull Collection<T>booleanbooleanbooleanbooleanisEmpty()booleanvoidmerge(DeltaSetTriple<T> triple) booleanpresentInMinusSet(T item) booleanpresentInPlusSet(T item) booleanpresentInZeroSet(T item) voidsimpleAccept(SimpleVisitor<T> visitor) intsize()stream()<X> voidtransform(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, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDump, shortDumpLazily
-
Method Details
-
diff
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:
foreachin interfaceForeachable<T>
-
foreach
-
simpleAccept
- Specified by:
simpleAcceptin interfaceSimpleVisitable<T>
-
transform
-
debugDumpSets
-
toHumanReadableString
String toHumanReadableString() -
clear
default void clear()
-