public class SimpleMDAGNode extends Object implements ICacheAble
| 构造器和说明 |
|---|
SimpleMDAGNode() |
SimpleMDAGNode(char letter,
boolean isAcceptNode,
int transitionSetSize)
Constructs a SimpleMDAGNode.
|
| 限定符和类型 | 方法和说明 |
|---|---|
char |
getLetter()
Retrieves the character representing the _transition laben leading up to this node.
|
int |
getOutgoingTransitionSetSize()
Retrieves the size of this node's outgoing _transition set.
|
int |
getTransitionSetBeginIndex()
Retrieves the index in this node's containing array that its _transition set begins at.
|
boolean |
isAcceptNode()
Retrieves the accept state status of this node.
|
boolean |
load(ByteArray byteArray)
载入
|
void |
save(DataOutputStream out)
写入
|
void |
setTransitionSetBeginIndex(int transitionSetBeginIndex)
Records the index in this node's containing array that its _transition set begins at.
|
String |
toString() |
SimpleMDAGNode |
transition(SimpleMDAGNode[] mdagDataArray,
char letter)
Follows an outgoing _transition from this node.
|
SimpleMDAGNode |
transition(SimpleMDAGNode[] mdagDataArray,
char[] str) |
SimpleMDAGNode |
transition(SimpleMDAGNode[] mdagDataArray,
char[] str,
int offset) |
SimpleMDAGNode |
transition(SimpleMDAGNode[] mdagDataArray,
String str)
Follows a _transition path starting from this node.
|
static SimpleMDAGNode |
traverseMDAG(SimpleMDAGNode[] mdagDataArray,
SimpleMDAGNode sourceNode,
String str)
Follows a _transition path starting from the source node of a MDAG.
|
public SimpleMDAGNode(char letter,
boolean isAcceptNode,
int transitionSetSize)
letter - a char representing the _transition label leading to this SimpleMDAGNodeisAcceptNode - a boolean representing the accept state status of this SimpleMDAGNodetransitionSetSize - an int denoting the size of this _transition setpublic SimpleMDAGNode()
public char getLetter()
public boolean isAcceptNode()
public int getTransitionSetBeginIndex()
public int getOutgoingTransitionSetSize()
public void setTransitionSetBeginIndex(int transitionSetBeginIndex)
transitionSetBeginIndex - an int denoting the index in this node's containing array that is _transition set beings atpublic SimpleMDAGNode transition(SimpleMDAGNode[] mdagDataArray, char letter)
mdagDataArray - the array of SimpleMDAGNodes containing this nodeletter - the char representation of the desired _transition's labelletter,
or null if there is no such labeled _transition from this nodepublic SimpleMDAGNode transition(SimpleMDAGNode[] mdagDataArray, String str)
mdagDataArray - the array of SimpleMDAGNodes containing this nodestr - a String corresponding a _transition path in the MDAGstr, or null if such a _transition path is not present in the MDAGpublic SimpleMDAGNode transition(SimpleMDAGNode[] mdagDataArray, char[] str)
public SimpleMDAGNode transition(SimpleMDAGNode[] mdagDataArray, char[] str, int offset)
public static SimpleMDAGNode traverseMDAG(SimpleMDAGNode[] mdagDataArray, SimpleMDAGNode sourceNode, String str)
mdagDataArray - the array containing the data of the MDAG to be traversedsourceNode - the dummy SimpleMDAGNode which functions as the source of the MDAG data in mdagDataArraystr - a String corresponding to a _transition path in the to-be-traversed MDAGstr, or null if such a _transition path is not present in the MDAGpublic void save(DataOutputStream out) throws Exception
ICacheAblesave 在接口中 ICacheAbleExceptionpublic boolean load(ByteArray byteArray)
ICacheAbleload 在接口中 ICacheAbleCopyright © 2014–2018 码农场. All rights reserved.