@@ -25,6 +25,8 @@ public enum Type {
2525 private Integer correct_option_id ;
2626 private String explanation ;
2727 private MessageEntity [] explanation_entities ;
28+ private Integer open_period ;
29+ private Integer close_date ;
2830
2931 public String id () {
3032 return id ;
@@ -70,6 +72,14 @@ public MessageEntity[] explanationEntities() {
7072 return explanation_entities ;
7173 }
7274
75+ public Integer openPeriod () {
76+ return open_period ;
77+ }
78+
79+ public Integer closeDate () {
80+ return close_date ;
81+ }
82+
7383 @ Override
7484 public boolean equals (Object o ) {
7585 if (this == o ) return true ;
@@ -92,7 +102,9 @@ public boolean equals(Object o) {
92102 return false ;
93103 if (explanation != null ? !explanation .equals (poll .explanation ) : poll .explanation != null ) return false ;
94104 // Probably incorrect - comparing Object[] arrays with Arrays.equals
95- return Arrays .equals (explanation_entities , poll .explanation_entities );
105+ if (!Arrays .equals (explanation_entities , poll .explanation_entities )) return false ;
106+ if (open_period != null ? !open_period .equals (poll .open_period ) : poll .open_period != null ) return false ;
107+ return close_date != null ? close_date .equals (poll .close_date ) : poll .close_date == null ;
96108 }
97109
98110 @ Override
@@ -114,6 +126,8 @@ public String toString() {
114126 ", correct_option_id=" + correct_option_id +
115127 ", explanation='" + explanation + '\'' +
116128 ", explanation_entities=" + Arrays .toString (explanation_entities ) +
129+ ", open_period=" + open_period +
130+ ", close_date=" + close_date +
117131 '}' ;
118132 }
119133}
0 commit comments