public static class PagedGroupResult.Builder extends Object
Modifier and Type | Method and Description |
---|---|
PagedGroupResult.Builder |
addAllContent(Iterable<? extends GroupResult> elements)
Adds elements to
content list. |
PagedGroupResult.Builder |
addContent(GroupResult... elements)
Adds elements to
content list. |
PagedGroupResult.Builder |
addContent(GroupResult element)
Adds one element to
content list. |
PagedGroupResult |
build()
Builds a new
PagedGroupResult . |
PagedGroupResult.Builder |
content(Iterable<? extends GroupResult> elements)
Sets or replaces all elements for
content list. |
PagedGroupResult.Builder |
page(int page)
Initializes the value for the
page attribute. |
PagedGroupResult.Builder |
size(int size)
Initializes the value for the
size attribute. |
PagedGroupResult.Builder |
totalSize(int totalSize)
Initializes the value for the
totalSize attribute. |
PagedGroupResult.Builder |
using(PagedGroupResult instance)
Fill a builder with attribute values from the provided
PagedGroupResult instance. |
public final PagedGroupResult.Builder using(PagedGroupResult instance)
PagedGroupResult
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 PagedGroupResult.Builder addContent(GroupResult element)
content
list.element
- A content elementthis
builder for use in a chained invocationpublic final PagedGroupResult.Builder addContent(GroupResult... elements)
content
list.elements
- An array of content elementsthis
builder for use in a chained invocationpublic final PagedGroupResult.Builder content(Iterable<? extends GroupResult> elements)
content
list.elements
- An iterable of content elementsthis
builder for use in a chained invocationpublic final PagedGroupResult.Builder addAllContent(Iterable<? extends GroupResult> elements)
content
list.elements
- An iterable of content elementsthis
builder for use in a chained invocationpublic final PagedGroupResult.Builder page(int page)
page
attribute.page
- The value for pagethis
builder for use in a chained invocationpublic final PagedGroupResult.Builder size(int size)
size
attribute.size
- The value for sizethis
builder for use in a chained invocationpublic final PagedGroupResult.Builder totalSize(int totalSize)
totalSize
attribute.totalSize
- The value for totalSizethis
builder for use in a chained invocationpublic PagedGroupResult build()
PagedGroupResult
.IllegalStateException
- if any required attributes are missingCopyright © 2016–2019 CLX Communications. All rights reserved.