|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DrawableNode Branch
public class Branch
A branch of a tree that can have children
Constructor Summary | |
---|---|
Branch()
Construct a branch with the first child and next as null |
Method Summary | |
---|---|
void |
addChild(DrawableNode child)
Method to add a child node |
void |
drawWith(Turtle turtle)
Ask all our children to draw, then let next draw. |
DrawableNode |
getFirstChild()
Method to get the first child in the branch |
String |
toString()
Method to return a string with information 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 |
Constructor Detail |
---|
public Branch()
Method Detail |
---|
public DrawableNode getFirstChild()
public String toString()
toString
in class Object
public void addChild(DrawableNode child)
the
- child to addpublic void drawWith(Turtle turtle)
drawWith
in class DrawableNode
turtle
- the Turtle to draw with
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |