|
mwalk Platform 0.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mwalk.core.TreeNode
An abstract class representing a node in the tree.
Field Summary | |
boolean |
active
Flag indicating randomly chosen activity |
protected java.util.Hashtable |
children
List of child nodes hashed by IP |
java.util.Hashtable |
data
Storage available to visitors to store partial results |
protected java.lang.String |
ip
IP address of node |
protected java.util.Hashtable |
parents
List of parent nodes hashed by IP |
(package private) static long |
serialVersionUID
Serialized version ID |
Constructor Summary | |
TreeNode(java.lang.String ip)
Constructor. |
Method Summary | |
void |
activateLink(TreeNode child,
long time,
long next)
|
TreeNode |
addChild(TreeNode child)
|
protected Link |
addChildLink(TreeNode child)
|
TreeNode |
addParent(TreeNode parent)
|
int |
children()
Return the numbmer of children. |
void |
clearData()
|
long |
deactivateLink(TreeNode child,
long time)
|
void |
delChild(TreeNode child)
|
void |
delParent(TreeNode parent)
|
boolean |
equals(java.lang.String check)
|
boolean |
equals(TreeNode node)
|
TreeNode[] |
getActiveChildren(ActivityEvaluator eval)
|
TreeNode[] |
getActiveChildren(ActivityEvaluator eval,
long time)
|
Link[] |
getActiveLinks(ActivityEvaluator eval)
|
Link[] |
getActiveLinks(ActivityEvaluator eval,
long time)
|
protected java.util.Vector |
getActiveList(ActivityEvaluator eval,
long time)
|
Link |
getChildLink(TreeNode child)
|
Link[] |
getChildLinks()
|
TreeNode[] |
getChildren()
Return a list of this node's children. |
java.lang.String |
getIP()
Return the node's IP address. |
TreeNode[] |
getParents()
Return a list of this node's parents. |
boolean |
hasChild(java.lang.String ip)
Check whether this node has a particular child. |
boolean |
hasParent(java.lang.String ip)
Check whether this node has a particular parent. |
int |
parents()
Return the numbmer of parents. |
private void |
readObject(java.io.ObjectInputStream in)
Initialize transient variables after reading the object in. |
static Link[] |
toLinkArray(java.util.Enumeration list,
int size)
|
static TreeNode[] |
toNodeArray(java.util.Enumeration list,
int size)
|
static java.util.Vector |
toNodeVector(java.util.Enumeration list,
int size)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
static final long serialVersionUID
protected java.lang.String ip
protected java.util.Hashtable parents
protected java.util.Hashtable children
public transient boolean active
public transient java.util.Hashtable data
Constructor Detail |
public TreeNode(java.lang.String ip)
String
- node's IP addressMethod Detail |
public java.lang.String getIP()
String
node's IP addresspublic boolean hasParent(java.lang.String ip)
String
- address of parentboolean
whether node has this parentpublic int parents()
int
number of parentspublic TreeNode[] getParents()
TreeNode[]
list of parentspublic boolean hasChild(java.lang.String ip)
String
- address of childboolean
whether node has this childpublic int children()
int
number of childrenpublic TreeNode[] getChildren()
TreeNode[]
list of childrenpublic Link getChildLink(TreeNode child)
public Link[] getChildLinks()
public TreeNode addParent(TreeNode parent)
public TreeNode addChild(TreeNode child)
protected Link addChildLink(TreeNode child)
public void delParent(TreeNode parent)
public void delChild(TreeNode child)
public void activateLink(TreeNode child, long time, long next) throws BuildException
public long deactivateLink(TreeNode child, long time) throws BuildException
public TreeNode[] getActiveChildren(ActivityEvaluator eval)
public TreeNode[] getActiveChildren(ActivityEvaluator eval, long time)
public Link[] getActiveLinks(ActivityEvaluator eval)
public Link[] getActiveLinks(ActivityEvaluator eval, long time)
protected java.util.Vector getActiveList(ActivityEvaluator eval, long time)
public void clearData()
public boolean equals(TreeNode node)
public boolean equals(java.lang.String check)
public static java.util.Vector toNodeVector(java.util.Enumeration list, int size)
public static TreeNode[] toNodeArray(java.util.Enumeration list, int size)
public static Link[] toLinkArray(java.util.Enumeration list, int size)
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
ObjectInputStream
- input streamIOException
- if object not read correctly
|
mwalk Platform 0.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |