1 package com.github.celldynamics.quimp.plugin.protanalysis;
2
3 import java.awt.Point;
4
5
6
7
8
9
10
11 class PointCoords {
12
13
14
15
16
17
18
19
20
21 public PointCoords(Point point, int cellNo) {
22 this.point = point;
23 this.cellNo = cellNo;
24 }
25
26
27
28
29
30
31
32
33 public PointCoords(Point point, int cellNo, int frame) {
34 this(point, cellNo);
35 this.frame = frame;
36 }
37
38
39
40
41 public Point point;
42
43
44
45 public int frame = -1;
46
47
48
49 public int cellNo;
50
51
52
53
54
55
56 @Override
57 public int hashCode() {
58 final int prime = 31;
59 int result = 1;
60 result = prime * result + cellNo;
61 result = prime * result + frame;
62 result = prime * result + ((point == null) ? 0 : point.hashCode());
63 return result;
64 }
65
66
67
68
69
70
71 @Override
72 public boolean equals(Object obj) {
73 if (this == obj) {
74 return true;
75 }
76 if (obj == null) {
77 return false;
78 }
79 if (getClass() != obj.getClass()) {
80 return false;
81 }
82 PointCoords./../../../../com/github/celldynamics/quimp/plugin/protanalysis/PointCoords.html#PointCoords">PointCoords other = (PointCoords) obj;
83 if (cellNo != other.cellNo) {
84 return false;
85 }
86 if (frame != other.frame) {
87 return false;
88 }
89 if (point == null) {
90 if (other.point != null) {
91 return false;
92 }
93 } else if (!point.equals(other.point)) {
94 return false;
95 }
96 return true;
97 }
98
99
100
101
102
103
104 @Override
105 public String toString() {
106 return "PointCoords [point=" + point + ", frame=" + frame + ", cellNo=" + cellNo + "]";
107 }
108
109 }