@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; } } }
@Override public void call(IntBinaryTree node) { if (node.isLeaf()) { leaves.add(node); } }