package cppcheckplus.text; public class DeflectRow { public DeflectRow(String until, String file, String line, String level, String type, String cwe, String description,int issure) { super(); this.until = until; this.file = file; this.line = line; this.level = level; this.type = type; this.cwe = cwe; this.description = description; this.issure = issure; } @Override public String toString() { return "DeflectRow [until=" + until + ", file=" + file + ", line=" + line + ", level=" + level + ", type=" + type + ", cwe=" + cwe + ", description=" + description + "]"; } private String until = null; public String getUntil() { return until; } public void setUntil(String until) { this.until = until; } public String getFile() { return file; } public void setFile(String file) { this.file = file; } public String getLine() { return line; } public void setLine(String line) { this.line = line; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getCwe() { return cwe; } public void setCwe(String cwe) { this.cwe = cwe; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public int getIssure() { return issure; } public void setIssure(int issure) { this.issure = issure; } private String file = null; private String line = null; private String level = null; private String type = null; private String cwe = null; private String description = null; private int issure = 0; //0是未确认, 1是确认正确, 2是确认误报 @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((file == null) ? 0 : file.hashCode()); result = prime * result + ((level == null) ? 0 : level.hashCode()); result = prime * result + ((line == null) ? 0 : line.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DeflectRow other = (DeflectRow) obj; if (file == null) { if (other.file != null) return false; } else if (!file.equals(other.file)) return false; if (level == null) { if (other.level != null) return false; } else if (!level.equals(other.level)) return false; if (line == null) { if (other.line != null) return false; } else if (!line.equals(other.line)) return false; if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; if (until == null) { if (other.until != null) return false; } else if (until.equals(other.until)) return false; return true; } }