@NotThreadSafe public static final class MessagePage.Builder extends Object
MessagePage.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
MessagePage.Builder |
addAllMatches(Iterable<? extends Message> elements)
Adds elements to
matches list. |
MessagePage.Builder |
addMatches(Message... elements)
Adds elements to
matches list. |
MessagePage.Builder |
addMatches(Message element)
Adds one element to
matches list. |
MessagePage |
build()
Builds a new
MessagePage. |
MessagePage.Builder |
from(MessagePageIF instance)
Fill a builder with attribute values from the provided
MessagePageIF instance. |
MessagePage.Builder |
setMatches(Iterable<? extends Message> elements)
Sets or replaces all elements for
matches list. |
MessagePage.Builder |
setPaging(Paging paging)
Initializes the value for the
paging attribute. |
MessagePage.Builder |
setTotal(int total)
Initializes the value for the
total attribute. |
public final MessagePage.Builder from(MessagePageIF instance)
MessagePageIF 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 MessagePage.Builder setTotal(int total)
total attribute.total - The value for totalthis builder for use in a chained invocationpublic final MessagePage.Builder setPaging(Paging paging)
paging attribute.paging - The value for pagingthis builder for use in a chained invocationpublic final MessagePage.Builder addMatches(Message element)
matches list.element - A matches elementthis builder for use in a chained invocationpublic final MessagePage.Builder addMatches(Message... elements)
matches list.elements - An array of matches elementsthis builder for use in a chained invocationpublic final MessagePage.Builder setMatches(Iterable<? extends Message> elements)
matches list.elements - An iterable of matches elementsthis builder for use in a chained invocationpublic final MessagePage.Builder addAllMatches(Iterable<? extends Message> elements)
matches list.elements - An iterable of matches elementsthis builder for use in a chained invocationpublic MessagePage build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
MessagePage.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.