|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.regex.Search
public class Search
A utility class to make searching a Sequence with many regex patterns easier.
| Nested Class Summary | |
|---|---|
static interface |
Search.Listener
Interface for a class that will recieve match information from this class. |
| Constructor Summary | |
|---|---|
Search(FiniteAlphabet alfa)
|
|
| Method Summary | |
|---|---|
void |
addPattern(String patternString,
boolean overlap)
add a search pattern to the searches to be conducted by this object. |
void |
addPattern(String label,
String patternString,
boolean overlap)
add a search pattern to the searches to be conducted by this object. |
char |
charValue(Symbol sym)
|
void |
clearPatterns()
remove all patterns from the pattern cache. |
void |
search(SymbolList seq)
search the Sequence with the patterns already registered with this object. |
void |
search(SymbolList seq,
int loLimit,
int hiLimit)
search part of the SymbolList with the patterns already registered with this object. |
void |
setListener(Search.Listener listener)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Search(FiniteAlphabet alfa)
| Method Detail |
|---|
public void setListener(Search.Listener listener)
public void addPattern(String patternString,
boolean overlap)
throws RegexException,
IllegalAlphabetException
patternString - String representation of the pattern.overlap - if true, the search continues at the base following the start to the previous hit.
If false, it continues at the base after the existing hit.
RegexException - if the requested pattern is not valid
IllegalAlphabetException - if the requested pattern is not valid
public void addPattern(String label,
String patternString,
boolean overlap)
throws RegexException,
IllegalAlphabetException
patternString - String representation of the pattern.overlap - if true, the search continues at the base following the start to the previous hit.
If false, it continues at the base after the existing hit.
RegexException - if the requested pattern is not valid
IllegalAlphabetException - if the requested pattern is not validpublic void clearPatterns()
public char charValue(Symbol sym)
throws IllegalSymbolException
IllegalSymbolExceptionpublic void search(SymbolList seq)
public void search(SymbolList seq,
int loLimit,
int hiLimit)
loLimit - low limit of search range.hiLimit - high limit of search range.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||