All Packages Class Hierarchy This Package Previous Next Index
Class EDU.bmrb.starlibj.DataNameNode
java.lang.Object
|
+----EDU.bmrb.starlibj.StarNode
|
+----EDU.bmrb.starlibj.DataNameNode
- public class DataNameNode
- extends StarNode
- implements Cloneable
This is a simple class that holds a single tag name (either
a free tag/value pair or a name in a loop). This is a very
simple class that exists mainly for orthogonality.
-
myStrVal
-
-
DataNameNode(DataNameNode)
- Constructor - copy another DataValueNode.
-
DataNameNode(String)
- Constructor - all DataNameNodes must have a string value,
so no provisions are made for a 'default' no-args constructor.
-
clone()
- Allocates a new copy of me and returns a reference to it.
-
getLabel()
- Returns the string contained in this name.
-
getValue()
- Returns the string contained in this name.
-
setLabel(String)
- Sets the string name for this node.
-
setValue(String)
- Sets the string name for this node.
-
Unparse(int)
- Unparse prints the contents of the StarNode object out to the
given stream.
myStrVal
protected String myStrVal
DataNameNode
public DataNameNode(String str) throws NameViolatesStarSyntax
- Constructor - all DataNameNodes must have a string value,
so no provisions are made for a 'default' no-args constructor.
- Throws: NameViolatesStarSyntax
- thrown when the string given
is not a valid STAR tag name.
DataNameNode
public DataNameNode(DataNameNode copyMe)
- Constructor - copy another DataValueNode.
getValue
public String getValue()
- Returns the string contained in this name. This is identical to
getLabel().
getLabel
public String getLabel()
- Returns the string contained in this name. This is identical to
getValue().
setValue
public void setValue(String newVal) throws NameViolatesStarSyntax
- Sets the string name for this node. This is identical
to setLabel().
setLabel
public void setLabel(String newVal) throws NameViolatesStarSyntax
- Sets the string name for this node. This is identical
to setValue().
clone
public Object clone()
- Allocates a new copy of me and returns a reference to it.
This is a deep copy, meaning that all children are copied
instead of linked.
- Overrides:
- clone in class StarNode
Unparse
public void Unparse(int indent)
- Unparse prints the contents of the StarNode object out to the
given stream. This is essentially the inverse of the CS term
to "parse", hence the name "Unparse". The parameter given is
the indentation level to print things.
- Overrides:
- Unparse in class StarNode
All Packages Class Hierarchy This Package Previous Next Index