For all China’s continuing insistence that it was still a developing nation, the government in Beijing was increasingly behaving like a superpower in the making—and the only country that it still seemed to regard as a true equal was the United States.