|
@ -6,14 +6,16 @@ public class Poll { |
|
|
private final String question; |
|
|
private final String question; |
|
|
private Entry[] entries; |
|
|
private Entry[] entries; |
|
|
private int availableVoteCount; |
|
|
private int availableVoteCount; |
|
|
private String pollFormUrl, sc; |
|
|
private String pollFormUrl, sc, removeVoteUrl; |
|
|
|
|
|
|
|
|
public Poll(String question, Entry[] entries, int availableVoteCount, String pollFormUrl, String sc) { |
|
|
public Poll(String question, Entry[] entries, int availableVoteCount, String pollFormUrl, String sc, |
|
|
|
|
|
String removeVoteUrl) { |
|
|
this.question = question; |
|
|
this.question = question; |
|
|
this.entries = entries; |
|
|
this.entries = entries; |
|
|
this.availableVoteCount = availableVoteCount; |
|
|
this.availableVoteCount = availableVoteCount; |
|
|
this.pollFormUrl = pollFormUrl; |
|
|
this.pollFormUrl = pollFormUrl; |
|
|
this.sc = sc; |
|
|
this.sc = sc; |
|
|
|
|
|
this.removeVoteUrl = removeVoteUrl; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public String getQuestion() { |
|
|
public String getQuestion() { |
|
@ -36,6 +38,10 @@ public class Poll { |
|
|
return sc; |
|
|
return sc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getRemoveVoteUrl() { |
|
|
|
|
|
return removeVoteUrl; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public int totalVotes() { |
|
|
public int totalVotes() { |
|
|
int sum = 0; |
|
|
int sum = 0; |
|
|
for (Entry entry : entries) { |
|
|
for (Entry entry : entries) { |
|
|