org.eclipse.emf.compare.utils

## Class EMFCompareJavaPredicates

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

    public final class EMFCompareJavaPredicates
    extends Object

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

### Constructor Summary

Constructors
Constructor and Description
`EMFCompareJavaPredicates()`

### Method Summary

All Methods Static Methods Concrete Methods
`static Predicate<? super Diff>` `ofKind(DifferenceKind... kind)` This predicate can be used to check whether a particular diff is of the given `kind`.
`static Predicate<Diff>` `onFeature(EStructuralFeature feature)` Accept only diffs that inherit either AttributeChange, ReferenceChange, or FeatureMapChange that concern the given feature.
`static Predicate<Diff>` `possiblyConflictingWith(Diff diff)` Predicate builder for diffs that can conflict with the given diff.
`static Predicate<Diff>` `valueMatches(IEqualityHelper helper, Object value)` Accept only diffs whose value matches the given value.

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

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

### Constructor Detail

#### EMFCompareJavaPredicates

    public EMFCompareJavaPredicates()

### Method Detail

#### possiblyConflictingWith

    public static 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.

#### ofKind

    public static 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.

#### onFeature

    public static 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.

#### valueMatches

    public static 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.