Class EndGapsHelper


  • public class EndGapsHelper
    extends java.lang.Object
    Calculates, and provides a method to determine whether residues in a set of sequences are end gaps. End gaps are gaps at either end of the sequence. This is useful in situations where we want to treat end gaps differently from internal gaps.
    • Constructor Summary

      Constructors 
      Constructor Description
      EndGapsHelper​(java.lang.CharSequence[] residues, boolean freeEndGaps)
      Construct some new end gaps.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEndGap​(int sequenceIndex, int residueIndex)
      Is this residue an end gap? End gaps are gaps at either end of the sequence.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EndGapsHelper

        public EndGapsHelper​(java.lang.CharSequence[] residues,
                             boolean freeEndGaps)
        Construct some new end gaps.
        Parameters:
        residues - each CharSequence represents a single sequence. The CharSequences do not have to be all the same length. This parameter is used only for the duration of this method, and is not recorded for future use.
        freeEndGaps - if this is false, then all calls to isEndGap(int, int) will return false. Useful in situations where we do not have free end gaps.
    • Method Detail

      • isEndGap

        public boolean isEndGap​(int sequenceIndex,
                                int residueIndex)
        Is this residue an end gap? End gaps are gaps at either end of the sequence.
        Parameters:
        sequenceIndex - the index of the sequence in the range [0,n-1]
        residueIndex - the index of the residue in the range [0,n-1]
        Returns:
        true if this residue an end gap.