|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jgit.diff.Sequence
org.eclipse.jgit.diff.Subsequence<S>
S - the base sequence type.public final class Subsequence<S extends Sequence>
Wraps a Sequence to have a narrower range of elements.
This sequence acts as a proxy for the real sequence, translating element
indexes on the fly by adding begin to them. Sequences of this type
must be used with a SubsequenceComparator.
| Constructor Summary | |
|---|---|
Subsequence(S base,
int begin,
int end)
Construct a subset of another sequence. |
|
| Method Summary | ||
|---|---|---|
static
|
a(S a,
Edit region)
Construct a subsequence around the A region/base sequence. |
|
static
|
b(S b,
Edit region)
Construct a subsequence around the B region/base sequence. |
|
int |
size()
|
|
static
|
toBase(EditList edits,
Subsequence<S> a,
Subsequence<S> b)
Adjust the Edits to reflect positions in the base sequence. |
|
static
|
toBase(Edit e,
Subsequence<S> a,
Subsequence<S> b)
Adjust the Edit to reflect positions in the base sequence. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Subsequence(S base,
int begin,
int end)
end - begin.
base - the real sequence.begin - First element index of base that will be part of this
new subsequence. The element at begin will be this
sequence's element 0.end - One past the last element index of base that will be
part of this new subsequence.| Method Detail |
|---|
public static <S extends Sequence> Subsequence<S> a(S a,
Edit region)
S - the base sequence type.a - the A sequence.region - the region of a to create a subsequence around.
base as described by A in region.
public static <S extends Sequence> Subsequence<S> b(S b,
Edit region)
S - the base sequence type.b - the B sequence.region - the region of b to create a subsequence around.
base as described by B in region.
public static <S extends Sequence> void toBase(Edit e,
Subsequence<S> a,
Subsequence<S> b)
S - the base sequence type.e - edit to adjust in-place. Prior to invocation the indexes are
in terms of the two subsequences; after invocation the indexes
are in terms of the base sequences.a - the A sequence.b - the B sequence.
public static <S extends Sequence> EditList toBase(EditList edits,
Subsequence<S> a,
Subsequence<S> b)
S - the base sequence type.edits - edits to adjust in-place. Prior to invocation the indexes are
in terms of the two subsequences; after invocation the indexes
are in terms of the base sequences.a - the A sequence.b - the B sequence.
edits (as the list was updated in-place).public int size()
size in class Sequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||