org.eclipse.jgit.diff.Sequence compared by
difference algorithm.
Difference algorithms can use a comparator to compare portions of two sequences and discover the minimal edits required to transform from one sequence to the other sequence.
Indexes within a sequence are zero-based.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: true if the two items are identical according to this function's equivalence rule.the first sequence. a, int item of ai, S ai to compare.the second sequence. b, int item of bi)bi to compare.Compare two items to determine if they are equivalent. |
| public abstract int | Returns: hash the hash value.the sequence. seq, int the item to obtain the hash for. ptr)Get a hash value for an item in a sequence. |
| public Edit | Returns: e if it was updated in-place, otherwise a new edit
containing the reduced region.the first sequence. a, S the second sequence. b, Edit the edit to start with and update. e)Modify the edit to remove common leading and trailing items. |
| SequenceComparator | back to summary |
|---|---|
| public SequenceComparator() | |
| equals | back to summary |
|---|---|
| public abstract boolean equals(S a, int ai, S b, int bi) Compare two items to determine if they are equivalent.
It is permissible to compare sequence
| |
| hash | back to summary |
|---|---|
| public abstract int hash(S seq, int ptr) Get a hash value for an item in a sequence.
If two items are equal according to this comparator's
| |
| reduceCommonStartEnd | back to summary |
|---|---|
| public Edit reduceCommonStartEnd(S a, S b, Edit e) Modify the edit to remove common leading and trailing items.
The supplied edit | |