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