public class StdSimNode extends java.lang.Object implements SimNode
SimNode
is called StdSimNode
, which
already implements the methods listed above.
The interface SimNode
has the following set of
methods:
addChild(SimNode)
adds a child node to an existing node
getChildren()
returns all child nodes of this node
getParent()
returns the parent node
getName()
returns the name of this node, only
getFullName()
returns the fully qualified name of this node
getPrintHandler()
return a handler for printing results
getExportHandler()
returns a handler for importing and exporting
results
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
NAME_PATTERN
This pattern defines the rules for node names.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(SimNode newNode)
Adds a new PrintServer as a child ModelNode.
|
SimNode |
createChildNode(java.lang.String n)
Creates and returns a child node with name n
|
static SimNode |
createRootNode(java.lang.String name)
Static method called only one time by
Model to create the root
node. |
java.util.List<SimNode> |
getChildren()
Returns a read-only list of this print servers children.
|
BatchExportable |
getExportHandler() |
java.lang.String |
getFullName() |
java.lang.String |
getName() |
SimNode |
getParent() |
Printable |
getPrintHandler() |
void |
setExportHandler(BatchExportable exportHandler) |
void |
setPrintHandler(Printable printHandler) |
java.lang.String |
toString() |
public static final java.util.regex.Pattern NAME_PATTERN
public static SimNode createRootNode(java.lang.String name)
Model
to create the root
node.public SimNode getParent()
public final java.lang.String getName()
public final java.lang.String getFullName()
getFullName
in interface SimNode
public void addChild(SimNode newNode)
public java.util.List<SimNode> getChildren()
getChildren
in interface SimNode
public void setPrintHandler(Printable printHandler)
setPrintHandler
in interface SimNode
public Printable getPrintHandler()
getPrintHandler
in interface SimNode
public void setExportHandler(BatchExportable exportHandler)
setExportHandler
in interface SimNode
public BatchExportable getExportHandler()
getExportHandler
in interface SimNode
public java.lang.String toString()
toString
in class java.lang.Object
public SimNode createChildNode(java.lang.String n)
createChildNode
in interface SimNode
n
- The name of the new node. It must be unique for nodes having the
same owner.