public class DeltaSetTriple<T> extends Object implements Dumpable, DebugDumpable, Serializable, SimpleVisitable<T>
Modifier and Type | Field and Description |
---|---|
protected Collection<T> |
minusSet
Collection of values that were deleted.
|
protected Collection<T> |
plusSet
Collection of values that were added.
|
protected Collection<T> |
zeroSet
Collection of values that were not changed.
|
INDENT_STRING
Constructor and Description |
---|
DeltaSetTriple() |
DeltaSetTriple(Collection<T> zeroSet,
Collection<T> plusSet,
Collection<T> minusSet) |
Modifier and Type | Method and Description |
---|---|
void |
accept(SimpleVisitor<T> visitor) |
void |
addAllToMinusSet(Collection<T> items) |
void |
addAllToPlusSet(Collection<T> items) |
void |
addAllToZeroSet(Collection<T> items) |
void |
addToMinusSet(T item) |
void |
addToPlusSet(T item) |
void |
addToZeroSet(T item) |
void |
clearMinusSet() |
void |
clearPlusSet() |
void |
clearZeroSet() |
DeltaSetTriple<T> |
clone(Cloner<T> cloner) |
protected void |
copyValues(DeltaSetTriple<T> clone,
Cloner<T> cloner) |
protected Collection<T> |
createSet() |
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
protected String |
debugName() |
static <T> DeltaSetTriple<T> |
diff(Collection<T> valuesOld,
Collection<T> valuesNew)
Compares two (unordered) collections and creates a triple describing the differences.
|
protected static <T> void |
diff(Collection<T> valuesOld,
Collection<T> valuesNew,
DeltaSetTriple<T> triple) |
String |
dump()
Show the content of the object intended for diagnostics by developer.
|
Collection<T> |
getAllValues() |
Collection<T> |
getMinusSet() |
Collection<T> |
getNonNegativeValues() |
Collection<T> |
getNonPositiveValues() |
Collection<T> |
getPlusSet() |
Collection<T> |
getZeroSet() |
boolean |
hasMinusSet() |
boolean |
hasPlusSet() |
boolean |
hasZeroSet() |
boolean |
isEmpty() |
void |
merge(DeltaSetTriple<T> triple) |
boolean |
presentInMinusSet(T item) |
boolean |
presentInPlusSet(T item) |
boolean |
presentInZeroSet(T item) |
int |
size() |
String |
toHumanReadableString() |
protected void |
toHumanReadableString(StringBuilder sb,
T item) |
String |
toString() |
Collection<T> |
union()
Returns all values, regardless of the internal sets.
|
protected Collection<T> zeroSet
protected Collection<T> plusSet
protected Collection<T> minusSet
public DeltaSetTriple()
public DeltaSetTriple(Collection<T> zeroSet, Collection<T> plusSet, Collection<T> minusSet)
public static <T> DeltaSetTriple<T> diff(Collection<T> valuesOld, Collection<T> valuesNew)
protected static <T> void diff(Collection<T> valuesOld, Collection<T> valuesNew, DeltaSetTriple<T> triple)
protected Collection<T> createSet()
public Collection<T> getZeroSet()
public Collection<T> getPlusSet()
public Collection<T> getMinusSet()
public boolean hasPlusSet()
public boolean hasZeroSet()
public boolean hasMinusSet()
public void addToPlusSet(T item)
public void addToMinusSet(T item)
public void addToZeroSet(T item)
public void addAllToPlusSet(Collection<T> items)
public void addAllToMinusSet(Collection<T> items)
public void addAllToZeroSet(Collection<T> items)
public boolean presentInPlusSet(T item)
public boolean presentInMinusSet(T item)
public boolean presentInZeroSet(T item)
public void clearPlusSet()
public void clearMinusSet()
public void clearZeroSet()
public int size()
public Collection<T> union()
public Collection<T> getAllValues()
public Collection<T> getNonNegativeValues()
public Collection<T> getNonPositiveValues()
public void merge(DeltaSetTriple<T> triple)
public DeltaSetTriple<T> clone(Cloner<T> cloner)
protected void copyValues(DeltaSetTriple<T> clone, Cloner<T> cloner)
public boolean isEmpty()
public void accept(SimpleVisitor<T> visitor)
accept
in interface SimpleVisitable<T>
public String dump()
Dumpable
protected String debugName()
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public String toHumanReadableString()
protected void toHumanReadableString(StringBuilder sb, T item)
Copyright © 2013 evolveum. All rights reserved.