Top Description Constructors Methods
org.eclipse.jgit.diff

public abstract Class LowLevelDiffAlgorithm

extends DiffAlgorithm
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.diff.HistogramDiff

Compares two sequences primarily based upon hash codes.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <S extends Sequence> EditList
diffNonCommon(SequenceComparator<? super S>
the comparator supplying the element equivalence function.
cmp
,
S
the first (also known as old or pre-image) sequence. Edits returned by this algorithm will reference indexes using the 'A' side: org.eclipse.jgit.diff.Edit#getBeginA(), org.eclipse.jgit.diff.Edit#getEndA().
a
,
S
the second (also known as new or post-image) sequence. Edits returned by this algorithm will reference indexes using the 'B' side: org.eclipse.jgit.diff.Edit#getBeginB(), org.eclipse.jgit.diff.Edit#getEndB().
b
)

Implements abstract org.eclipse.jgit.diff.DiffAlgorithm.diffNonCommon.

Compare two sequences and identify a list of edits between them.

public abstract <
type of Sequence compared
S extends Sequence
>
void
diffNonCommon(EditList
result list to append the region's edits onto.
edits
,
HashedSequenceComparator<S>
the comparator supplying the element equivalence function.
cmp
,
HashedSequence<S>
the first (also known as old or pre-image) sequence. Edits returned by this algorithm will reference indexes using the 'A' side: org.eclipse.jgit.diff.Edit#getBeginA(), org.eclipse.jgit.diff.Edit#getEndA().
a
,
HashedSequence<S>
the second (also known as new or post-image) sequence. Edits returned by this algorithm will reference indexes using the 'B' side: org.eclipse.jgit.diff.Edit#getBeginB(), org.eclipse.jgit.diff.Edit#getEndB().
b
,
Edit
the region being compared within the two sequences.
region
)

Compare two sequences and identify a list of edits between them.

Inherited from org.eclipse.jgit.diff.DiffAlgorithm:
diffgetAlgorithm

Constructor Detail

LowLevelDiffAlgorithmback to summary
public LowLevelDiffAlgorithm()

Method Detail

diffNonCommonback to summary
public <S extends Sequence> EditList diffNonCommon(SequenceComparator<? super S> cmp, S a, S b)

Implements abstract org.eclipse.jgit.diff.DiffAlgorithm.diffNonCommon.

Doc from org.eclipse.jgit.diff.DiffAlgorithm.diffNonCommon.

Compare two sequences and identify a list of edits between them. This method should be invoked only after the two sequences have been proven to have no common starting or ending elements. The expected elimination of common starting and ending elements is automatically performed by the diff(SequenceComparator, Sequence, Sequence) method, which invokes this method using org.eclipse.jgit.diff.Subsequences.

Parameters
<S>
type of sequence being compared.
cmp:SequenceComparator<? super S>

the comparator supplying the element equivalence function.

a:S

the first (also known as old or pre-image) sequence. Edits returned by this algorithm will reference indexes using the 'A' side: org.eclipse.jgit.diff.Edit#getBeginA(), org.eclipse.jgit.diff.Edit#getEndA().

b:S

the second (also known as new or post-image) sequence. Edits returned by this algorithm will reference indexes using the 'B' side: org.eclipse.jgit.diff.Edit#getBeginB(), org.eclipse.jgit.diff.Edit#getEndB().

Returns:EditList

a modifiable edit list comparing the two sequences.

Annotations
@Override
diffNonCommonback to summary
public abstract <S extends Sequence> void 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. This method should be invoked only after the two sequences have been proven to have no common starting or ending elements. The expected elimination of common starting and ending elements is automatically performed by the diff(SequenceComparator, Sequence, Sequence) method, which invokes this method using org.eclipse.jgit.diff.Subsequences.

Parameters
<S>
type of Sequence compared
edits:EditList

result list to append the region's edits onto.

cmp:HashedSequenceComparator<S>

the comparator supplying the element equivalence function.

a:HashedSequence<S>

the first (also known as old or pre-image) sequence. Edits returned by this algorithm will reference indexes using the 'A' side: org.eclipse.jgit.diff.Edit#getBeginA(), org.eclipse.jgit.diff.Edit#getEndA().

b:HashedSequence<S>

the second (also known as new or post-image) sequence. Edits returned by this algorithm will reference indexes using the 'B' side: org.eclipse.jgit.diff.Edit#getBeginB(), org.eclipse.jgit.diff.Edit#getEndB().

region:Edit

the region being compared within the two sequences.