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
-
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 Collection<T> getZeroSet()
-
getPlusSet
@NotNull Collection<T> getPlusSet()
-
getMinusSet
@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 Collection<T> getNonNegativeValues()
-
getNonPositiveValues
@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()
-
-