Skip to content

Commit

Permalink
Added the field text_entities to the class PollOption
Browse files Browse the repository at this point in the history
  • Loading branch information
mircoianese committed May 28, 2024
1 parent 0b8a9e3 commit 10aa4d1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class PollOption implements Serializable {

private String text;
private Integer voter_count;
private MessageEntity[] text_entities;

public String text() {
return text;
Expand All @@ -20,13 +21,19 @@ public Integer voterCount() {
return voter_count;
}

public MessageEntity[] textEntities() {
return text_entities;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

PollOption that = (PollOption) o;

if (!Arrays.equals(text_entities, that.text_entities)) return false;

if (text != null ? !text.equals(that.text) : that.text != null) return false;
return voter_count != null ? voter_count.equals(that.voter_count) : that.voter_count == null;
}
Expand All @@ -43,6 +50,7 @@ public String toString() {
return "PollOption{" +
"text='" + text + '\'' +
", voter_count=" + voter_count +
", text_entities=" + Arrays.toString(text_entities) +
'}';
}
}

0 comments on commit 10aa4d1

Please sign in to comment.