예제 #1
0
 public boolean removeChild(NodeInfo child) {
   if (child != null && _children.remove(child)) {
     ((LeafInfo) child).setParentDirectly(null); // except root, all are LeafInfo
     BranchInfo.fixEvaluatorRefDown(child, null);
     return true;
   }
   return false;
 }
예제 #2
0
  public void appendChild(NodeInfo child) {
    NodeInfo oldp = child.getParent();
    if (oldp != null) oldp.removeChild(child);

    _children.add(child);
    ((LeafInfo) child).setParentDirectly(this); // except root, all are LeafInfo
    BranchInfo.fixEvaluatorRefDown(child, getEvaluatorRef());
    // Use getEvaluatorRef() to force _evalr being assigned
  }