Interface for a class that will recieve match information from this class.
This class is analogous to java.util.Matcher except that it works on SymbolLists instead of Strings.
A class analogous to java.util.regex.Pattern but for SymbolLists.
A class that creates Patterns for regex matching on SymbolLists of a specific Alphabet.
A utility class to make searching a Sequence with many regex patterns easier.
An exception thrown by classes of this package.
The implementation uses the java.util.regex package to perform the heavy lifting. Previous work had already defined a SymbolListCharSequence class to wrap SymbolLists and permit java.util.regex to be applied to the resultant CharSequence. This package extends this in two ways.
First, this package implements a SymbolTokenization for Alphabets that do not have one defined. This is done by arbitrarily mapping AtomicSymbols in the Alphabet to Unicode characters in the private range. The String that is required defining the regex can be assembled by calling PatternFactory.charValue() to return the unicode character value for Symbols in the Alphabet.
Next, the structure of the package has been changed to resemble more closely the classes in java.util.regex albeit adapted to SymbolLists. The APIs are very similar indeed.
Also, ambiguity and gap symbols in the target SymbolList will be converted to the all-ambiguity symbol by the default tokenizers and so they can be expected to fail to match any specific symbol in the Pattern. This is most frequently the desired behaviour as blocks of N in DNA, for example, should not be matched against any possible pattern.
Copyright © 2014 BioJava. All rights reserved.