public void addMergePath(PathImpl path){
  if (!(path instanceof MergePath)) {
    ArrayList<PathImpl> pathList=((MergePath)_root)._pathList;
    if (!pathList.contains(path))     pathList.add(path);
  }
 else   if (((MergePath)path)._root == _root)   return;
 else {
    MergePath mergePath=(MergePath)path;
    ArrayList<PathImpl> subPaths=mergePath.getMergePaths();
    String pathName="./" + mergePath._pathname + "/";
    for (int i=0; i < subPaths.size(); i++) {
      PathImpl subPath=subPaths.get(i);
      addMergePath(subPath.lookup(pathName));
    }
  }
}

public void addMergePath ( PathImpl path ) { if ( ! ( path instanceof MergePath ) ) { ArrayList < PathImpl > pathList = ( ( MergePath ) _root ) . _pathList ; if ( ! pathList . contains ( path ) ) pathList . add ( path ) ; } else if ( ( ( MergePath ) path ) . _root == _root ) return ; else { MergePath mergePath = ( MergePath ) path ; ArrayList < PathImpl > subPaths = mergePath . getMergePaths ( ) ; String pathName = "./" + mergePath . _pathname + "/" ; for ( int i = 0 ; i < subPaths . size ( ) ; i ++ ) { PathImpl subPath = subPaths . get ( i ) ; addMergePath ( subPath . lookup ( pathName ) ) ; } } }
adds a new path to the end of the merge path .
