Class EMFComparePredicates
Diff
s from
an iterable.-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.google.common.base.Predicate<? super Diff>
Deprecated.This can be used to check whether a given diff is a containment reference change.static final com.google.common.base.Predicate<? super EObject>
Deprecated.Predicate used to know if the given EObject is an EGenericType without eTypeArguments.static final com.google.common.base.Predicate<? super Diff>
Deprecated.This can be used to test whether a given Diff has no conflict object associated. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Predicate<? super Diff>
Deprecated.This predicate can be used to check whether a given Diff represents the addition of an EObject matching the given qualified name.static com.google.common.base.Predicate<? super Diff>
addedToAttribute
(String qualifiedName, String attributeName, Object addedValue) Deprecated.This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued attribute going byattributeName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
addedToReference
(String qualifiedName, String referenceName, String addedQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
addedToReference
(String qualifiedName, String referenceName, String addedQualifiedName, EStructuralFeature featureDelegateForAddedName) Deprecated.This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<Diff>
allAtomicRefining
(com.google.common.base.Predicate<? super Diff> predicate) Deprecated.This predicate can be used to check whether a diff has refiningDiffs AND all these refining diffs fulfill the given predicate.static com.google.common.base.Predicate<Diff>
anyRefined
(com.google.common.base.Predicate<? super Diff> predicate) Deprecated.This predicate can be used to check whether any refined diff of a given diff fulfills the given predicate.static com.google.common.base.Predicate<Diff>
anyRefining
(com.google.common.base.Predicate<? super Diff> predicate) Deprecated.This predicate can be used to check whether any refining diff of a given diff fulfills the given predicate.static com.google.common.base.Predicate<? super Diff>
attributeValueMatch
(String attributeName, Object expectedValue, boolean multiValued) Deprecated.This predicate can be used to check whether a given Diff describes an AttributeChange with the givenattributeName
and which changed value corresponds to the givenexpectedValue
.static com.google.common.base.Predicate<Diff>
Deprecated.This predicate can be used to test if a diff is in a pseudo conflict.static com.google.common.base.Predicate<? super Diff>
changedAttribute
(String qualifiedName, String attributeName, Object fromValue, Object toValue) Deprecated.This predicate can be used to check whether a given Diff represents the modification of a single-valued attribute going by the givenattributeName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
changedReference
(String qualifiedName, String referenceName, String fromQualifiedName, String toQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the modification of a single-valued reference going by the givenreferenceName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
Deprecated.static com.google.common.base.Predicate<? super Conflict>
containsConflictOfTypes
(ConflictKind... kinds) Deprecated.This can be used to check whether a given Conflict is of one of the given kind.static com.google.common.base.Predicate<? super Diff>
fromSide
(DifferenceSource source) Deprecated.This can be used to check that a given Diff originates from the givensource
side.static <T> Predicate<T>
guavaToJava
(com.google.common.base.Predicate<T> guava) Deprecated.Guava predicates and functions are only aligned in recent versions of Guava.static com.google.common.base.Predicate<? super Diff>
hasConflict
(ConflictKind... kinds) Deprecated.This can be used to check whether a given Diff has a conflict of one of the given type.static com.google.common.base.Predicate<? super Diff>
hasDirectOrIndirectConflict
(ConflictKind... kinds) Deprecated.This predicate can be used to check whether a diff is in a conflict directly or indirectly.static com.google.common.base.Predicate<? super Diff>
hasNoDirectOrIndirectConflict
(ConflictKind... kinds) Deprecated.This predicate can be used to check whether a diff is not in a conflict directly or indirectly.static com.google.common.base.Predicate<Diff>
Deprecated.This predicate can be used to check whether a given Diff is aReferenceChange
with the same reference as thediff
argument.static com.google.common.base.Predicate<? super Diff>
hasState
(DifferenceState... states) Deprecated.This can be used to check whether a given Diff is in (one of) the given state(s).static com.google.common.base.Predicate<Conflict>
Deprecated.Predicate to test whether a conflict is additive or not.static com.google.common.base.Predicate<Diff>
Deprecated.This predicate can be used to check whether a given Diff is aReferenceChange
representing the eOpposite of thediff
argument.static com.google.common.base.Predicate<Diff>
isEquivalentTo
(Diff diff) Deprecated.This predicate can be used to check whether a given Diff is equivalent to thediff
argument.static com.google.common.base.Predicate<Diff>
Deprecated.Indicates whether a diff is part of a real add/add conflict.static com.google.common.base.Predicate<Diff>
isNotRefinedDirectlyConflicting
(ConflictKind... kinds) Deprecated.Check whether a diff is not refined and has a direct conflict of (one of) the given type(s).static com.google.common.base.Predicate<? super Diff>
Deprecated.This predicate can be used to check whether a given Diff represents the move of an EObject matching the given qualified name.static com.google.common.base.Predicate<? super Diff>
movedInAttribute
(String qualifiedName, String attributeName, Object removedValue) Deprecated.This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued attribute going byattributeName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
movedInReference
(String qualifiedName, String referenceName, String removedQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
ofKind
(DifferenceKind kind) Deprecated.This predicate can be used to check whether a particular diff is of the givenkind
.static com.google.common.base.Predicate<Diff>
ofKind
(DifferenceKind kind1, DifferenceKind kind2) Deprecated.Accept only diffs of the given kinds.static com.google.common.base.Predicate<? super Diff>
Deprecated.This can be used in order to check whether a Diff has been detected on an EObject matching the given qualified name.static com.google.common.base.Predicate<? super Diff>
onEObject
(String qualifiedName, EStructuralFeature featureDelegate) Deprecated.This can be used in order to check whether a Diff has been detected on an EObject matching the given qualified name or the qualified name under the given feature.static com.google.common.base.Predicate<? super Diff>
Deprecated.This can be used in order to check that a Diff has been detected on the given EObject.static com.google.common.base.Predicate<? super Diff>
Deprecated.This can be used to check that a given Diff correspond to either anAttributeChange
, aFeatureMapChange
or aReferenceChange
, and that the corresponding reference or attribute matches the givenfeatureName
.static com.google.common.base.Predicate<Diff>
onFeature
(EStructuralFeature feature) Deprecated.Accept only diffs that inherit either AttributeChange, ReferenceChange, or FeatureMapChange that concern the given feature.static com.google.common.base.Predicate<Diff>
possiblyConflictingWith
(Diff diff) Deprecated.Predicate builder for diffs that can conflict with the given diff.static com.google.common.base.Predicate<? super Diff>
referenceValueMatch
(String referenceName, String qualifiedName, boolean multiValued) Deprecated.This predicate can be used to check whether a given Diff describes a ReferenceChange with the givenreferenceName
and which changed value corresponds to the givenqualifiedName
.static com.google.common.base.Predicate<? super Diff>
referenceValueMatch
(String referenceName, String qualifiedName, boolean multiValued, EStructuralFeature featureDelegate) Deprecated.This predicate can be used to check whether a given Diff describes a ReferenceChange with the givenreferenceName
and which changed value corresponds to the givenqualifiedName
or the qualified name under the givenfeatureDelegate
.static com.google.common.base.Predicate<? super Diff>
Deprecated.This predicate can be used to check whether a given Diff represents the removal of an EObject matching the given qualified name.static com.google.common.base.Predicate<? super Diff>
removedFromAttribute
(String qualifiedName, String attributeName, Object removedValue) Deprecated.This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued attribute going byattributeName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
removedFromReference
(String qualifiedName, String referenceName, String removedQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<? super Diff>
removedFromReference
(String qualifiedName, String referenceName, String removedQualifiedName, EStructuralFeature featureDelegateForRemovedName) Deprecated.This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.static com.google.common.base.Predicate<Diff>
sameSideAs
(Diff diff) Deprecated.This can be used to check that a given Diff originates from the givensource
side.static com.google.common.base.Predicate<? super Diff>
Deprecated.This predicate can be used in order to check that a particular Diff describes either aReferenceChange
,AttributeChange
orFeatureMapChange
for the givenexpectedValue
.static com.google.common.base.Predicate<Diff>
valueMatches
(IEqualityHelper helper, Object value) Deprecated.Accept only diffs whose value matches the given value.static com.google.common.base.Predicate<? super Diff>
valueNameMatches
(String expectedName) Deprecated.This can be used to check whether a given Diff describes either aReferenceChange
on an EObject which name isexpectedName
.static com.google.common.base.Predicate<? super Diff>
valueNameMatches
(String expectedName, EStructuralFeature featureDelegate) Deprecated.This can be used to check whether a given Diff describes either aReferenceChange
on an EObject which name isexpectedName
or which the given feature provides theexpectedName
.
-
Field Details
-
WITHOUT_CONFLICT
Deprecated.This can be used to test whether a given Diff has no conflict object associated.- Since:
- 3.1
-
CONTAINMENT_REFERENCE_CHANGE
Deprecated.This can be used to check whether a given diff is a containment reference change.- Since:
- 3.1
-
IS_EGENERIC_TYPE_WITHOUT_PARAMETERS
public static final com.google.common.base.Predicate<? super EObject> IS_EGENERIC_TYPE_WITHOUT_PARAMETERSDeprecated.Predicate used to know if the given EObject is an EGenericType without eTypeArguments. When an EGenericType has arguments, it seems that the mutually derived references are not applicable in this case.
-
-
Method Details
-
changedReference
public static com.google.common.base.Predicate<? super Diff> changedReference(String qualifiedName, String referenceName, String fromQualifiedName, String toQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the modification of a single-valued reference going by the givenreferenceName
on an EObject which name matchesqualifiedName
. This can be used both on three-way and two-way Diffs : if three-way, we'll consider that thefromQualifiedName
can be either one of the right or origin values, and thetoQualifiedName
to be either left or right. on two-way diffs however,fromQualifiedName
can only be the right value, andtoQualifiedName
will be the left one.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present a ReferenceChange.referenceName
- Name of the single-valued reference on which we expect a change.fromQualifiedName
- The original value of this reference.toQualifiedName
- The value to which this reference has been changed.- Returns:
- The created predicate.
-
addedToAttribute
public static com.google.common.base.Predicate<? super Diff> addedToAttribute(String qualifiedName, String attributeName, Object addedValue) Deprecated.This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued attribute going byattributeName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present an AttributeChange.attributeName
- Name of the multi-valued attribute on which we expect a change.addedValue
- The value we expect to have been added to this attribute.- Returns:
- The created predicate.
-
addedToReference
public static com.google.common.base.Predicate<? super Diff> addedToReference(String qualifiedName, String referenceName, String addedQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present a ReferenceChange.referenceName
- Name of the multi-valued reference on which we expect a change.addedQualifiedName
- Qualified name of the EObject which we expect to have been added to this reference.- Returns:
- The created predicate.
-
addedToReference
public static com.google.common.base.Predicate<? super Diff> addedToReference(String qualifiedName, String referenceName, String addedQualifiedName, EStructuralFeature featureDelegateForAddedName) Deprecated.This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present a ReferenceChange.referenceName
- Name of the multi-valued reference on which we expect a change.addedQualifiedName
- Qualified name of the EObject which we expect to have been added to this reference.featureDelegateForAddedName
- The optional feature to define the name of the objects which we expect to have been added to this reference. May be null.- Returns:
- The created predicate.
-
movedInAttribute
public static com.google.common.base.Predicate<? super Diff> movedInAttribute(String qualifiedName, String attributeName, Object removedValue) Deprecated.This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued attribute going byattributeName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present an AttributeChange.attributeName
- Name of the multi-valued attribute on which we expect a change.removedValue
- Value which we expect to have been moved within this attribute.- Returns:
- The created predicate.
-
movedInReference
public static com.google.common.base.Predicate<? super Diff> movedInReference(String qualifiedName, String referenceName, String removedQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present a ReferenceChange.referenceName
- Name of the multi-valued reference on which we expect a change.removedQualifiedName
- Qualified name of the EObject which we expect to have been moved within this reference.- Returns:
- The created predicate.
-
isDiffOnEOppositeOf
Deprecated.This predicate can be used to check whether a given Diff is aReferenceChange
representing the eOpposite of thediff
argument.- Parameters:
diff
- TheReferenceChange
against which is checked if an eOpposite relation exists.- Returns:
- The created predicate.
- Since:
- 3.2
-
isEquivalentTo
Deprecated.This predicate can be used to check whether a given Diff is equivalent to thediff
argument.- Parameters:
diff
- TheReferenceChange
against which is checked if an equivalence relation exists.- Returns:
- The created predicate.
- Since:
- 3.2
-
hasSameReferenceAs
Deprecated.This predicate can be used to check whether a given Diff is aReferenceChange
with the same reference as thediff
argument.- Parameters:
diff
- TheReferenceChange
against which is checked whether it has the same reference.- Returns:
- The created predicate.
- Since:
- 3.2
-
removedFromAttribute
public static com.google.common.base.Predicate<? super Diff> removedFromAttribute(String qualifiedName, String attributeName, Object removedValue) Deprecated.This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued attribute going byattributeName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present an AttributeChange.attributeName
- Name of the multi-valued attribute on which we expect a change.removedValue
- Value which we expect to have been removed from this attribute.- Returns:
- The created predicate.
-
isInRealAddAddConflict
Deprecated.Indicates whether a diff is part of a real add/add conflict.- Returns:
- a predicate to check if a diff belongs to an add/add conflict.
- Since:
- 3.4
-
removedFromReference
public static com.google.common.base.Predicate<? super Diff> removedFromReference(String qualifiedName, String referenceName, String removedQualifiedName) Deprecated.This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present a ReferenceChange.referenceName
- Name of the multi-valued reference on which we expect a change.removedQualifiedName
- Qualified name of the EObject which we expect to have been removed from this reference.- Returns:
- The created predicate.
-
removedFromReference
public static com.google.common.base.Predicate<? super Diff> removedFromReference(String qualifiedName, String referenceName, String removedQualifiedName, EStructuralFeature featureDelegateForRemovedName) Deprecated.This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going byreferenceName
on an EObject which name matchesqualifiedName
.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present a ReferenceChange.referenceName
- Name of the multi-valued reference on which we expect a change.removedQualifiedName
- Qualified name of the EObject which we expect to have been removed from this reference.featureDelegateForRemovedName
- The optional feature to define the name of the objects which we expect to have been removed from this reference. May be null.- Returns:
- The created predicate.
-
changedAttribute
public static com.google.common.base.Predicate<? super Diff> changedAttribute(String qualifiedName, String attributeName, Object fromValue, Object toValue) Deprecated.This predicate can be used to check whether a given Diff represents the modification of a single-valued attribute going by the givenattributeName
on an EObject which name matchesqualifiedName
. This can be used both on three-way and two-way Diffs : if three-way, we'll consider that thefromValue
can be either one of the right or origin values, and thetoValue
to be either left or right. on two-way diffs however,fromValue
can only be the right value, andtoValue
will be the left one.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String for us to compare it with the given qualified name.
- Parameters:
qualifiedName
- Qualified name of the EObject which we expect to present an AttributeChange.attributeName
- Name of the single-valued attribute on which we expect a change.fromValue
- The original value of this attribute.toValue
- The value to which this attribute has been changed.- Returns:
- The created predicate.
-
added
Deprecated.This predicate can be used to check whether a given Diff represents the addition of an EObject matching the given qualified name. Namely, it will check that that Diff is a ReferenceChange, that one of its Match sides correspond to the given qualified name's ancestors, and that its value correspond to the given qualified name's last segment.For example,
added("extlibrary.BookCategory.Encyclopedia")
will check that an EObject named "Encyclopedia" has been added under the container "extlibrary.BookCategory". Note thatadded("emf.compare.Match")
will not match a difference on the EObject "org.eclipse.emf.compare.Match". The qualified name must be absolute.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String.
- Parameters:
qualifiedName
- The qualified name of the EObject we expect to have been added.- Returns:
- The created predicate.
-
moved
public static com.google.common.base.Predicate<? super Diff> moved(String qualifiedName, String referenceName) Deprecated.This predicate can be used to check whether a given Diff represents the move of an EObject matching the given qualified name. Namely, it will check that that Diff is a ReferenceChange, that one of its Match sides correspond to the given qualified name's ancestors, and that its value correspond to the given qualified name's last segment.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String.
- Parameters:
qualifiedName
- The qualified name of the EObject we expect to have been moved.referenceName
- Name of the reference in which we expect a child to have been added.- Returns:
- The created predicate.
-
removed
Deprecated.This predicate can be used to check whether a given Diff represents the removal of an EObject matching the given qualified name. Namely, it will check that that Diff is a ReferenceChange, that one of its Match sides correspond to the given qualified name's ancestors, and that its value correspond to the given qualified name's last segment.For example,
removed("extlibrary.BookCategory.Encyclopedia")
will check that an EObject named "Encyclopedia" has been removed from the container "extlibrary.BookCategory". Note thatremoved("emf.compare.Match")
will not match a difference on the EObject "org.eclipse.emf.compare.Match". The qualified name must be absolute.Note that in order for this to work, we expect the EObjects to have a "name" feature returning a String.
- Parameters:
qualifiedName
- The qualified name of the EObject we expect to have been removed.- Returns:
- The created predicate.
-
onFeature
Deprecated.This can be used to check that a given Diff correspond to either anAttributeChange
, aFeatureMapChange
or aReferenceChange
, and that the corresponding reference or attribute matches the givenfeatureName
.- Parameters:
featureName
- Name of the feature on which we expect a change.- Returns:
- The created predicate.
-
onFeature
Deprecated.Accept only diffs that inherit either AttributeChange, ReferenceChange, or FeatureMapChange that concern the given feature.- Parameters:
feature
- Feature to deal with- Returns:
- a new predicate that accepts diffs that concern the given feature.
-
fromSide
Deprecated.This can be used to check that a given Diff originates from the givensource
side.- Parameters:
source
- The side from which we expect this diff to originate.- Returns:
- The created predicate.
-
sameSideAs
Deprecated.This can be used to check that a given Diff originates from the givensource
side.- Parameters:
diff
- The diff the side of which will be used to filter.- Returns:
- The created predicate.
-
onEObject
Deprecated.This can be used in order to check that a Diff has been detected on the given EObject.- Parameters:
eObject
- The EObject which we expect the diff to concern.- Returns:
- The created predicate.
-
onEObject
Deprecated.This can be used in order to check whether a Diff has been detected on an EObject matching the given qualified name.For this to work, we expect the EObjects to have a feature named "name" returning a String.
- Parameters:
qualifiedName
- The qualified name of the EObject we expect that diff to concern.- Returns:
- The created predicate.
-
onEObject
public static com.google.common.base.Predicate<? super Diff> onEObject(String qualifiedName, EStructuralFeature featureDelegate) Deprecated.This can be used in order to check whether a Diff has been detected on an EObject matching the given qualified name or the qualified name under the given feature.For this to work, we expect the EObjects to have a feature named "name" returning a String or to have the given feature (String or EObject with a feature named "name").
- Parameters:
qualifiedName
- The qualified name of the EObject we expect that diff to concern.featureDelegate
- The optional feature to define the name of the objects. May be null.- Returns:
- The created predicate.
-
ofKind
Deprecated.This predicate can be used to check whether a particular diff is of the givenkind
. This is mainly used to differentiate additions from deletions.- Parameters:
kind
- The kind we expect this diff to have.- Returns:
- The created predicate.
-
ofKind
public static com.google.common.base.Predicate<Diff> ofKind(DifferenceKind kind1, DifferenceKind kind2) Deprecated.Accept only diffs of the given kinds.- Parameters:
kind1
- first kind of diff to acceptkind2
- second kind of diff to accept- Returns:
- The created predicate.
-
valueMatches
public static com.google.common.base.Predicate<Diff> valueMatches(IEqualityHelper helper, Object value) Deprecated.Accept only diffs whose value matches the given value.- Parameters:
helper
- The helper to match valuesvalue
- The value to match- Returns:
- The created predicate.
-
valueIs
Deprecated.This predicate can be used in order to check that a particular Diff describes either aReferenceChange
,AttributeChange
orFeatureMapChange
for the givenexpectedValue
.For example, this could be used to check that the given value has indeed been added to a reference or attribute, though such checks are more easily performed through
#addedIn(EObject, EObject)
or#removedFrom(EObject, EObject)
.- Parameters:
expectedValue
- The value which we expect to have changed and detected through a Diff.- Returns:
- The created predicate.
-
attributeValueMatch
public static com.google.common.base.Predicate<? super Diff> attributeValueMatch(String attributeName, Object expectedValue, boolean multiValued) Deprecated.This predicate can be used to check whether a given Diff describes an AttributeChange with the givenattributeName
and which changed value corresponds to the givenexpectedValue
.- Parameters:
attributeName
- The name of the attribute for which we seek an AttributeChange.expectedValue
- The value we expect to correspond to this AttributeChange.multiValued
- Tells us to check for either multi- or single-valued reference changes.- Returns:
- The created predicate.
-
referenceValueMatch
public static com.google.common.base.Predicate<? super Diff> referenceValueMatch(String referenceName, String qualifiedName, boolean multiValued) Deprecated.This predicate can be used to check whether a given Diff describes a ReferenceChange with the givenreferenceName
and which changed value corresponds to the givenqualifiedName
.For this to work, we expect the EObject to have a feature named "name" returning a String for us to try and match it.
- Parameters:
referenceName
- The reference for which we seek a ReferenceChange.qualifiedName
- The qualified name of the EObject on which we detected a change.multiValued
- Tells us to check for either multi- or single-valued reference changes.- Returns:
- The created predicate.
-
referenceValueMatch
public static com.google.common.base.Predicate<? super Diff> referenceValueMatch(String referenceName, String qualifiedName, boolean multiValued, EStructuralFeature featureDelegate) Deprecated.This predicate can be used to check whether a given Diff describes a ReferenceChange with the givenreferenceName
and which changed value corresponds to the givenqualifiedName
or the qualified name under the givenfeatureDelegate
.For this to work, we expect the EObject to have a feature named "name" returning a String or to have the given feature (String or EObject with a feature named "name") for us to try and match it.
- Parameters:
referenceName
- The reference for which we seek a ReferenceChange.qualifiedName
- The qualified name of the EObject on which we detected a change.multiValued
- Tells us to check for either multi- or single-valued reference changes.featureDelegate
- The optional feature to define the name of the objects. May be null.- Returns:
- The created predicate.
-
valueNameMatches
Deprecated.This can be used to check whether a given Diff describes either aReferenceChange
on an EObject which name isexpectedName
.For this to work, we expect the EObject to have a feature named "name" returning a String for us to try and match it.
- Parameters:
expectedName
- The name of the EObject which we expect as a changed reference value.- Returns:
- The created predicate.
-
valueNameMatches
public static com.google.common.base.Predicate<? super Diff> valueNameMatches(String expectedName, EStructuralFeature featureDelegate) Deprecated.This can be used to check whether a given Diff describes either aReferenceChange
on an EObject which name isexpectedName
or which the given feature provides theexpectedName
.For this to work, we expect the EObject to have a feature named "name" returning a String or to have the given feature (String or EObject with a feature named "name") for us to try and match it.
- Parameters:
expectedName
- The name of the EObject which we expect as a changed reference value.featureDelegate
- The optional feature to define the name of the objects. May be null.- Returns:
- The created predicate.
-
hasConflict
Deprecated.This can be used to check whether a given Diff has a conflict of one of the given type.- Parameters:
kinds
- Type(s) of the conflict(s) we seek.- Returns:
- The created predicate.
-
hasState
Deprecated.This can be used to check whether a given Diff is in (one of) the given state(s).- Parameters:
states
- State(s) in which we need a Diff to be.- Returns:
- The created predicate.
-
possiblyConflictingWith
Deprecated.Predicate builder for diffs that can conflict with the given diff.- Parameters:
diff
- The diff- Returns:
- A predicate that accepts diffs that might conflict with the given diff.
-
containsConflictOfTypes
public static com.google.common.base.Predicate<? super Conflict> containsConflictOfTypes(ConflictKind... kinds) Deprecated.This can be used to check whether a given Conflict is of one of the given kind.- Parameters:
kinds
- Type(s) of the conflict(s) we seek.- Returns:
- The created predicate.
-
containmentReferenceChange
@Deprecated public static com.google.common.base.Predicate<? super Diff> containmentReferenceChange()Deprecated.This can be used to check whether a given diff is a containment reference change.- Returns:
- The created predicate.
-
anyRefining
public static com.google.common.base.Predicate<Diff> anyRefining(com.google.common.base.Predicate<? super Diff> predicate) Deprecated.This predicate can be used to check whether any refining diff of a given diff fulfills the given predicate.- Parameters:
predicate
- The predicate to check.- Returns:
- The predicate.
- Since:
- 3.4
-
anyRefined
public static com.google.common.base.Predicate<Diff> anyRefined(com.google.common.base.Predicate<? super Diff> predicate) Deprecated.This predicate can be used to check whether any refined diff of a given diff fulfills the given predicate.- Parameters:
predicate
- The predicate to check.- Returns:
- The predicate.
- Since:
- 3.4
-
allAtomicRefining
public static com.google.common.base.Predicate<Diff> allAtomicRefining(com.google.common.base.Predicate<? super Diff> predicate) Deprecated.This predicate can be used to check whether a diff has refiningDiffs AND all these refining diffs fulfill the given predicate.BEWARE: If the given diff has no refining diff, the predicate returns
false
.- Parameters:
predicate
- The predicate to check on each 'atomic' (i.e. not refined) refining diff.- Returns:
- The predicate.
- Since:
- 3.4
-
isNotRefinedDirectlyConflicting
public static com.google.common.base.Predicate<Diff> isNotRefinedDirectlyConflicting(ConflictKind... kinds) Deprecated.Check whether a diff is not refined and has a direct conflict of (one of) the given type(s).- Parameters:
kinds
- Type(s) of the conflict(s) we seek.- Returns:
- The created predicate.
- Since:
- 3.4
-
canBeConsideredAsPseudoConflicting
Deprecated.This predicate can be used to test if a diff is in a pseudo conflict. Several cases are possible:- if the diff is not a refined diff and has a direct pseudo conflict (i.e. diff.getConflict = a pseudo conflict) - if the diff is a refined diff and all its refining diffs are in pseudo conflicts. The refining diffs must not be part of a real conflict directly or indirectly
- Returns:
- the predicate
- Since:
- 3.4
-
hasDirectOrIndirectConflict
public static com.google.common.base.Predicate<? super Diff> hasDirectOrIndirectConflict(ConflictKind... kinds) Deprecated.This predicate can be used to check whether a diff is in a conflict directly or indirectly.A diff is directly in a conflict if it
has a conflict
. A diff is indirectly in a conflict, if one of its refining diffs is in a conflict.- Parameters:
kinds
- Type(s) of the conflict(s) we seek.- Returns:
- The created predicate.
- Since:
- 3.4
-
hasNoDirectOrIndirectConflict
public static com.google.common.base.Predicate<? super Diff> hasNoDirectOrIndirectConflict(ConflictKind... kinds) Deprecated.This predicate can be used to check whether a diff is not in a conflict directly or indirectly.A diff is directly in a conflict if it
has a conflict
. A diff is indirectly in a conflict, if one of its refining diffs is in a conflict.- Parameters:
kinds
- Type(s) of the conflict(s) we seek.- Returns:
- The created predicate.
- Since:
- 3.4
-
isAdditiveConflict
Deprecated.Predicate to test whether a conflict is additive or not.- Returns:
- A predicate that returns
true
for additive conflicts. - Since:
- 3.5
-
guavaToJava
Deprecated.Guava predicates and functions are only aligned in recent versions of Guava. This is necessary to maintain compatibility with guava 15 and can be removed as soon as we drop compatibility with older guava versions.- Type Parameters:
T
- the type of element this predicate applies to.- Parameters:
guava
- The guava predicate.- Returns:
- The java predicate.
-