com.ibm.etools.xsd
Interface XSDParticle.DFA

All Known Implementing Classes:
XSDParticleImpl.XSDNFA
Enclosing class:
XSDParticle

public static interface XSDParticle.DFA

A deterministic finite state automaton as described for 'Unique Particle Attribution'.


Inner Class Summary
static interface XSDParticle.DFA.State
          A state of a deterministic finite state automaton.
static interface XSDParticle.DFA.Transition
          A transition of a deterministic finite state automaton.
 
Method Summary
 boolean accept(java.lang.String namespaceURI, java.lang.String localName)
          Attempt a state transition and return whether the resulting state is accepting.
 XSDParticle.DFA cloneDFA()
          Creates a clone of the automaton.
 XSDParticle.DFA.State getCurrentState()
          Returns the current state of the automaton.
 XSDParticle.DFA.State getInitialState()
          Returns the initial state of this automaton.
 java.util.Set getStates()
          Returns the set of states in this automaton.
 void reset()
          Resets the automaton to the initial state.
 

Method Detail

getStates

public java.util.Set getStates()
Returns the set of states in this automaton.
Returns:
the set of states in this automaton.

getInitialState

public XSDParticle.DFA.State getInitialState()
Returns the initial state of this automaton. The automaton can be reset to this state.
Returns:
the initial states in this automaton.
See Also:
reset()

reset

public void reset()
Resets the automaton to the initial state.
See Also:
getInitialState()

getCurrentState

public XSDParticle.DFA.State getCurrentState()
Returns the current state of the automaton. This may be null in the case that an unrecognized symbol has been accepted.
Returns:
the current state of the automaton.
See Also:
getCurrentState()

accept

public boolean accept(java.lang.String namespaceURI,
                      java.lang.String localName)
Attempt a state transition and return whether the resulting state is accepting. An unrecognized input will result in a null state and will yield false. return whether the resulting state is accepting.

cloneDFA

public XSDParticle.DFA cloneDFA()
Creates a clone of the automaton.
Returns:
a clone of the automaton.