package jalview.datamodel; /** * An immutable object representing one or more residue and corresponding * alignment column positions for a sequence */ public class SequenceCursor { /** * the aligned sequence this cursor applies to */ public final SequenceI sequence; /** * residue position in sequence (start...), 0 if undefined */ public final int residuePosition; /** * column position (1...) corresponding to residuePosition, or 0 if undefined */ public final int columnPosition; /** * a token which may be used to check whether this cursor is still valid for * its sequence (allowing it to be ignored if the sequence has changed) */ public final int token; public SequenceCursor(SequenceI seq, int resPos, int column, int tok) { sequence = seq; residuePosition = resPos; columnPosition = column; token = tok; } }