1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.atlassian.theplugin.idea.crucible;
18
19 import com.atlassian.theplugin.commons.crucible.api.model.CrucibleFileInfo;
20
21 import javax.swing.tree.DefaultMutableTreeNode;
22
23
24
25
26
27
28
29
30 public class ReviewItemDataNode extends DefaultMutableTreeNode {
31 static final long serialVersionUID = -1192703287399203290L;
32
33 private CrucibleFileInfo file;
34
35 public ReviewItemDataNode(CrucibleFileInfo aReviewItemData) {
36 this.file = aReviewItemData;
37 }
38
39 public CrucibleFileInfo getFile() {
40 return file;
41 }
42
43 public void setFile(CrucibleFileInfo file) {
44 this.file = file;
45 }
46
47 public String toString() {
48 return file.toString();
49 }
50
51 public boolean equals(Object o) {
52 if (this == o) {
53 return true;
54 }
55 if (o == null || getClass() != o.getClass()) {
56 return false;
57 }
58
59 ReviewItemDataNode that = (ReviewItemDataNode) o;
60
61 if (file.equals(that.file)) {
62 return false;
63 }
64
65 return true;
66 }
67
68 public int hashCode() {
69 return file.hashCode();
70 }
71 }
72