public class DFANode
extends java.lang.Object
| Constructor and Description |
|---|
DFANode()
Constructs an empty node.
|
DFANode(java.lang.String key,
java.lang.Object data)
Constructs a node with the specified key/data pair.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPred(DFANode pred)
Adds a predecessor node.
|
void |
addSucc(DFANode succ)
Adds a successor node.
|
<T> T |
getData(java.util.List<java.lang.String> keys)
Returns the first data while searching for the specified list of keys.
|
<T> T |
getData(java.lang.String key)
Returns the data in the node mapped by the key.
|
java.util.Set<java.lang.String> |
getKeys()
Returns the set of keys in the satellite data map.
|
<T> T |
getPredData(DFANode key)
Returns the predecessor data associated with the specified predecessor
key.
|
java.util.Set<DFANode> |
getPreds()
Returns the set of predecessor nodes.
|
<T> T |
getSuccData(DFANode key)
Returns the successor data associated with the specified successor key.
|
java.util.Set<DFANode> |
getSuccs()
Returns the set of successor nodes.
|
void |
putData(java.lang.String key,
java.lang.Object data)
Associates the given data with the specified key.
|
void |
putPredData(DFANode pred,
java.lang.Object value)
Adds data associated with the incoming edge from the predecessor node to
this node.
|
void |
putSuccData(DFANode succ,
java.lang.Object value)
Adds data associated with the outgoing edge from this node to the
successor node.
|
void |
removeData(java.lang.String key)
Removes the data mapped by the specified key.
|
void |
removePred(DFANode pred)
Removes a predecessor node.
|
void |
removeSucc(DFANode succ)
Removes a successor node.
|
java.lang.String |
toDot(java.lang.String keys,
int num)
Returns the string in dot format that represents the node.
|
java.lang.String |
toString()
Returns a string for the graph.
|
public DFANode()
public DFANode(java.lang.String key,
java.lang.Object data)
key - the key string.data - the associated data.public java.util.Set<java.lang.String> getKeys()
public <T> T getData(java.lang.String key)
key - a string key.public <T> T getData(java.util.List<java.lang.String> keys)
keys - the list of keys.public void putData(java.lang.String key,
java.lang.Object data)
key - the key string.data - the associated data.public void removeData(java.lang.String key)
key - the key string.public java.util.Set<DFANode> getSuccs()
public java.util.Set<DFANode> getPreds()
public <T> T getSuccData(DFANode key)
key - the successor whose associated data is asked for.public <T> T getPredData(DFANode key)
key - the predecessor whose associated data is asked for.public void putSuccData(DFANode succ, java.lang.Object value)
succ - the successor node.value - the associated data.public void putPredData(DFANode pred, java.lang.Object value)
pred - the predecessor node.value - the associated data.public void addPred(DFANode pred)
pred - the predecessor node.public void addSucc(DFANode succ)
succ - the successor node.public void removePred(DFANode pred)
pred - the predecessor node.public void removeSucc(DFANode succ)
succ - the successor node.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toDot(java.lang.String keys,
int num)
keys - the comma-separated list of keys whose mapped data are
printed.num - the number of total keys being searched for.