public Variable renameVariable(String oldName, String newName) {
    """
	Rename a Variable. Must be in define mode.
	
	@param oldName existing Variable has this name
	@param newName rename to this
	@return renamed Variable, or null if not found
    """
    if (!defineMode) throw new UnsupportedOperationException("not in define mode");
    Variable v = ncfile.findVariable(oldName);
    if (null != v) {
      String fullOldNameEscaped = v.getFullNameEscaped();
      v.setName(newName);
      varRenameMap.put(v.getFullNameEscaped(), fullOldNameEscaped);
    }
    return v;
  }
public Variable renameVariable(String oldName, String newName) {
    if (!defineMode) throw new UnsupportedOperationException("not in define mode");
    Variable v = ncfile.findVariable(oldName);
    if (null != v) {
      String fullOldNameEscaped = v.getFullNameEscaped();
      v.setName(newName);
      varRenameMap.put(v.getFullNameEscaped(), fullOldNameEscaped);
    }
    return v;
  }
public Variable renameVariable ( String oldName , String newName ) { if ( ! defineMode ) throw new UnsupportedOperationException ( "not in define mode" ) ; Variable v = ncfile . findVariable ( oldName ) ; if ( null != v ) { String fullOldNameEscaped = v . getFullNameEscaped ( ) ; v . setName ( newName ) ; varRenameMap . put ( v . getFullNameEscaped ( ) , fullOldNameEscaped ) ; } return v ; }
Rename a Variable. Must be in define mode.

@param oldName existing Variable has this name
@param newName rename to this
@return renamed Variable, or null if not found
Rename a Variable . Must be in define mode .