Package VASSAL.chat.node
Class Node
java.lang.Object
VASSAL.chat.node.Node
- All Implemented Interfaces:
MsgSender
- Direct Known Subclasses:
PlayerNode
,ServerNode
Base class for the hierarchical server model.
Each node has a name, a list of children, and arbitrary extra information
encoded in the
getInfo()
string. Each node can be identified
globally by a path name. Messages sent to a node generally broadcast to
all descendants of the node.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static Node
Constructs from a path name.buildWithInfo
(Node base, String pathAndInfo) Builds a Node from a pathAndInfo stringboolean
return the child node with the given id, or null if no matchNode[]
getDescendant
(String path) Return the descendant node with the given path relative to this nodegetId()
getInfo()
getInfoProperty
(String propName) Node[]
getPath()
Return a string in the format parentId=parentInfo/childId=childInfo/...int
hashCode()
boolean
isLeaf()
void
void
void
void
toString()
-
Constructor Details
-
Node
-
-
Method Details
-
getId
-
getInfo
-
getInfoProperty
-
setInfo
-
setParent
-
getParent
-
remove
-
add
-
equals
-
hashCode
-
toString
-
getChild
-
getDescendant
-
send
-
getLeafDescendants
-
isLeaf
public boolean isLeaf() -
getChildren
-
build
-
buildWithInfo
-
getPath
-
getPathAndInfo
Return a string in the format parentId=parentInfo/childId=childInfo/...- Returns:
- string
-