Class FiniteAutomaton

  • Direct Known Subclasses:
    Nfa

    public class FiniteAutomaton
    extends Object
    Class for modelling finite automata.

    This class models basic FA behaviour. More specialised behaviour is implemented by subclassing this.

    Since:
    1.4
    Author:
    David Huen
    • Field Detail

      • start

        protected org.biojava.utils.automata.FiniteAutomaton.Node start
      • end

        protected org.biojava.utils.automata.FiniteAutomaton.Node end
    • Method Detail

      • getStart

        public org.biojava.utils.automata.FiniteAutomaton.Node getStart()
      • getEnd

        public org.biojava.utils.automata.FiniteAutomaton.Node getEnd()
      • addTransition

        public org.biojava.utils.automata.FiniteAutomaton.Transition addTransition​(org.biojava.utils.automata.FiniteAutomaton.Node start,
                                                                                   org.biojava.utils.automata.FiniteAutomaton.Node end,
                                                                                   Symbol sym)
      • addNode

        public org.biojava.utils.automata.FiniteAutomaton.Node addNode​(boolean terminal)
        Add a node to the FA.
        Parameters:
        terminal - Is the Node terminal?
      • getNodes

        public org.biojava.utils.automata.FiniteAutomaton.NodeSet getNodes()
        get all Nodes within this instance.
      • getTransitions

        public Set getTransitions()
        retrieve Set of all transitions in instance.
      • createNodeSet

        public org.biojava.utils.automata.FiniteAutomaton.NodeSet createNodeSet()
      • toString

        public String toString()
        dumps internal data of Nodes and Transitions that describe this FiniteAutomaton. It is not possible to dump it as a regex as there are FA that cannot be expressed as a regex.
        Overrides:
        toString in class Object