public static class PollResponse.Builder extends AbstractResponse.Builder<PollResponse.Builder,PollResponse>
| Modifier and Type | Method and Description |
|---|---|
PollResponse |
build() |
boolean |
equals(Object object) |
int |
hashCode() |
String |
toString() |
PollResponse.Builder |
withAccepted(boolean accepted)
Sets whether the poll was granted.
|
PollResponse.Builder |
withTerm(long term)
Sets the response term.
|
withError, withStatuspublic PollResponse.Builder withTerm(long term)
term - The response term.IllegalArgumentException - if term is not positivepublic PollResponse.Builder withAccepted(boolean accepted)
accepted - Whether the poll was granted.public PollResponse build()
build in class AbstractResponse.Builder<PollResponse.Builder,PollResponse>IllegalStateException - if status is OK and term is not positiveCopyright © 2013–2015. All rights reserved.