Package im.getsocial.sdk.communities
Class PollContent
- java.lang.Object
-
- im.getsocial.sdk.communities.PollContent
-
public class PollContent extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PollContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollContent
addPollOption(PollOptionContent pollOptionContent)
Add poll option the post.PollContent
addPollOptions(java.util.List<PollOptionContent> pollOptionContents)
Add multiple poll options the post.java.lang.Boolean
areMultipleVotesAllowed()
java.util.Date
getEndDate()
java.util.List<PollOptionContent>
getPollOptions()
PollContent
withAllowMultipleVotes(boolean allowMultipleVotes)
Set if multiple votes are allowed or not.PollContent
withEndDate(java.util.Date endDate)
Set end date of the poll.
-
-
-
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.
-
-