|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.regex.PatternFactory
public class PatternFactory
A class that creates Patterns for regex matching on SymbolLists of a specific Alphabet.
Method Summary | |
---|---|
char |
charValue(Symbol sym)
Returns the character that represents the specified Symbol in the Alphabet that this PatternFactory was defined for. |
Pattern |
compile(java.lang.String pattern)
Returns a Pattern object that applies the specified regex against SymbolLists in the Alphabet that this PatternFactory was defined against. |
Pattern |
compile(java.lang.String pattern,
java.lang.String label)
Returns a Pattern object that applies the specified regex against SymbolLists in the Alphabet that this PatternFactory was defined against. |
static PatternFactory |
makeFactory(FiniteAlphabet alfa)
Returns a factory for Patterns in the specified Alphabet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Pattern compile(java.lang.String pattern) throws RegexException, IllegalAlphabetException
RegexException
IllegalAlphabetException
public Pattern compile(java.lang.String pattern, java.lang.String label) throws RegexException, IllegalAlphabetException
pattern
- regex pattern expressed as a String.label
- A String label assigned to the Pattern object. Can be retrieved later with getName().
RegexException
IllegalAlphabetException
public char charValue(Symbol sym) throws IllegalSymbolException
The character will be ASCII in Alphabets that define a Character tokenization. In Alphabets that don't a Unicode character in the private range is returned instead and this can be used to assemble the String that is the argument for the compile method.
IllegalSymbolException
public static PatternFactory makeFactory(FiniteAlphabet alfa)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |