@NotThreadSafe public static final class Message.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
Message.Builder |
addAllAttachments(Iterable<? extends Attachment> elements)
Adds elements to
attachments list. |
Message.Builder |
addAttachments(Attachment... elements)
Adds elements to
attachments list. |
Message.Builder |
addAttachments(Attachment element)
Adds one element to
attachments list. |
Message |
build()
Builds a new
Message. |
Message.Builder |
from(MessageIF instance)
Fill a builder with attribute values from the provided
MessageIF instance. |
Message.Builder |
setAttachments(Iterable<? extends Attachment> elements)
Sets or replaces all elements for
attachments list. |
Message.Builder |
setChannel(SlackChannel channel)
Initializes the value for the
channel attribute. |
Message.Builder |
setNext(LiteMessage next)
Initializes the optional value
next to next. |
Message.Builder |
setNext(Optional<LiteMessage> next)
Initializes the optional value
next to next. |
Message.Builder |
setNextNext(LiteMessage nextNext)
Initializes the optional value
nextNext to nextNext. |
Message.Builder |
setNextNext(Optional<LiteMessage> nextNext)
Initializes the optional value
nextNext to nextNext. |
Message.Builder |
setPermalink(Optional<String> permalink)
Initializes the optional value
permalink to permalink. |
Message.Builder |
setPermalink(String permalink)
Initializes the optional value
permalink to permalink. |
Message.Builder |
setPrevious(LiteMessage previous)
Initializes the optional value
previous to previous. |
Message.Builder |
setPrevious(Optional<LiteMessage> previous)
Initializes the optional value
previous to previous. |
Message.Builder |
setPreviousPrevious(LiteMessage previousPrevious)
Initializes the optional value
previousPrevious to previousPrevious. |
Message.Builder |
setPreviousPrevious(Optional<LiteMessage> previousPrevious)
Initializes the optional value
previousPrevious to previousPrevious. |
Message.Builder |
setTeam(String team)
Initializes the value for the
team attribute. |
Message.Builder |
setText(String text)
Initializes the value for the
text attribute. |
Message.Builder |
setTimestamp(String timestamp)
Initializes the value for the
timestamp attribute. |
Message.Builder |
setType(String type)
Initializes the value for the
type attribute. |
Message.Builder |
setUser(String user)
Initializes the value for the
user attribute. |
Message.Builder |
setUsername(String username)
Initializes the value for the
username attribute. |
public final Message.Builder from(MessageIF instance)
MessageIF instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final Message.Builder setType(String type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final Message.Builder setTeam(String team)
team attribute.team - The value for teamthis builder for use in a chained invocationpublic final Message.Builder setChannel(SlackChannel channel)
channel attribute.channel - The value for channelthis builder for use in a chained invocationpublic final Message.Builder setUser(String user)
user attribute.user - The value for userthis builder for use in a chained invocationpublic final Message.Builder setUsername(String username)
username attribute.username - The value for usernamethis builder for use in a chained invocationpublic final Message.Builder setTimestamp(String timestamp)
timestamp attribute.timestamp - The value for timestampthis builder for use in a chained invocationpublic final Message.Builder setText(String text)
text attribute.text - The value for textthis builder for use in a chained invocationpublic final Message.Builder setPermalink(@Nullable String permalink)
permalink to permalink.permalink - The value for permalink, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Message.Builder setPermalink(Optional<String> permalink)
permalink to permalink.permalink - The value for permalinkthis builder for use in a chained invocationpublic final Message.Builder addAttachments(Attachment element)
attachments list.element - A attachments elementthis builder for use in a chained invocationpublic final Message.Builder addAttachments(Attachment... elements)
attachments list.elements - An array of attachments elementsthis builder for use in a chained invocationpublic final Message.Builder setAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final Message.Builder addAllAttachments(Iterable<? extends Attachment> elements)
attachments list.elements - An iterable of attachments elementsthis builder for use in a chained invocationpublic final Message.Builder setPreviousPrevious(@Nullable LiteMessage previousPrevious)
previousPrevious to previousPrevious.previousPrevious - The value for previousPrevious, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Message.Builder setPreviousPrevious(Optional<LiteMessage> previousPrevious)
previousPrevious to previousPrevious.previousPrevious - The value for previousPreviousthis builder for use in a chained invocationpublic final Message.Builder setPrevious(@Nullable LiteMessage previous)
previous to previous.previous - The value for previous, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Message.Builder setPrevious(Optional<LiteMessage> previous)
previous to previous.previous - The value for previousthis builder for use in a chained invocationpublic final Message.Builder setNext(@Nullable LiteMessage next)
next to next.next - The value for next, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Message.Builder setNext(Optional<LiteMessage> next)
next to next.next - The value for nextthis builder for use in a chained invocationpublic final Message.Builder setNextNext(@Nullable LiteMessage nextNext)
nextNext to nextNext.nextNext - The value for nextNext, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final Message.Builder setNextNext(Optional<LiteMessage> nextNext)
nextNext to nextNext.nextNext - The value for nextNextthis builder for use in a chained invocationCopyright © 2019. All rights reserved.