In Listing 6, I take the duplicated code in Listing 4 and reduce the duplication by using the Pull up method refactoring - extracting behavior from a larger method into an abstract class method.
在清单6中,我用了清单4中的重复代码,使用了Pull Up Method重构来降低重复度—将行为从较大方法提取到一个抽象类方法中。
Instead of typing his columns with an electric typewriter, which he'd done for 25 years, my grandfather had to learn to type on a computer... and save it, and pull it up from a directory.
不再使用那台他已依靠了25年的电动打字机上写他的专栏,我的祖父不得不开始学习在电脑上打字…然后储存,最后把它放到一个目录上去。
应用推荐