-
public final class PollResultsViewState.ResultItemRepresents a single poll result item for one option.
Contains the option details, vote count, winner status, a preview of votes (typically limited to a few votes), and a flag indicating whether to show the "Show All" button to navigate to the detailed view.
-
-
Constructor Summary
Constructors Constructor Description PollResultsViewState.ResultItem(Option option, Boolean isWinner, Integer voteCount, List<Vote> votes, Boolean showAllButton)
-
Method Summary
Modifier and Type Method Description final OptiongetOption()final BooleangetIsWinner()final IntegergetVoteCount()final List<Vote>getVotes()final BooleangetShowAllButton()-
-
Constructor Detail
-
PollResultsViewState.ResultItem
PollResultsViewState.ResultItem(Option option, Boolean isWinner, Integer voteCount, List<Vote> votes, Boolean showAllButton)
- Parameters:
option- The poll option associated with this result.isWinner- True if this option has the highest vote count and is the winner.voteCount- The total number of votes for this option.votes- The preview list of votes for this option (typically limited to a few items).showAllButton- True if the "Show All" button should be displayed to view all votes.
-
-
Method Detail
-
getOption
final Option getOption()
-
getIsWinner
final Boolean getIsWinner()
-
getVoteCount
final Integer getVoteCount()
-
getShowAllButton
final Boolean getShowAllButton()
-
-
-
-