Package io.resys.thena.api.entities
Class ImmutablePageSorting.Builder<P>
java.lang.Object
io.resys.thena.api.entities.ImmutablePageSorting.Builder<P>
- Enclosing class:
ImmutablePageSorting<P>
@Generated(from="PageQuery.PageSorting",
generator="Immutables")
public static final class ImmutablePageSorting.Builder<P>
extends Object
Builds instances of type
ImmutablePageSorting.
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 TypeMethodDescriptionfinal ImmutablePageSorting.Builder<P> addAllOrders(Iterable<? extends PageQuery.PageSortingOrder<P>> elements) Adds elements toorderslist.final ImmutablePageSorting.Builder<P> addOrders(PageQuery.PageSortingOrder<P> element) Adds one element toorderslist.final ImmutablePageSorting.Builder<P> addOrders(PageQuery.PageSortingOrder<P>... elements) Adds elements toorderslist.build()Builds a newImmutablePageSorting.final ImmutablePageSorting.Builder<P> from(PageQuery.PageSorting<P> instance) Fill a builder with attribute values from the providedPageSortinginstance.final ImmutablePageSorting.Builder<P> orders(Iterable<? extends PageQuery.PageSortingOrder<P>> elements) Sets or replaces all elements fororderslist.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePageSorting.Builder<P> from(PageQuery.PageSorting<P> instance) Fill a builder with attribute values from the providedPageSortinginstance. 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.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addOrders
@CanIgnoreReturnValue public final ImmutablePageSorting.Builder<P> addOrders(PageQuery.PageSortingOrder<P> element) Adds one element toorderslist.- Parameters:
element- A orders element- Returns:
thisbuilder for use in a chained invocation
-
addOrders
@CanIgnoreReturnValue @SafeVarargs public final ImmutablePageSorting.Builder<P> addOrders(PageQuery.PageSortingOrder<P>... elements) Adds elements toorderslist.- Parameters:
elements- An array of orders elements- Returns:
thisbuilder for use in a chained invocation
-
orders
@CanIgnoreReturnValue public final ImmutablePageSorting.Builder<P> orders(Iterable<? extends PageQuery.PageSortingOrder<P>> elements) Sets or replaces all elements fororderslist.- Parameters:
elements- An iterable of orders elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOrders
@CanIgnoreReturnValue public final ImmutablePageSorting.Builder<P> addAllOrders(Iterable<? extends PageQuery.PageSortingOrder<P>> elements) Adds elements toorderslist.- Parameters:
elements- An iterable of orders elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutablePageSorting.- Returns:
- An immutable instance of PageSorting
- Throws:
IllegalStateException- if any required attributes are missing
-