Package org.eclipse.emf.compare.utils
Class EMFCompareJavaPredicates
java.lang.Object
org.eclipse.emf.compare.utils.EMFCompareJavaPredicates
This class will provide a number of Predicates that can be used to retrieve particular
Diff
s from
an iterable.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionofKind
(DifferenceKind... kind) This predicate can be used to check whether a particular diff is of the givenkind
.onFeature
(EStructuralFeature feature) Accept only diffs that inherit either AttributeChange, ReferenceChange, or FeatureMapChange that concern the given feature.possiblyConflictingWith
(Diff diff) Predicate builder for diffs that can conflict with the given diff.valueMatches
(IEqualityHelper helper, Object value) Accept only diffs whose value matches the given value.
-
Constructor Details
-
EMFCompareJavaPredicates
public EMFCompareJavaPredicates()
-
-
Method Details
-
possiblyConflictingWith
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
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
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
Accept only diffs whose value matches the given value.- Parameters:
helper
- The helper to match valuesvalue
- The value to match- Returns:
- The created predicate.
-