Class PollConfig

  • All Implemented Interfaces:

    
    public final class PollConfig
    
                        

    The PollConfig object is used to configure a poll.

    • Constructor Detail

      • PollConfig

        PollConfig(String name, List<String> options, String description, VotingVisibility votingVisibility, Boolean enforceUniqueVote, Integer maxVotesAllowed, Boolean allowUserSuggestedOptions, Boolean allowAnswers)

        Constructor to create a PollConfig with a list of option texts.

        Parameters:
        name - The name of the poll.
        options - The list of option texts for the poll.
        description - The description of the poll.
        votingVisibility - The visibility of the votes.
        enforceUniqueVote - If set to true, a user can only vote once.
        maxVotesAllowed - The maximum number of votes a user can cast.
        allowUserSuggestedOptions - If set to true, users can suggest new options.
        allowAnswers - If set to true, users can send answers.
      • PollConfig

        PollConfig(String name, List<PollOption> options, String description, VotingVisibility votingVisibility, Boolean enforceUniqueVote, Integer maxVotesAllowed, Boolean allowUserSuggestedOptions, Boolean allowAnswers, Map<String, Object> extraData)

        Alternative constructor to create a PollConfig with a list of options with extra data.

        Parameters:
        name - The name of the poll.
        options - The list of options (with optional extra data) for the poll.
        description - The description of the poll.
        votingVisibility - The visibility of the votes.
        enforceUniqueVote - If set to true, a user can only vote once.
        maxVotesAllowed - The maximum number of votes a user can cast.
        allowUserSuggestedOptions - If set to true, users can suggest new options.
        allowAnswers - If set to true, users can send answers.
        extraData - Any additional data associated with the poll.