Package org.eclipse.emf.compare.utils
Class EMFCompareJavaPredicates
- java.lang.Object
-
- org.eclipse.emf.compare.utils.EMFCompareJavaPredicates
-
-
Constructor Summary
Constructors Constructor Description EMFCompareJavaPredicates()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicate<? super Diff>ofKind(DifferenceKind... kind)This predicate can be used to check whether a particular diff is of the givenkind.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.
-
-
-
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 givenkind. 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 valuesvalue- The value to match- Returns:
- The created predicate.
-
-