Class AbstractDelegatedPrismValueDeltaSetTriple<V extends PrismValue>
- java.lang.Object
-
- com.evolveum.midpoint.prism.extensions.AbstractDelegatedPrismValueDeltaSetTriple<V>
-
- All Implemented Interfaces:
DeltaSetTriple<V>
,PrismValueDeltaSetTriple<V>
,SimpleVisitable<V>
,Visitable
,DebugDumpable
,Foreachable<V>
,ShortDumpable
,Serializable
- Direct Known Subclasses:
SourceTriple
public class AbstractDelegatedPrismValueDeltaSetTriple<V extends PrismValue> extends Object implements PrismValueDeltaSetTriple<V>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PrismValueDeltaSetTriple<V>
inner
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description AbstractDelegatedPrismValueDeltaSetTriple(PrismValueDeltaSetTriple<V> inner)
AbstractDelegatedPrismValueDeltaSetTriple(PrismContext prismContext)
AbstractDelegatedPrismValueDeltaSetTriple(Collection<V> zeroSet, Collection<V> plusSet, Collection<V> minusSet, PrismContext prismContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
void
addAllToMinusSet(Collection<V> items)
void
addAllToPlusSet(Collection<V> items)
void
addAllToSet(PlusMinusZero destination, Collection<V> items)
void
addAllToZeroSet(Collection<V> items)
void
addToMinusSet(V item)
void
addToPlusSet(V item)
void
addToSet(PlusMinusZero destination, V item)
void
addToZeroSet(V item)
void
applyDefinition(ItemDefinition itemDefinition)
void
checkConsistence()
void
checkNoParent()
void
clearMinusSet()
void
clearPlusSet()
void
clearZeroSet()
PrismValueDeltaSetTriple<V>
clone()
DeltaSetTriple<V>
clone(Cloner<V> cloner)
String
debugDump(int indent)
void
debugDumpSets(StringBuilder sb, Consumer<V> 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.<O extends PrismValue>
voiddistributeAs(V myMember, PrismValueDeltaSetTriple<O> otherTriple, O otherMember)
Distributes a value in this triple similar to the placement of other value in the other triple.void
foreach(Processor<V> processor)
Process each element of every set.Collection<V>
getAllValues()
V
getAnyValue()
Collection<V>
getMinusSet()
Collection<V>
getNonNegativeValues()
Collection<V>
getNonPositiveValues()
Collection<V>
getPlusSet()
Class<?>
getRealValueClass()
Collection<V>
getSet(PlusMinusZero whichSet)
Class<V>
getValueClass()
Collection<V>
getZeroSet()
boolean
hasMinusSet()
boolean
hasPlusSet()
boolean
hasZeroSet()
boolean
isEmpty()
boolean
isRaw()
boolean
isZeroOnly()
void
merge(DeltaSetTriple<V> triple)
boolean
presentInMinusSet(V item)
boolean
presentInPlusSet(V item)
boolean
presentInZeroSet(V item)
void
removeEmptyValues(boolean allowEmptyValues)
void
setOriginObject(Objectable originObject)
Sets specified origin object for all values in all setsvoid
setOriginType(OriginType sourceType)
Sets specified source type for all values in all setsvoid
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.void
simpleAccept(SimpleVisitor<V> visitor)
int
size()
Stream<V>
stream()
String
toHumanReadableString()
<X> void
transform(DeltaSetTriple<X> transformTarget, Transformer<V,X> transformer)
Collection<V>
union()
Returns all values, regardless of the internal sets.-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Field Detail
-
inner
protected PrismValueDeltaSetTriple<V extends PrismValue> inner
-
-
Constructor Detail
-
AbstractDelegatedPrismValueDeltaSetTriple
public AbstractDelegatedPrismValueDeltaSetTriple(PrismValueDeltaSetTriple<V> inner)
-
AbstractDelegatedPrismValueDeltaSetTriple
public AbstractDelegatedPrismValueDeltaSetTriple(PrismContext prismContext)
-
AbstractDelegatedPrismValueDeltaSetTriple
public AbstractDelegatedPrismValueDeltaSetTriple(Collection<V> zeroSet, Collection<V> plusSet, Collection<V> minusSet, PrismContext prismContext)
-
-
Method Detail
-
distributeAs
public <O extends PrismValue> void distributeAs(V myMember, PrismValueDeltaSetTriple<O> otherTriple, O otherMember)
Description copied from interface:PrismValueDeltaSetTriple
Distributes a value in this triple similar to the placement of other value in the other triple. E.g. if the value "otherMember" is in the zero set in "otherTriple" then "myMember" will be placed in zero set in this triple.- Specified by:
distributeAs
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
getValueClass
public Class<V> getValueClass()
- Specified by:
getValueClass
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
getRealValueClass
public Class<?> getRealValueClass()
- Specified by:
getRealValueClass
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
isRaw
public boolean isRaw()
- Specified by:
isRaw
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
applyDefinition
public void applyDefinition(ItemDefinition itemDefinition) throws SchemaException
- Specified by:
applyDefinition
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
- Throws:
SchemaException
-
setOriginType
public void setOriginType(OriginType sourceType)
Description copied from interface:PrismValueDeltaSetTriple
Sets specified source type for all values in all sets- Specified by:
setOriginType
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
setOriginObject
public void setOriginObject(Objectable originObject)
Description copied from interface:PrismValueDeltaSetTriple
Sets specified origin object for all values in all sets- Specified by:
setOriginObject
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
removeEmptyValues
public void removeEmptyValues(boolean allowEmptyValues)
- Specified by:
removeEmptyValues
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
clone
public PrismValueDeltaSetTriple<V> clone()
- Specified by:
clone
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
- Overrides:
clone
in classObject
-
checkConsistence
public void checkConsistence()
- Specified by:
checkConsistence
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
accept
public void accept(Visitor visitor)
- Specified by:
accept
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
- Specified by:
accept
in interfaceVisitable
-
checkNoParent
public void checkNoParent()
- Specified by:
checkNoParent
in interfacePrismValueDeltaSetTriple<V extends PrismValue>
-
diff
public static <T> DeltaSetTriple<T> diff(Collection<T> valuesOld, Collection<T> valuesNew, PrismContext prismContext)
Description copied from interface:DeltaSetTriple
Compares two (unordered) collections and creates a triple describing the differences.
-
getZeroSet
@NotNull public Collection<V> getZeroSet()
- Specified by:
getZeroSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
getPlusSet
@NotNull public Collection<V> getPlusSet()
- Specified by:
getPlusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
getMinusSet
@NotNull public Collection<V> getMinusSet()
- Specified by:
getMinusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
hasPlusSet
public boolean hasPlusSet()
- Specified by:
hasPlusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
hasZeroSet
public boolean hasZeroSet()
- Specified by:
hasZeroSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
hasMinusSet
public boolean hasMinusSet()
- Specified by:
hasMinusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
isZeroOnly
public boolean isZeroOnly()
- Specified by:
isZeroOnly
in interfaceDeltaSetTriple<V extends PrismValue>
-
addToPlusSet
public void addToPlusSet(V item)
- Specified by:
addToPlusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addToMinusSet
public void addToMinusSet(V item)
- Specified by:
addToMinusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addToZeroSet
public void addToZeroSet(V item)
- Specified by:
addToZeroSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addAllToPlusSet
public void addAllToPlusSet(Collection<V> items)
- Specified by:
addAllToPlusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addAllToMinusSet
public void addAllToMinusSet(Collection<V> items)
- Specified by:
addAllToMinusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addAllToZeroSet
public void addAllToZeroSet(Collection<V> items)
- Specified by:
addAllToZeroSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
getSet
public Collection<V> getSet(PlusMinusZero whichSet)
- Specified by:
getSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addAllToSet
public void addAllToSet(PlusMinusZero destination, Collection<V> items)
- Specified by:
addAllToSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
addToSet
public void addToSet(PlusMinusZero destination, V item)
- Specified by:
addToSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
presentInPlusSet
public boolean presentInPlusSet(V item)
- Specified by:
presentInPlusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
presentInMinusSet
public boolean presentInMinusSet(V item)
- Specified by:
presentInMinusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
presentInZeroSet
public boolean presentInZeroSet(V item)
- Specified by:
presentInZeroSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
clearPlusSet
public void clearPlusSet()
- Specified by:
clearPlusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
clearMinusSet
public void clearMinusSet()
- Specified by:
clearMinusSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
clearZeroSet
public void clearZeroSet()
- Specified by:
clearZeroSet
in interfaceDeltaSetTriple<V extends PrismValue>
-
size
public int size()
- Specified by:
size
in interfaceDeltaSetTriple<V extends PrismValue>
-
union
public Collection<V> union()
Description copied from interface:DeltaSetTriple
Returns all values, regardless of the internal sets.- Specified by:
union
in interfaceDeltaSetTriple<V extends PrismValue>
-
getAnyValue
public V getAnyValue()
- Specified by:
getAnyValue
in interfaceDeltaSetTriple<V extends PrismValue>
-
getAllValues
public Collection<V> getAllValues()
- Specified by:
getAllValues
in interfaceDeltaSetTriple<V extends PrismValue>
-
stream
public Stream<V> stream()
- Specified by:
stream
in interfaceDeltaSetTriple<V extends PrismValue>
-
getNonNegativeValues
@NotNull public Collection<V> getNonNegativeValues()
- Specified by:
getNonNegativeValues
in interfaceDeltaSetTriple<V extends PrismValue>
-
getNonPositiveValues
@NotNull public Collection<V> getNonPositiveValues()
- Specified by:
getNonPositiveValues
in interfaceDeltaSetTriple<V extends PrismValue>
-
merge
public void merge(DeltaSetTriple<V> triple)
- Specified by:
merge
in interfaceDeltaSetTriple<V extends PrismValue>
-
clone
public DeltaSetTriple<V> clone(Cloner<V> cloner)
- Specified by:
clone
in interfaceDeltaSetTriple<V extends PrismValue>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceDeltaSetTriple<V extends PrismValue>
-
foreach
public void foreach(Processor<V> processor)
Description copied from interface:DeltaSetTriple
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 interfaceDeltaSetTriple<V extends PrismValue>
- Specified by:
foreach
in interfaceForeachable<V extends PrismValue>
-
simpleAccept
public void simpleAccept(SimpleVisitor<V> visitor)
- Specified by:
simpleAccept
in interfaceDeltaSetTriple<V extends PrismValue>
- Specified by:
simpleAccept
in interfaceSimpleVisitable<V extends PrismValue>
-
transform
public <X> void transform(DeltaSetTriple<X> transformTarget, Transformer<V,X> transformer)
- Specified by:
transform
in interfaceDeltaSetTriple<V extends PrismValue>
-
debugDumpSets
public void debugDumpSets(StringBuilder sb, Consumer<V> dumper, int indent)
- Specified by:
debugDumpSets
in interfaceDeltaSetTriple<V extends PrismValue>
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableString
in interfaceDeltaSetTriple<V extends PrismValue>
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
shortDump
public void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
-