org.eclipse.emf.compare.utils

## Class EMFComparePredicates

- java.lang.Object
- - org.eclipse.emf.compare.utils.EMFComparePredicates

    public final class EMFComparePredicates
    extends Object

This class will provide a number of Predicates that can be used to retrieve particular `Diff`s from an iterable.

### Field Summary

Fields
`static com.google.common.base.Predicate<? super Diff>` `CONTAINMENT_REFERENCE_CHANGE` This can be used to check whether a given diff is a containment reference change.
`static com.google.common.base.Predicate<? super EObject>` `IS_EGENERIC_TYPE_WITHOUT_PARAMETERS` Predicate used to know if the given EObject is an EGenericType without eTypeArguments.
`static com.google.common.base.Predicate<? super Diff>` `WITHOUT_CONFLICT` This can be used to test whether a given Diff has no conflict object associated.

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static com.google.common.base.Predicate<? super Diff>` `added(String qualifiedName)` 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)` This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued attribute going by `attributeName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `addedToReference(String qualifiedName, String referenceName, String addedQualifiedName)` This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `addedToReference(String qualifiedName, String referenceName, String addedQualifiedName, EStructuralFeature featureDelegateForAddedName)` This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<Diff>` `allAtomicRefining(com.google.common.base.Predicate<? super Diff> predicate)` 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)` 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)` 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)` This predicate can be used to check whether a given Diff describes an AttributeChange with the given `attributeName` and which changed value corresponds to the given `expectedValue`.
`static com.google.common.base.Predicate<Diff>` `canBeConsideredAsPseudoConflicting()` 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)` This predicate can be used to check whether a given Diff represents the modification of a single-valued attribute going by the given `attributeName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `changedReference(String qualifiedName, String referenceName, String fromQualifiedName, String toQualifiedName)` This predicate can be used to check whether a given Diff represents the modification of a single-valued reference going by the given `referenceName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `containmentReferenceChange()` Deprecated. use `CONTAINMENT_REFERENCE_CHANGE`;
`static com.google.common.base.Predicate<? super Conflict>` `containsConflictOfTypes(ConflictKind... kinds)` 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)` This can be used to check that a given Diff originates from the given `source` side.
`static <T> Predicate<T>` `guavaToJava(com.google.common.base.Predicate<T> guava)` Guava predicates and functions are only aligned in recent versions of Guava.
`static com.google.common.base.Predicate<? super Diff>` `hasConflict(ConflictKind... kinds)` 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)` 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)` 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>` `hasSameReferenceAs(ReferenceChange diff)` This predicate can be used to check whether a given Diff is a `ReferenceChange` with the same reference as the `diff` argument.
`static com.google.common.base.Predicate<? super Diff>` `hasState(DifferenceState... states)` 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>` `isAdditiveConflict()` Predicate to test whether a conflict is additive or not.
`static com.google.common.base.Predicate<Diff>` `isDiffOnEOppositeOf(ReferenceChange diff)` This predicate can be used to check whether a given Diff is a `ReferenceChange` representing the eOpposite of the `diff` argument.
`static com.google.common.base.Predicate<Diff>` `isEquivalentTo(Diff diff)` This predicate can be used to check whether a given Diff is equivalent to the `diff` argument.
`static com.google.common.base.Predicate<Diff>` `isInRealAddAddConflict()` Indicates whether a diff is part of a real add/add conflict.
`static com.google.common.base.Predicate<Diff>` `isNotRefinedDirectlyConflicting(ConflictKind... kinds)` 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>` `moved(String qualifiedName, String referenceName)` 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)` This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued attribute going by `attributeName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `movedInReference(String qualifiedName, String referenceName, String removedQualifiedName)` This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `ofKind(DifferenceKind kind)` This predicate can be used to check whether a particular diff is of the given `kind`.
`static com.google.common.base.Predicate<Diff>` `ofKind(DifferenceKind kind1, DifferenceKind kind2)` Accept only diffs of the given kinds.
`static com.google.common.base.Predicate<? super Diff>` `onEObject(EObject eObject)` 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>` `onEObject(String qualifiedName)` 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)` 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<Diff>` `onFeature(EStructuralFeature feature)` Accept only diffs that inherit either AttributeChange, ReferenceChange, or FeatureMapChange that concern the given feature.
`static com.google.common.base.Predicate<? super Diff>` `onFeature(String featureName)` This can be used to check that a given Diff correspond to either an `AttributeChange`, a `FeatureMapChange` or a `ReferenceChange`, and that the corresponding reference or attribute matches the given `featureName`.
`static com.google.common.base.Predicate<Diff>` `possiblyConflictingWith(Diff diff)` 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)` This predicate can be used to check whether a given Diff describes a ReferenceChange with the given `referenceName` and which changed value corresponds to the given `qualifiedName`.

