Package org.biojava.bio.search
Class MaxMismatchMatcher
- java.lang.Object
-
- org.biojava.bio.search.MaxMismatchMatcher
-
- All Implemented Interfaces:
BioMatcher
public class MaxMismatchMatcher extends Object implements BioMatcher
A BioMatcher class returned by MaxMismatchPattern.matcher() that implements searching of a SymbolList.This class is public only to allow access to the mismatchCount() method.
- Author:
- Matthew Pocock (wrote original MaxMissmatchMatcher class), David Huen (debugging and extension of functionality)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
end()
Get the last symbol index that matches the pattern.boolean
find()
Attempt to find the next match.SymbolList
group()
Get the matching region as a SymbolList.int
mismatchCount()
Returns number of mismatchesint
start()
Get the first symbol index that matches the pattern.
-
-
-
Method Detail
-
find
public boolean find()
Description copied from interface:BioMatcher
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.
- Specified by:
find
in interfaceBioMatcher
- Returns:
- true if there is another match
-
start
public int start()
Description copied from interface:BioMatcher
Get the first symbol index that matches the pattern.- Specified by:
start
in interfaceBioMatcher
- Returns:
- the start of the current match
-
end
public int end()
Description copied from interface:BioMatcher
Get the last symbol index that matches the pattern.- Specified by:
end
in interfaceBioMatcher
- Returns:
- the end of the current match
-
group
public SymbolList group()
Description copied from interface:BioMatcher
Get the matching region as a SymbolList.- Specified by:
group
in interfaceBioMatcher
- Returns:
- the matching symbols
-
mismatchCount
public int mismatchCount()
Returns number of mismatches
-
-