java重复度检查_Java:重复,过度使用-问题?
我尽量做到简约.重复是一个问题.我讨厌它.什么时候真的有问题?
>什么是静态过度使用?
>什么是过度使用现场方法?
>什么是课堂过度使用?
>还有更多类型的过度使用吗?
问题-答:什么时候过多使用静电?
private static class Data
{
private static String fileContent;
private static SizeSequence lineMap;
private static File fileThing;
private static char type;
private static boolean binary;
private static String name;
private static String path;
}
private static class Print
{
//<1st LINE, LEFT_SIDE, 2nd LINE, RIGHT_SIDE>
private Integer[] printPositions=new Integer[4];
private static String fingerPrint;
private static String formatPrint;
}
问题B:什么时候使用私有方法获取字段数据太多?
public Stack getPositions(){return positions;}
public Integer[] getPrintPositions(){return printPositions;}
private Stack getPrintViews(){return printViews;}
private Stack getPrintViewsPerFile(){return printViewsPerFile;}
public String getPrintView(){return printView;}
public String getFingerPrint(){return fingerPrint;}
public String getFormatPrint(){return formatPrint;}
public String getFileContent(){return fileContent;}
public SizeSequence getLineMap(){return lineMap;}
public File getFile(){return fileThing;}
public boolean getBinary(){return binary;}
public char getType(){return type;}
public String getPath(){return path;}
public FileObject getData(){return fObj;}
public String getSearchTerm(){return searchTerm;}
有关
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!