Class ImmutablePaginationRequestWrapperDto<W>
- java.lang.Object
-
- com.chutneytesting.server.core.domain.tools.ImmutablePaginationRequestWrapperDto<W>
-
- All Implemented Interfaces:
PaginationRequestWrapperDto<W>
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePaginationRequestWrapperDto<W> extends Object implements PaginationRequestWrapperDto<W>
Immutable implementation ofPaginationRequestWrapperDto.Use the builder to create immutable instances:
ImmutablePaginationRequestWrapperDto.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePaginationRequestWrapperDto.Builder<W>Builds instances of typeImmutablePaginationRequestWrapperDto.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <W> ImmutablePaginationRequestWrapperDto.Builder<W>builder()Creates a builder forImmutablePaginationRequestWrapperDto.static <W> ImmutablePaginationRequestWrapperDto<W>copyOf(PaginationRequestWrapperDto<W> instance)Creates an immutable copy of aPaginationRequestWrapperDtovalue.IntegerelementPerPage()booleanequals(Object another)This instance is equal to all instances ofImmutablePaginationRequestWrapperDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:pageNumber,elementPerPage,wrappedRequest.IntegerpageNumber()StringtoString()Prints the immutable valuePaginationRequestWrapperDtowith attribute values.ImmutablePaginationRequestWrapperDto<W>withElementPerPage(Integer value)Copy the current immutable object by setting a value for theelementPerPageattribute.ImmutablePaginationRequestWrapperDto<W>withPageNumber(Integer value)Copy the current immutable object by setting a value for thepageNumberattribute.ImmutablePaginationRequestWrapperDto<W>withWrappedRequest(Optional<W> value)Copy the current immutable object by setting a value for thewrappedRequestattribute.Optional<W>wrappedRequest()
-
-
-
Method Detail
-
pageNumber
public Integer pageNumber()
- Specified by:
pageNumberin interfacePaginationRequestWrapperDto<W>- Returns:
- The value of the
pageNumberattribute
-
elementPerPage
public Integer elementPerPage()
- Specified by:
elementPerPagein interfacePaginationRequestWrapperDto<W>- Returns:
- The value of the
elementPerPageattribute
-
wrappedRequest
public Optional<W> wrappedRequest()
- Specified by:
wrappedRequestin interfacePaginationRequestWrapperDto<W>- Returns:
- The value of the
wrappedRequestattribute
-
withPageNumber
public final ImmutablePaginationRequestWrapperDto<W> withPageNumber(Integer value)
Copy the current immutable object by setting a value for thepageNumberattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for pageNumber- Returns:
- A modified copy of the
thisobject
-
withElementPerPage
public final ImmutablePaginationRequestWrapperDto<W> withElementPerPage(Integer value)
Copy the current immutable object by setting a value for theelementPerPageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementPerPage- Returns:
- A modified copy of the
thisobject
-
withWrappedRequest
public final ImmutablePaginationRequestWrapperDto<W> withWrappedRequest(Optional<W> value)
Copy the current immutable object by setting a value for thewrappedRequestattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for wrappedRequest- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePaginationRequestWrapperDtothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:pageNumber,elementPerPage,wrappedRequest.
-
toString
public String toString()
Prints the immutable valuePaginationRequestWrapperDtowith attribute values.
-
copyOf
public static <W> ImmutablePaginationRequestWrapperDto<W> copyOf(PaginationRequestWrapperDto<W> instance)
Creates an immutable copy of aPaginationRequestWrapperDtovalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
W- generic parameter W- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PaginationRequestWrapperDto instance
-
builder
public static <W> ImmutablePaginationRequestWrapperDto.Builder<W> builder()
Creates a builder forImmutablePaginationRequestWrapperDto.ImmutablePaginationRequestWrapperDto.<W>builder() .pageNumber(Integer) // requiredpageNumber.elementPerPage(Integer) // requiredelementPerPage.wrappedRequest(Optional<W>) // optionalwrappedRequest.build();- Type Parameters:
W- generic parameter W- Returns:
- A new ImmutablePaginationRequestWrapperDto builder
-
-