Class Branch

java.lang.Object
  extended byDrawableNode
      extended byBranch
Direct Known Subclasses:
HBranch, MoveBranch, VBranch

public class Branch
extends DrawableNode


Field Summary
 DrawableNode children
           
 
Fields inherited from class DrawableNode
next
 
Constructor Summary
Branch()
           
 
Method Summary
 void addChild(DrawableNode child)
          Method to add nodes to children
 void drawWith(Turtle pen)
          Use the given turtle to draw oneself
 String toString()
          Method to return a string with informaiton about this branch
 
Methods inherited from class DrawableNode
add, drawOn, getNext, insertAfter, last, remove, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

public DrawableNode children
Constructor Detail

Branch

public Branch()
Method Detail

toString

public String toString()
Method to return a string with informaiton about this branch


addChild

public void addChild(DrawableNode child)
Method to add nodes to children


drawWith

public void drawWith(Turtle pen)
Description copied from class: DrawableNode
Use the given turtle to draw oneself

Specified by:
drawWith in class DrawableNode
Parameters:
pen - the Turtle to draw with