Package io.resys.thena.api.entities
Class ImmutablePageQuery.Builder<P>
java.lang.Object
io.resys.thena.api.entities.ImmutablePageQuery.Builder<P>
- Enclosing class:
ImmutablePageQuery<P>
@Generated(from="PageQuery",
generator="Immutables")
public static final class ImmutablePageQuery.Builder<P>
extends Object
Builds instances of type
ImmutablePageQuery.
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutablePageQuery.final ImmutablePageQuery.Builder<P> Fill a builder with attribute values from the providedPageQueryinstance.final ImmutablePageQuery.Builder<P> offset(long offset) Initializes the value for theoffsetattribute.final ImmutablePageQuery.Builder<P> pageNumber(int pageNumber) Initializes the value for thepageNumberattribute.final ImmutablePageQuery.Builder<P> pageSize(int pageSize) Initializes the value for thepageSizeattribute.final ImmutablePageQuery.Builder<P> sort(PageQuery.PageSorting<P> sort) Initializes the value for thesortattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedPageQueryinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
pageNumber
Initializes the value for thepageNumberattribute.- Parameters:
pageNumber- The value for pageNumber- Returns:
thisbuilder for use in a chained invocation
-
pageSize
Initializes the value for thepageSizeattribute.- Parameters:
pageSize- The value for pageSize- Returns:
thisbuilder for use in a chained invocation
-
offset
Initializes the value for theoffsetattribute.- Parameters:
offset- The value for offset- Returns:
thisbuilder for use in a chained invocation
-
sort
@CanIgnoreReturnValue public final ImmutablePageQuery.Builder<P> sort(PageQuery.PageSorting<P> sort) Initializes the value for thesortattribute.- Parameters:
sort- The value for sort- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutablePageQuery.- Returns:
- An immutable instance of PageQuery
- Throws:
IllegalStateException- if any required attributes are missing
-