public boolean advance() {
        // Stack / register variable for performance
        int mut = mutationsPointer >= 0 ? mutations.getMutation(mutationsPointer) : NON_MUTATION;

        // This if is required to process all non-insertions with the same
        // position, before other mutation types and match
        if (getRawTypeCode(mut) == RAW_MUTATION_TYPE_INSERTION)
            mut = getPosition(mut) != seq1Position ? NON_MUTATION : mut;
        else if (getPosition(mut) != seq1Position - 1)
            mut = NON_MUTATION;

        if (mut != NON_MUTATION) {
            switch (Mutation.getRawTypeCode(mut)) {
                case RAW_MUTATION_TYPE_SUBSTITUTION:
                    --seq1Position;
                    --seq2Position;
                    break;

                case RAW_MUTATION_TYPE_DELETION:
                    --seq1Position;
                    break;

                case RAW_MUTATION_TYPE_INSERTION:
                    --seq2Position;
                    break;
            }
            --mutationsPointer;
        } else {
            --seq1Position;
            --seq2Position;
        }

        currentMutation = mut;

        return seq1Position >= seq1From;
    }
public boolean advance ( ) { int mut = mutationsPointer >= 0 ? mutations . getMutation ( mutationsPointer ) : NON_MUTATION ; if ( getRawTypeCode ( mut ) == RAW_MUTATION_TYPE_INSERTION ) mut = getPosition ( mut ) != seq1Position ? NON_MUTATION : mut ; else if ( getPosition ( mut ) != seq1Position - 1 ) mut = NON_MUTATION ; if ( mut != NON_MUTATION ) { switch ( Mutation . getRawTypeCode ( mut ) ) { case RAW_MUTATION_TYPE_SUBSTITUTION : -- seq1Position ; -- seq2Position ; break ; case RAW_MUTATION_TYPE_DELETION : -- seq1Position ; break ; case RAW_MUTATION_TYPE_INSERTION : -- seq2Position ; break ; } -- mutationsPointer ; } else { -- seq1Position ; -- seq2Position ; } currentMutation = mut ; return seq1Position >= seq1From ; }
Advance to the next alignment position

@return {@literal true} if iteration successful; {@literal false} if iteration ended