public class IndexRelation extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
GAP
This value returned as an index indicates that there is a gap in the associated sequence.
|
static int |
OUT_OF_RANGE
This value returned as an index indicates that the position specified to obtain lies outside
the parts of the two sequences that are aligned with each other.
|
Constructor and Description |
---|
IndexRelation(int before,
int corresponding,
int after) |
Modifier and Type | Method and Description |
---|---|
int |
getAfter()
|
int |
getAfterValidIndex()
Returns any index that is not
GAP or OUT_OF_RANGE and first tries getCorresponding()
than getAfter() and finally getBefore() . |
int |
getBefore()
|
int |
getBeforeValidIndex()
Returns any index that is not
GAP or OUT_OF_RANGE and first tries getCorresponding()
than getBefore() and finally getAfter() . |
int |
getCorresponding()
Returns the position corresponding to the one specified to obtain this result object.
|
java.lang.String |
indexToString(int index) |
java.lang.String |
toString() |
public static final int GAP
public static final int OUT_OF_RANGE
public IndexRelation(int before, int corresponding, int after)
public int getBefore()
getCorresponding()
returns GAP
or OUT_OF_RANGE
. In that case
it returns the first index in the corresponding sequence that is aligned with a position in the original sequence, that
is located before the specified position of the original sequence that produced this result.OUT_OF_RANGE
but never GAP
public int getCorresponding()
GAP
if the specified index producing this result object is aligned with a
gap in the other sequence or OUT_OF_RANGE
if the specified index lies outside the aligned areapublic int getAfter()
getCorresponding()
returns GAP
or OUT_OF_RANGE
. In that case
it returns the first index in the corresponding sequence that is aligned with a position in the original sequence, that
is located after the specified position of the original sequence that produced this result.OUT_OF_RANGE
but never GAP
public int getBeforeValidIndex()
GAP
or OUT_OF_RANGE
and first tries getCorresponding()
than getBefore()
and finally getAfter()
.getAfter()
if all
indices should be invalidpublic int getAfterValidIndex()
GAP
or OUT_OF_RANGE
and first tries getCorresponding()
than getAfter()
and finally getBefore()
.getBefore()
if all
indices should be invalidpublic java.lang.String indexToString(int index)
public java.lang.String toString()
toString
in class java.lang.Object