goldengine.java
Class FAState
java.lang.Object
|
+--goldengine.java.FAState
- public class FAState
- extends java.lang.Object
-------------------------------------------------------------------------------------------
Source File: FAState.java
Author: Devin Cook, Matthew Hawkins
Description: Represents a DFA state.
-------------------------------------------------------------------------------------------
Revision List
Author Version Description
------ ------- -----------
MPH 1.0 First Issue
-------------------------------------------------------------------------------------------
IMPORT: java.util
-------------------------------------------------------------------------------------------
|
Method Summary |
void |
addEdge(java.lang.String chars,
int target)
addEdge
This method will add an edge to the FAState. |
FAEdge |
edge(int index)
edge
This method will return the edge at the specified index for
this state. |
int |
edgeCount()
edgeCount
The number of edges in this FAState. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
acceptSymbol
public int acceptSymbol
FAState
public FAState()
addEdge
public void addEdge(java.lang.String chars,
int target)
- addEdge
This method will add an edge to the FAState. It will create a
new edge if there are no chars (the lambda edge), otherwise
it will find the index from the target passed in, and create
a new edge with the target index of the target passed in, and
the characters passed in.
If the target is not found, it will produce an error.
- Parameters:
chars - The set of characters associated with the edge to
be created.target - The target index in this state.
edge
public FAEdge edge(int index)
- edge
This method will return the edge at the specified index for
this state.
- Parameters:
index - The index of the edge that will be returned.- Returns:
- The FAEdge at the specified index.
edgeCount
public int edgeCount()
- edgeCount
The number of edges in this FAState.
- Returns:
- The number of edges in this FAState.