Example #1
0
 void doIt(BinaryTreeLeaf btl) {
   traverse.append(btl.getValue());
 }
Example #2
0
 public void visitLeaf(Visitable node) {
   BinaryTreeLeaf leaf = (BinaryTreeLeaf) node;
   result += leaf.getValue();
 }
Example #3
0
 void doIt(BinaryTreeLeaf btl) {
   sum += btl.getValue();
 }