Exemplo n.º 1
0
 /**
  * Optimizes the tree by making the marked nodes as leafs, basically cutting all the branches that
  * are below marked node.
  */
 protected void optimizeTreeSize(final Node<Payload> changedNode) {
   // simply "cut off" children if any
   for (Node<Payload> child : changedNode.getChildren()) {
     changedNode.removeChild(child);
   }
 }