001
002
003package org.biojava.utils.automata;
004
005/**
006 * Class that produces StateMachineInstance objects.
007 *
008 * @author David Huen
009 * @since 1.4
010 */
011public interface StateMachineFactory
012{
013    /**
014     * Return a StateMachineInstance if the Symbol represented
015     * by the symbol index is valid as the initial symbol of
016     * the pattern. 
017     * The returned StateMachineInstance will have its statepointer
018     * updated to show receipt of the specified symbol. 
019     * This method should not be used outside
020     * of the package as it does no alphabet checks at all.
021     * It should be package-private except I cannot define
022     * an interface with such methods.
023     *
024     * @param symIdx alphabet index value for specified symbol.
025     * @return an instance of StateMachineInstance if symbol
026     * is valid otherwise null.
027     */
028    public StateMachineInstance startInstance(int symIdx, int start);
029    public void setListener(PatternListener listener);
030}
031