Interface BioMatcher

All Known Implementing Classes:
MaxMismatchMatcher

public interface BioMatcher
Interface for things that perform matches.

These will almost always be produced by a factory method on a BioPattern object.

Author:
Matthew Pocock
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    end()
    Get the last symbol index that matches the pattern.
    boolean
    Attempt to find the next match.
    Get the matching region as a SymbolList.
    int
    Get the first symbol index that matches the pattern.
  • Method Details

    • find

      boolean find()
      Attempt to find the next match.

      If the pattern can be found, then this will return true. If it could not, then it will return false. This is convenient within for or while loops.

      Each time this is called, the next match will be found. The start() and end() values will increase each time, regardless of wether you called any other methods.

      Returns:
      true if there is another match
    • start

      int start()
      Get the first symbol index that matches the pattern.
      Returns:
      the start of the current match
      Throws:
      IllegalStateException - if there is no current match
    • end

      int end()
      Get the last symbol index that matches the pattern.
      Returns:
      the end of the current match
      Throws:
      IllegalStateException - if there is no current match
    • group

      Get the matching region as a SymbolList.
      Returns:
      the matching symbols
      Throws:
      IllegalStateException - if there is no current match