@@ -11,13 +11,18 @@ public class PollAnswer implements Serializable {
11
11
private final static long serialVersionUID = 0L ;
12
12
13
13
private String poll_id ;
14
+ private Chat voter_chat ;
14
15
private User user ;
15
16
private Integer [] option_ids ;
16
17
17
18
public String pollId () {
18
19
return poll_id ;
19
20
}
20
21
22
+ public Chat voterChat () {
23
+ return voter_chat ;
24
+ }
25
+
21
26
public User user () {
22
27
return user ;
23
28
}
@@ -34,6 +39,7 @@ public boolean equals(Object o) {
34
39
PollAnswer that = (PollAnswer ) o ;
35
40
36
41
if (poll_id != null ? !poll_id .equals (that .poll_id ) : that .poll_id != null ) return false ;
42
+ if (voter_chat != null ? !voter_chat .equals (that .voter_chat ) : that .voter_chat != null ) return false ;
37
43
if (user != null ? !user .equals (that .user ) : that .user != null ) return false ;
38
44
// Probably incorrect - comparing Object[] arrays with Arrays.equals
39
45
return Arrays .equals (option_ids , that .option_ids );
@@ -42,6 +48,7 @@ public boolean equals(Object o) {
42
48
@ Override
43
49
public int hashCode () {
44
50
int result = poll_id != null ? poll_id .hashCode () : 0 ;
51
+ result = 31 * result + (voter_chat != null ? voter_chat .hashCode () : 0 );
45
52
result = 31 * result + (user != null ? user .hashCode () : 0 );
46
53
result = 31 * result + Arrays .hashCode (option_ids );
47
54
return result ;
@@ -51,6 +58,7 @@ public int hashCode() {
51
58
public String toString () {
52
59
return "PollAnswer{" +
53
60
"poll_id='" + poll_id + '\'' +
61
+ ", voter_chat=" + voter_chat +
54
62
", user=" + user +
55
63
", option_ids=" + Arrays .toString (option_ids ) +
56
64
'}' ;
0 commit comments