Package io.getstream.chat.android.models
Class PollConfig
-
- All Implemented Interfaces:
public final class PollConfigThe PollConfig object is used to configure a poll.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final List<String>optionsprivate final Stringdescriptionprivate final VotingVisibilityvotingVisibilityprivate final BooleanenforceUniqueVoteprivate final IntegermaxVotesAllowedprivate final BooleanallowUserSuggestedOptionsprivate final BooleanallowAnswers
-
Constructor Summary
Constructors Constructor Description PollConfig(String name, List<String> options, String description, VotingVisibility votingVisibility, Boolean enforceUniqueVote, Integer maxVotesAllowed, Boolean allowUserSuggestedOptions, Boolean allowAnswers)
-
Method Summary
Modifier and Type Method Description final StringgetName()The name of the poll. final List<String>getOptions()The list of options for the poll. final StringgetDescription()The description of the poll. final VotingVisibilitygetVotingVisibility()The visibility of the votes. final BooleangetEnforceUniqueVote()If set to true, a user can only vote once. final IntegergetMaxVotesAllowed()The maximum number of votes a user can cast. final BooleangetAllowUserSuggestedOptions()If set to true, users can suggest new options. final BooleangetAllowAnswers()If set to true, users can send answers. -
-
Method Detail
-
getOptions
final List<String> getOptions()
The list of options for the poll.
-
getDescription
final String getDescription()
The description of the poll.
-
getVotingVisibility
final VotingVisibility getVotingVisibility()
The visibility of the votes. Default is VotingVisibility.PUBLIC. If set to VotingVisibility.ANONYMOUS, the votes will be anonymous.
-
getEnforceUniqueVote
final Boolean getEnforceUniqueVote()
If set to true, a user can only vote once. Default is true.
-
getMaxVotesAllowed
final Integer getMaxVotesAllowed()
The maximum number of votes a user can cast. Default is 1.
-
getAllowUserSuggestedOptions
final Boolean getAllowUserSuggestedOptions()
If set to true, users can suggest new options. Default is false.
-
getAllowAnswers
final Boolean getAllowAnswers()
If set to true, users can send answers. Default is false.
-
-
-
-