public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm
DiffAlgorithm.SupportedAlgorithm
Constructor and Description |
---|
LowLevelDiffAlgorithm() |
Modifier and Type | Method and Description |
---|---|
abstract <S extends Sequence> |
diffNonCommon(EditList edits,
HashedSequenceComparator<S> cmp,
HashedSequence<S> a,
HashedSequence<S> b,
Edit region)
Compare two sequences and identify a list of edits between them.
|
<S extends Sequence> |
diffNonCommon(SequenceComparator<? super S> cmp,
S a,
S b)
Compare two sequences and identify a list of edits between them.
|
diff, getAlgorithm
public <S extends Sequence> EditList diffNonCommon(SequenceComparator<? super S> cmp, S a, S b)
DiffAlgorithm.diff(SequenceComparator, Sequence, Sequence)
method, which invokes this method using
Subsequence
s.diffNonCommon
in class DiffAlgorithm
cmp
- the comparator supplying the element equivalence function.a
- the first (also known as old or pre-image) sequence. Edits
returned by this algorithm will reference indexes using the
'A' side: Edit.getBeginA()
,
Edit.getEndA()
.b
- the second (also known as new or post-image) sequence. Edits
returned by this algorithm will reference indexes using the
'B' side: Edit.getBeginB()
,
Edit.getEndB()
.public abstract <S extends Sequence> void diffNonCommon(EditList edits, HashedSequenceComparator<S> cmp, HashedSequence<S> a, HashedSequence<S> b, Edit region)
DiffAlgorithm.diff(SequenceComparator, Sequence, Sequence)
method, which invokes this method using
Subsequence
s.edits
- result list to append the region's edits onto.cmp
- the comparator supplying the element equivalence function.a
- the first (also known as old or pre-image) sequence. Edits
returned by this algorithm will reference indexes using the
'A' side: Edit.getBeginA()
,
Edit.getEndA()
.b
- the second (also known as new or post-image) sequence. Edits
returned by this algorithm will reference indexes using the
'B' side: Edit.getBeginB()
,
Edit.getEndB()
.region
- the region being compared within the two sequences.Copyright © 2019 Eclipse JGit Project. All rights reserved.