Class ImmutablePaginationRequestWrapperDto<W>
java.lang.Object
fr.enedis.chutney.server.core.domain.tools.ImmutablePaginationRequestWrapperDto<W>
- All Implemented Interfaces:
PaginationRequestWrapperDto<W>
@Generated(from="PaginationRequestWrapperDto",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutablePaginationRequestWrapperDto<W>
extends Object
implements PaginationRequestWrapperDto<W>
Immutable implementation of
PaginationRequestWrapperDto.
Use the builder to create immutable instances:
ImmutablePaginationRequestWrapperDto.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePaginationRequestWrapperDto. -
Method Summary
Modifier and TypeMethodDescriptionstatic <W> ImmutablePaginationRequestWrapperDto.Builder<W> builder()Creates a builder forImmutablePaginationRequestWrapperDto.static <W> ImmutablePaginationRequestWrapperDto<W> copyOf(PaginationRequestWrapperDto<W> instance) Creates an immutable copy of aPaginationRequestWrapperDtovalue.booleanThis instance is equal to all instances ofImmutablePaginationRequestWrapperDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:pageNumber,elementPerPage,wrappedRequest.toString()Prints the immutable valuePaginationRequestWrapperDtowith attribute values.withElementPerPage(Integer value) Copy the current immutable object by setting a value for theelementPerPageattribute.withPageNumber(Integer value) Copy the current immutable object by setting a value for thepageNumberattribute.withWrappedRequest(Optional<W> value) Copy the current immutable object by setting a value for thewrappedRequestattribute.
-
Method Details
-
pageNumber
- Specified by:
pageNumberin interfacePaginationRequestWrapperDto<W>- Returns:
- The value of the
pageNumberattribute
-
elementPerPage
- Specified by:
elementPerPagein interfacePaginationRequestWrapperDto<W>- Returns:
- The value of the
elementPerPageattribute
-
wrappedRequest
- Specified by:
wrappedRequestin interfacePaginationRequestWrapperDto<W>- Returns:
- The value of the
wrappedRequestattribute
-
withPageNumber
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 or the
thisobject
-
withElementPerPage
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 or the
thisobject
-
withWrappedRequest
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 or the
thisobject
-
equals
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
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
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
-