|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Sequence
Arbitrary sequence of elements with fast comparison support.
A sequence of elements is defined to contain elements in the index range
[0, , like a standard Java List implementation.
Unlike a List, the members of the sequence are not directly obtainable, but
element equality can be tested if two Sequences are the same implementation.
size())
An implementation may chose to implement the equals semantic as necessary, including fuzzy matching rules such as ignoring insignificant sub-elements, e.g. ignoring whitespace differences in text.
Implementations of Sequence are primarily intended for use in content
difference detection algorithms, to produce an EditList of
Edit instances describing how two Sequence instances differ.
| Method Summary | |
|---|---|
boolean |
equals(int thisIdx,
Sequence other,
int otherIdx)
Determine if the i-th member is equal to the j-th member. |
int |
size()
|
| Method Detail |
|---|
int size()
boolean equals(int thisIdx,
Sequence other,
int otherIdx)
Implementations must ensure equals(thisIdx,other,otherIdx)
returns the same as other.equals(otherIdx,this,thisIdx).
thisIdx - index within this sequence; must be in the range
[ 0, this.size() ).other - another sequence; must be the same implementation class, that
is this.getClass() == other.getClass().otherIdx - index within other sequence; must be in the range
[ 0, other.size() ).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||