void addNodeMap(TreeNode node){
  StringBuffer sb=new StringBuffer();
  TreeNode tn=node;
  while (tn != root) {
    sb.insert(0,tn.toString());
    if (tn.getParent() != root)     sb.insert(0,".");
    tn=tn.getParent();
  }
  String pack=sb.toString();
  nodeForPackage.put(pack,node);
}

void addNodeMap ( TreeNode node ) { StringBuffer sb = new StringBuffer ( ) ; TreeNode tn = node ; while ( tn != root ) { sb . insert ( 0 , tn . toString ( ) ) ; if ( tn . getParent ( ) != root ) sb . insert ( 0 , "." ) ; tn = tn . getParent ( ) ; } String pack = sb . toString ( ) ; nodeForPackage . put ( pack , node ) ; }
map a single node up to the root
