Class PollContent


  • public class PollContent
    extends java.lang.Object
    • Constructor Detail

      • PollContent

        public PollContent()
    • Method Detail

      • addPollOption

        public PollContent addPollOption​(PollOptionContent pollOptionContent)
        Add poll option the post. Options will be returned in the same order as added.
        Parameters:
        pollOptionContent - poll option content.
        Returns:
        same instance for a method chaining.
      • addPollOptions

        public PollContent addPollOptions​(java.util.List<PollOptionContent> pollOptionContents)
        Add multiple poll options the post. Options will be returned in the same order as added.
        Parameters:
        pollOptionContents - poll option content.
        Returns:
        same instance for a method chaining.
      • withEndDate

        public PollContent withEndDate​(java.util.Date endDate)
        Set end date of the poll. Will override the previous value if it was set.
        Parameters:
        endDate - post end date.
        Returns:
        same instance for a method chaining.
      • withAllowMultipleVotes

        public PollContent withAllowMultipleVotes​(boolean allowMultipleVotes)
        Set if multiple votes are allowed or not. Will override the previous value if it was set.
        Parameters:
        allowMultipleVotes - allow multiple votes or not.
        Returns:
        same instance for a method chaining.
      • areMultipleVotesAllowed

        public java.lang.Boolean areMultipleVotesAllowed()
        Returns:
        true, if multiple votes are allowed, otherwise false.
      • getPollOptions

        public java.util.List<PollOptionContent> getPollOptions()
        Returns:
        list of poll options. Empty if no options added.
      • getEndDate

        public java.util.Date getEndDate()
        Returns:
        end date.