antsnest.datastructure
Class DefaultAntComment

java.lang.Object
  extended by antsnest.datastructure.DefaultAntNode
      extended by antsnest.datastructure.DefaultAntComment
All Implemented Interfaces:
AntComment, AntNode, Serializable

public class DefaultAntComment
extends DefaultAntNode
implements AntComment

Implementation of AntComment

Author:
Chris Clohosy
See Also:
AntComment, Serialized Form

Constructor Summary
DefaultAntComment()
          Constrcuts a new comment
 
Method Summary
 AntNode cloneNode(IDPool idPool)
          Gets a clone of this node
 String getComment()
          Gets the comment held in this node
 void setComment(String comment)
          Sets the comment held in this node
 String toString()
          Provides a string representation of this comment
 
Methods inherited from class antsnest.datastructure.DefaultAntNode
addAttribute, addAttribute, addNode, addNode, changeAttribute, equals, getAttribute, getAttribute, getAttributeSize, getData, getDescription, getIDPool, getName, getNode, getNodeID, getNodeSize, getNodeText, getParent, getType, getTypeAt, indexOfAttribute, indexOfNode, moveAttribute, moveNode, removeAttribute, removeAttribute, removeNode, removeNode, setData, setDescription, setIDPool, setName, setNodeID, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface antsnest.datastructure.AntNode
addAttribute, addAttribute, addNode, addNode, changeAttribute, getAttribute, getAttribute, getAttributeSize, getData, getDescription, getIDPool, getName, getNode, getNodeID, getNodeSize, getNodeText, getParent, getType, getTypeAt, indexOfAttribute, indexOfNode, moveAttribute, moveNode, removeAttribute, removeAttribute, removeNode, removeNode, setData, setDescription, setIDPool, setName, setNodeID, setParent
 

Constructor Detail

DefaultAntComment

public DefaultAntComment()
Constrcuts a new comment

Method Detail

getComment

public String getComment()
Gets the comment held in this node

Specified by:
getComment in interface AntComment
Returns:
a String, the comment

setComment

public void setComment(String comment)
Sets the comment held in this node

Specified by:
setComment in interface AntComment
Parameters:
comment - the new comment

toString

public String toString()
Provides a string representation of this comment

Overrides:
toString in class Object
Returns:
a String, the string representation

cloneNode

public AntNode cloneNode(IDPool idPool)
Gets a clone of this node

Specified by:
cloneNode in interface AntNode
Specified by:
cloneNode in class DefaultAntNode
Parameters:
idPool - an ID pool to use
Returns:
an AntNode, the cloned node