Interface DeltaSetTriple<T>
-
- All Superinterfaces:
DebugDumpable
,Foreachable<T>
,Serializable
,ShortDumpable
,SimpleVisitable<T>
- All Known Subinterfaces:
PrismValueDeltaSetTriple<V>
- All Known Implementing Classes:
AbstractDelegatedPrismValueDeltaSetTriple
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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
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
clearMinusSet()
void
clearPlusSet()
void
clearZeroSet()
DeltaSetTriple<T>
clone(Cloner<T> cloner)
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
foreach(Processor<T> processor)
Process each element of every set.Collection<T>
getAllValues()
T
getAnyValue()
@NotNull Collection<T>
getMinusSet()
@NotNull Collection<T>
getNonNegativeValues()
@NotNull Collection<T>
getNonPositiveValues()
@NotNull Collection<T>
getPlusSet()
Collection<T>
getSet(PlusMinusZero whichSet)
@NotNull Collection<T>
getZeroSet()
boolean
hasMinusSet()
boolean
hasPlusSet()
boolean
hasZeroSet()
boolean
isEmpty()
boolean
isZeroOnly()
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<T>
stream()
String
toHumanReadableString()
<X> void
transform(DeltaSetTriple<X> transformTarget, Transformer<T,X> transformer)
Collection<T>
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 Detail
-
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
@NotNull @NotNull Collection<T> getZeroSet()
-
getPlusSet
@NotNull @NotNull Collection<T> getPlusSet()
-
getMinusSet
@NotNull @NotNull Collection<T> getMinusSet()
-
hasPlusSet
boolean hasPlusSet()
-
hasZeroSet
boolean hasZeroSet()
-
hasMinusSet
boolean hasMinusSet()
-
isZeroOnly
boolean isZeroOnly()
-
addToPlusSet
void addToPlusSet(T item)
-
addToMinusSet
void addToMinusSet(T item)
-
addToZeroSet
void addToZeroSet(T item)
-
addAllToPlusSet
void addAllToPlusSet(Collection<T> items)
-
addAllToMinusSet
void addAllToMinusSet(Collection<T> items)
-
addAllToZeroSet
void addAllToZeroSet(Collection<T> items)
-
getSet
Collection<T> getSet(PlusMinusZero whichSet)
-
addAllToSet
void addAllToSet(PlusMinusZero destination, Collection<T> items)
-
addToSet
void addToSet(PlusMinusZero destination, T item)
-
presentInPlusSet
boolean presentInPlusSet(T item)
-
presentInMinusSet
boolean presentInMinusSet(T item)
-
presentInZeroSet
boolean presentInZeroSet(T item)
-
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()
-
getNonNegativeValues
@NotNull @NotNull Collection<T> getNonNegativeValues()
-
getNonPositiveValues
@NotNull @NotNull Collection<T> getNonPositiveValues()
-
merge
void merge(DeltaSetTriple<T> triple)
-
clone
DeltaSetTriple<T> clone(Cloner<T> cloner)
-
isEmpty
boolean isEmpty()
-
foreach
void foreach(Processor<T> processor)
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
void simpleAccept(SimpleVisitor<T> visitor)
- Specified by:
simpleAccept
in interfaceSimpleVisitable<T>
-
transform
<X> void transform(DeltaSetTriple<X> transformTarget, Transformer<T,X> transformer)
-
debugDumpSets
void debugDumpSets(StringBuilder sb, Consumer<T> dumper, int indent)
-
toHumanReadableString
String toHumanReadableString()
-
clear
default void clear()
-
-