Class ImmutablePaginationRequestWrapperDto.Builder<W>
- java.lang.Object
-
- com.chutneytesting.server.core.domain.tools.ImmutablePaginationRequestWrapperDto.Builder<W>
-
- Enclosing class:
- ImmutablePaginationRequestWrapperDto<W>
@NotThreadSafe public static final class ImmutablePaginationRequestWrapperDto.Builder<W> extends Object
Builds instances of typeImmutablePaginationRequestWrapperDto. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePaginationRequestWrapperDto<W>build()Builds a newImmutablePaginationRequestWrapperDto.ImmutablePaginationRequestWrapperDto.Builder<W>elementPerPage(Integer elementPerPage)Initializes the value for theelementPerPageattribute.ImmutablePaginationRequestWrapperDto.Builder<W>from(PaginationRequestWrapperDto<W> instance)Fill a builder with attribute values from the providedPaginationRequestWrapperDtoinstance.ImmutablePaginationRequestWrapperDto.Builder<W>pageNumber(Integer pageNumber)Initializes the value for thepageNumberattribute.ImmutablePaginationRequestWrapperDto.Builder<W>wrappedRequest(Optional<W> wrappedRequest)Initializes the value for thewrappedRequestattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> from(PaginationRequestWrapperDto<W> instance)
Fill a builder with attribute values from the providedPaginationRequestWrapperDtoinstance. 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
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> pageNumber(Integer pageNumber)
Initializes the value for thepageNumberattribute.- Parameters:
pageNumber- The value for pageNumber- Returns:
thisbuilder for use in a chained invocation
-
elementPerPage
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> elementPerPage(Integer elementPerPage)
Initializes the value for theelementPerPageattribute.- Parameters:
elementPerPage- The value for elementPerPage- Returns:
thisbuilder for use in a chained invocation
-
wrappedRequest
@CanIgnoreReturnValue public final ImmutablePaginationRequestWrapperDto.Builder<W> wrappedRequest(Optional<W> wrappedRequest)
Initializes the value for thewrappedRequestattribute.If not set, this attribute will have a default value as returned by the initializer of
wrappedRequest.- Parameters:
wrappedRequest- The value for wrappedRequest- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePaginationRequestWrapperDto<W> build()
Builds a newImmutablePaginationRequestWrapperDto.- Returns:
- An immutable instance of PaginationRequestWrapperDto
- Throws:
IllegalStateException- if any required attributes are missing
-
-