`static com.google.common.base.Predicate<? super Diff>`

`referenceValueMatch(String referenceName, String qualifiedName, boolean multiValued, EStructuralFeature featureDelegate)`
This predicate can be used to check whether a given Diff describes a ReferenceChange with the given `referenceName` and which changed value corresponds to the given `qualifiedName` or the qualified name under the given `featureDelegate`.

`static com.google.common.base.Predicate<? super Diff>` `removed(String qualifiedName)` 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)` This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued attribute going by `attributeName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `removedFromReference(String qualifiedName, String referenceName, String removedQualifiedName)` This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<? super Diff>` `removedFromReference(String qualifiedName, String referenceName, String removedQualifiedName, EStructuralFeature featureDelegateForRemovedName)` This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.
`static com.google.common.base.Predicate<Diff>` `sameSideAs(Diff diff)` This can be used to check that a given Diff originates from the given `source` side.
`static com.google.common.base.Predicate<? super Diff>` `valueIs(Object expectedValue)` This predicate can be used in order to check that a particular Diff describes either a `ReferenceChange`, `AttributeChange` or `FeatureMapChange` for the given `expectedValue`.
`static com.google.common.base.Predicate<Diff>` `valueMatches(IEqualityHelper helper, Object value)` Accept only diffs whose value matches the given value.
`static com.google.common.base.Predicate<? super Diff>` `valueNameMatches(String expectedName)` This can be used to check whether a given Diff describes either a `ReferenceChange` on an EObject which name is `expectedName`.
`static com.google.common.base.Predicate<? super Diff>` `valueNameMatches(String expectedName, EStructuralFeature featureDelegate)` This can be used to check whether a given Diff describes either a `ReferenceChange` on an EObject which name is `expectedName` or which the given feature provides the `expectedName`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### WITHOUT_CONFLICT

    public static final com.google.common.base.Predicate<? super Diff> WITHOUT_CONFLICT

This can be used to test whether a given Diff has no conflict object associated.

Since:
  3.1

#### CONTAINMENT_REFERENCE_CHANGE

    public static final com.google.common.base.Predicate<? super Diff> CONTAINMENT_REFERENCE_CHANGE

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_PARAMETERS

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 Detail

#### changedReference

    public static com.google.common.base.Predicate<? super Diff> changedReference(String qualifiedName,
                                                                                  String referenceName,
                                                                                  String fromQualifiedName,
                                                                                  String toQualifiedName)

This predicate can be used to check whether a given Diff represents the modification of a single-valued reference going by the given `referenceName` on an EObject which name matches `qualifiedName`. This can be used both on three-way and two-way Diffs : if three-way, we'll consider that the `fromQualifiedName` can be either one of the right or origin values, and the `toQualifiedName` to be either left or right. on two-way diffs however, `fromQualifiedName` can only be the right value, and `toQualifiedName` 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)

This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued attribute going by `attributeName` on an EObject which name matches `qualifiedName`.

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)

This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.

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)

This predicate can be used to check whether a given Diff represents the addition of a value in a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.

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)

This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued attribute going by `attributeName` on an EObject which name matches `qualifiedName`.

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)

This predicate can be used to check whether a given Diff represents the moving of a value within a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.

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

    public static com.google.common.base.Predicate<Diff> isDiffOnEOppositeOf(ReferenceChange diff)

This predicate can be used to check whether a given Diff is a `ReferenceChange` representing the eOpposite of the `diff` argument.

Parameters:
  `diff` - The `ReferenceChange` against which is checked if an eOpposite relation exists.
Returns:
  The created predicate.
Since:
  3.2

#### isEquivalentTo

    public static com.google.common.base.Predicate<Diff> isEquivalentTo(Diff diff)

This predicate can be used to check whether a given Diff is equivalent to the `diff` argument.

Parameters:
  `diff` - The `ReferenceChange` against which is checked if an equivalence relation exists.
Returns:
  The created predicate.
Since:
  3.2

#### hasSameReferenceAs

    public static com.google.common.base.Predicate<Diff> hasSameReferenceAs(ReferenceChange diff)

This predicate can be used to check whether a given Diff is a `ReferenceChange` with the same reference as the `diff` argument.

Parameters:
  `diff` - The `ReferenceChange` 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)

This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued attribute going by `attributeName` on an EObject which name matches `qualifiedName`.

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

    public static com.google.common.base.Predicate<Diff> isInRealAddAddConflict()

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)

This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.

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)

This predicate can be used to check whether a given Diff represents the deletion of a value from a multi-valued reference going by `referenceName` on an EObject which name matches `qualifiedName`.

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)

This predicate can be used to check whether a given Diff represents the modification of a single-valued attribute going by the given `attributeName` on an EObject which name matches `qualifiedName`. This can be used both on three-way and two-way Diffs : if three-way, we'll consider that the `fromValue` can be either one of the right or origin values, and the `toValue` to be either left or right. on two-way diffs however, `fromValue` can only be the right value, and `toValue` 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

    public static com.google.common.base.Predicate<? super Diff> added(String qualifiedName)

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 that `added("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)

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

    public static com.google.common.base.Predicate<? super Diff> removed(String qualifiedName)

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 that `removed("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

    public static com.google.common.base.Predicate<? super Diff> onFeature(String featureName)

This can be used to check that a given Diff correspond to either an `AttributeChange`, a `FeatureMapChange` or a `ReferenceChange`, and that the corresponding reference or attribute matches the given `featureName`.

Parameters:
  `featureName` - Name of the feature on which we expect a change.
Returns:
  The created predicate.

#### onFeature

    public static com.google.common.base.Predicate<Diff> onFeature(EStructuralFeature feature)

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

    public static com.google.common.base.Predicate<? super Diff> fromSide(DifferenceSource source)

This can be used to check that a given Diff originates from the given `source` side.

Parameters:
  `source` - The side from which we expect this diff to originate.
Returns:
  The created predicate.

#### sameSideAs

    public static com.google.common.base.Predicate<Diff> sameSideAs(Diff diff)

This can be used to check that a given Diff originates from the given `source` side.

Parameters:
  `diff` - The diff the side of which will be used to filter.
Returns:
  The created predicate.

#### onEObject

    public static com.google.common.base.Predicate<? super Diff> onEObject(EObject eObject)

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

    public static com.google.common.base.Predicate<? super Diff> onEObject(String qualifiedName)

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)

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

    public static com.google.common.base.Predicate<? super Diff> ofKind(DifferenceKind kind)

This predicate can be used to check whether a particular diff is of the given `kind`. 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)

Accept only diffs of the given kinds.

Parameters:
  `kind1` - first kind of diff to accept
  `kind2` - second kind of diff to accept
Returns:
  The created predicate.

#### valueMatches

    public static com.google.common.base.Predicate<Diff> valueMatches(IEqualityHelper helper,
                                                                      Object value)

Accept only diffs whose value matches the given value.

Parameters:
  `helper` - The helper to match values
  `value` - The value to match
Returns:
  The created predicate.

#### valueIs

    public static com.google.common.base.Predicate<? super Diff> valueIs(Object expectedValue)

This predicate can be used in order to check that a particular Diff describes either a `ReferenceChange`, `AttributeChange` or `FeatureMapChange` for the given `expectedValue`.

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)

This predicate can be used to check whether a given Diff describes an AttributeChange with the given `attributeName` and which changed value corresponds to the given `expectedValue`.

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)

This predicate can be used to check whether a given Diff describes a ReferenceChange with the given `referenceName` and which changed value corresponds to the given `qualifiedName`.

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)

This predicate can be used to check whether a given Diff describes a ReferenceChange with the given `referenceName` and which changed value corresponds to the given `qualifiedName` or the qualified name under the given `featureDelegate`.

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

    public static com.google.common.base.Predicate<? super Diff> valueNameMatches(String expectedName)

This can be used to check whether a given Diff describes either a `ReferenceChange` on an EObject which name is `expectedName`.

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)

This can be used to check whether a given Diff describes either a `ReferenceChange` on an EObject which name is `expectedName` or which the given feature provides the `expectedName`.

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

    public static com.google.common.base.Predicate<? super Diff> hasConflict(ConflictKind... kinds)

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

    public static com.google.common.base.Predicate<? super Diff> hasState(DifferenceState... states)

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

    public static com.google.common.base.Predicate<Diff> possiblyConflictingWith(Diff diff)

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)

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. use `CONTAINMENT_REFERENCE_CHANGE`;
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)

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)

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)

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)

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

    public static com.google.common.base.Predicate<Diff> canBeConsideredAsPseudoConflicting()

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)

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)

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

    public static com.google.common.base.Predicate<Conflict> isAdditiveConflict()

Predicate to test whether a conflict is additive or not.

Returns:
  A predicate that returns `true` for additive conflicts.
Since:
  3.5

#### guavaToJava

    public static <T> Predicate<T> guavaToJava(com.google.common.base.Predicate<T> guava)

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.

Parameters:
  `guava` - The guava predicate.
Returns:
  The java predicate.