EDU.bmrb.starlibj
Class DataNameNode
java.lang.Object
|
+--EDU.bmrb.starlibj.StarNode
|
+--EDU.bmrb.starlibj.DataNameNode
- public class DataNameNode
- extends StarNode
- implements java.lang.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.
Field Summary |
protected java.lang.String |
myStrVal
|
Constructor Summary |
DataNameNode(DataNameNode copyMe)
Constructor - copy another DataValueNode. |
DataNameNode(java.lang.String str)
Constructor - all DataNameNodes must have a string value,
so no provisions are made for a 'default' no-args constructor. |
Method Summary |
java.lang.Object |
clone()
Allocates a new copy of me and returns a reference to it. |
java.lang.String |
getLabel()
Returns the string contained in this name. |
java.lang.String |
getValue()
Returns the string contained in this name. |
void |
setLabel(java.lang.String newVal)
Sets the string name for this node. |
void |
setValue(java.lang.String newVal)
Sets the string name for this node. |
void |
Unparse(int indent)
Unparse prints the contents of the StarNode object out to the
given stream. |
Methods inherited from class EDU.bmrb.starlibj.StarNode |
getColNum,
getLineNum,
getParallelCopy,
getParent,
getPreComment,
mySkips,
searchByName,
searchByTagValue,
searchForType,
searchForTypeByName,
searchForTypeByTagValue,
setColNum,
setLineNum,
setParent,
setPeer,
setPreComment |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
myStrVal
protected java.lang.String myStrVal
DataNameNode
public DataNameNode(java.lang.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 java.lang.String getValue()
- Returns the string contained in this name. This is identical to
getLabel().
getLabel
public java.lang.String getLabel()
- Returns the string contained in this name. This is identical to
getValue().
setValue
public void setValue(java.lang.String newVal)
throws NameViolatesStarSyntax
- Sets the string name for this node. This is identical
to setLabel().
setLabel
public void setLabel(java.lang.String newVal)
throws NameViolatesStarSyntax
- Sets the string name for this node. This is identical
to setValue().
clone
public java.lang.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