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 Diffs from an iterable.
  • Constructor Details

    • EMFCompareJavaPredicates

      public EMFCompareJavaPredicates()
  • Method Details

    • 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.