diff options
Diffstat (limited to 'src/cppcheckplus/text/DeflectRow.java')
-rw-r--r-- | src/cppcheckplus/text/DeflectRow.java | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/src/cppcheckplus/text/DeflectRow.java b/src/cppcheckplus/text/DeflectRow.java new file mode 100644 index 0000000..5b113a6 --- /dev/null +++ b/src/cppcheckplus/text/DeflectRow.java | |||
@@ -0,0 +1,126 @@ | |||
1 | package cppcheckplus.text; | ||
2 | |||
3 | public class DeflectRow { | ||
4 | |||
5 | public DeflectRow(String until, String file, String line, String level, String type, String cwe, | ||
6 | String description,int issure) { | ||
7 | super(); | ||
8 | this.until = until; | ||
9 | this.file = file; | ||
10 | this.line = line; | ||
11 | this.level = level; | ||
12 | this.type = type; | ||
13 | this.cwe = cwe; | ||
14 | this.description = description; | ||
15 | this.issure = issure; | ||
16 | } | ||
17 | @Override | ||
18 | public String toString() { | ||
19 | return "DeflectRow [until=" + until + ", file=" + file + ", line=" + line + ", level=" + level + ", type=" | ||
20 | + type + ", cwe=" + cwe + ", description=" + description + "]"; | ||
21 | } | ||
22 | private String until = null; | ||
23 | public String getUntil() { | ||
24 | return until; | ||
25 | } | ||
26 | public void setUntil(String until) { | ||
27 | this.until = until; | ||
28 | } | ||
29 | public String getFile() { | ||
30 | return file; | ||
31 | } | ||
32 | public void setFile(String file) { | ||
33 | this.file = file; | ||
34 | } | ||
35 | public String getLine() { | ||
36 | return line; | ||
37 | } | ||
38 | public void setLine(String line) { | ||
39 | this.line = line; | ||
40 | } | ||
41 | public String getLevel() { | ||
42 | return level; | ||
43 | } | ||
44 | public void setLevel(String level) { | ||
45 | this.level = level; | ||
46 | } | ||
47 | public String getType() { | ||
48 | return type; | ||
49 | } | ||
50 | public void setType(String type) { | ||
51 | this.type = type; | ||
52 | } | ||
53 | public String getCwe() { | ||
54 | return cwe; | ||
55 | } | ||
56 | public void setCwe(String cwe) { | ||
57 | this.cwe = cwe; | ||
58 | } | ||
59 | public String getDescription() { | ||
60 | return description; | ||
61 | } | ||
62 | public void setDescription(String description) { | ||
63 | this.description = description; | ||
64 | } | ||
65 | public int getIssure() { | ||
66 | return issure; | ||
67 | } | ||
68 | public void setIssure(int issure) { | ||
69 | this.issure = issure; | ||
70 | } | ||
71 | private String file = null; | ||
72 | private String line = null; | ||
73 | private String level = null; | ||
74 | private String type = null; | ||
75 | private String cwe = null; | ||
76 | private String description = null; | ||
77 | private int issure = 0; //0是未确认, 1是确认正确, 2是确认误报 | ||
78 | |||
79 | @Override | ||
80 | public int hashCode() { | ||
81 | final int prime = 31; | ||
82 | int result = 1; | ||
83 | result = prime * result + ((file == null) ? 0 : file.hashCode()); | ||
84 | result = prime * result + ((level == null) ? 0 : level.hashCode()); | ||
85 | result = prime * result + ((line == null) ? 0 : line.hashCode()); | ||
86 | result = prime * result + ((type == null) ? 0 : type.hashCode()); | ||
87 | return result; | ||
88 | } | ||
89 | |||
90 | @Override | ||
91 | public boolean equals(Object obj) { | ||
92 | if (this == obj) | ||
93 | return true; | ||
94 | if (obj == null) | ||
95 | return false; | ||
96 | if (getClass() != obj.getClass()) | ||
97 | return false; | ||
98 | DeflectRow other = (DeflectRow) obj; | ||
99 | if (file == null) { | ||
100 | if (other.file != null) | ||
101 | return false; | ||
102 | } else if (!file.equals(other.file)) | ||
103 | return false; | ||
104 | if (level == null) { | ||
105 | if (other.level != null) | ||
106 | return false; | ||
107 | } else if (!level.equals(other.level)) | ||
108 | return false; | ||
109 | if (line == null) { | ||
110 | if (other.line != null) | ||
111 | return false; | ||
112 | } else if (!line.equals(other.line)) | ||
113 | return false; | ||
114 | if (type == null) { | ||
115 | if (other.type != null) | ||
116 | return false; | ||
117 | } else if (!type.equals(other.type)) | ||
118 | return false; | ||
119 | if (until == null) { | ||
120 | if (other.until != null) | ||
121 | return false; | ||
122 | } else if (until.equals(other.until)) | ||
123 | return false; | ||
124 | return true; | ||
125 | } | ||
126 | } \ No newline at end of file | ||