Interface IDiffRelationshipComputer
- All Known Implementing Classes:
CachingDiffRelationshipComputer
,DiffRelationshipComputer
- Since:
- 3.5
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetAllResultingMerges
(Diff diff, boolean rightToLeft) Retrieves the set of all diffs related to the givendiff
when merging in the given direction.getAllResultingMerges
(Diff diff, boolean rightToLeft, com.google.common.base.Predicate<? super Diff> filter) Retrieves the set of all diffs related to the givendiff
when merging in the given direction.getAllResultingRejections
(Diff diff, boolean mergeRightToLeft) Retrieves the set of all diffs that will be rejected if the givendiff
is merged, either because of unresolveable conflicts or because of unreachable requirements.getAllResultingRejections
(Diff diff, boolean mergeRightToLeft, com.google.common.base.Predicate<? super Diff> filter) Retrieves the set of all diffs that will be rejected if the givendiff
is merged, either because of unresolveable conflicts or because of unreachable requirements.getDirectMergeDependencies
(Diff diff, boolean mergeRightToLeft) Retrieves the set of directly required diffs needed in order to merge the givendiff
.getDirectResultingMerges
(Diff diff, boolean mergeRightToLeft) Returns all differences that will be merged because of our merging the givendiff
.getDirectResultingRejections
(Diff diff, boolean mergeRightToLeft) Returns the set of all differences that need to be rejected ifdiff
is merged in the given direction.Returns the merge criterion considered for calculating the diff relationships.Returns the best-fitting merger for the given diff according to themerger registry
and themerge criterion
.Returns the merger registry used for calculating the diff relationships.boolean
Indicates whether a best-fitting merger for the given diff is available.void
setMergeCriterion
(IMergeCriterion mergeCriterion) Sets the merge criterion considered for calculating the diff relationships.void
setMergerRegistry
(IMerger.Registry mergerRegistry) Sets the merger registry used for calculating the diff relationships.
-
Method Details
-
getDirectMergeDependencies
Retrieves the set of directly required diffs needed in order to merge the givendiff
. This may includes the diff's requirements or any other diff that we need to merge before the given one.- Parameters:
diff
- The difference for which we seek the direct merge dependencies.mergeRightToLeft
- The direction in which we're considering a merge.- Returns:
- A non-null set of direct merge dependencies.
- See Also:
-
getDirectResultingMerges
Returns all differences that will be merged because of our merging the givendiff
. This may include the diff's implications, the diff's equivalences, the diff's refinements or any other diff that we need to merge together with the given diff.- Parameters:
diff
- The difference for which we seek the direct merge dependencies.mergeRightToLeft
- The direction in which we're considering a merge.- Returns:
- A non-null set of direct resulting merges.
- See Also:
-
getDirectResultingRejections
Returns the set of all differences that need to be rejected ifdiff
is merged in the given direction.- Parameters:
diff
- The difference for which we seek the direct resulting rejections.mergeRightToLeft
- The direction in which we're considering a merge.- Returns:
- A non-null set of direct resulting rejections.
- See Also:
-
getAllResultingMerges
Retrieves the set of all diffs related to the givendiff
when merging in the given direction.This is expected to return the set of all differences that will be need to merged along when a user wishes to merge
diff
, either because they are required by it or because they are implied by it one way or another.Note that
diff
will be included in the returned set.Also note that the resulting merges will contain the resulting rejections (diffs from the other side that will be rejected)
- Parameters:
diff
- The difference for which we seek all related ones.rightToLeft
- The direction in which we're considering a merge.- Returns:
- A non-null set of all diffs related to the given
diff
when merging in the given direction.
-
getAllResultingMerges
Set<Diff> getAllResultingMerges(Diff diff, boolean rightToLeft, com.google.common.base.Predicate<? super Diff> filter) Retrieves the set of all diffs related to the givendiff
when merging in the given direction.This is expected to return the set of all differences that will be need to merged along when a user wishes to merge
diff
, either because they are required by it or because they are implied by it one way or another.Note that
diff
will be included in the returned set.Also note that the resulting merges will contain the resulting rejections (diffs from the other side that will be rejected)
- Parameters:
diff
- The difference for which we seek all related ones.rightToLeft
- The direction in which we're considering a merge.filter
- The filter to control which diffs are visted when collecting the result.- Returns:
- A non-null set of all diffs related to the given
diff
when merging in the given direction.
-
getAllResultingRejections
Retrieves the set of all diffs that will be rejected if the givendiff
is merged, either because of unresolveable conflicts or because of unreachable requirements.- Parameters:
diff
- The difference for which we seek all opposite ones.mergeRightToLeft
- The direction in which we're considering a merge.- Returns:
- A non-null set of all diffs that will be rejected if the given
diff
is merged in the given direction.
-
getAllResultingRejections
Set<Diff> getAllResultingRejections(Diff diff, boolean mergeRightToLeft, com.google.common.base.Predicate<? super Diff> filter) Retrieves the set of all diffs that will be rejected if the givendiff
is merged, either because of unresolveable conflicts or because of unreachable requirements.- Parameters:
diff
- The difference for which we seek all opposite ones.mergeRightToLeft
- The direction in which we're considering a merge.filter
- The filter to control which diffs are visted when collecting the result.- Returns:
- A non-null set of all diffs that will be rejected if the given
diff
is merged in the given direction.
-
getMergerRegistry
IMerger.Registry getMergerRegistry()Returns the merger registry used for calculating the diff relationships.- Returns:
- The merger registry.
-
setMergerRegistry
Sets the merger registry used for calculating the diff relationships.- Parameters:
mergerRegistry
- The merger registry.
-
getMergeCriterion
IMergeCriterion getMergeCriterion()Returns the merge criterion considered for calculating the diff relationships.- Returns:
- The merge criterion.
-
setMergeCriterion
Sets the merge criterion considered for calculating the diff relationships.- Parameters:
mergeCriterion
- The merger criterion.
-
getMerger
Returns the best-fitting merger for the given diff according to themerger registry
and themerge criterion
.- Parameters:
diff
- The difference for which we seek the merger.- Returns:
- The best-fitting merger for the given diff or null if no merger fits.
-
hasMerger
Indicates whether a best-fitting merger for the given diff is available.- Parameters:
diff
- The difference for which we seek the merger.- Returns:
- Returns true if a best-fitting merger is available, false otherwise.
-