示例#1
0
 @Override
 public void call(IntBinaryTree node) {
   if (!node.isLeaf()) {
     node.start = node.leftChild.start;
     if (node.rightChild == null) {
       node.end = node.leftChild.end;
     } else {
       node.end = node.rightChild.end;
     }
   }
 }
示例#2
0
 @Override
 public void call(IntBinaryTree node) {
   if (node.isLeaf()) {
     leaves.add(node);
   }
 }