Class ImmutablePageSortingOrder<P>

java.lang.Object
io.resys.thena.api.entities.ImmutablePageSortingOrder<P>
All Implemented Interfaces:
PageQuery.PageSortingOrder<P>

@Generated(from="PageQuery.PageSortingOrder", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutablePageSortingOrder<P> extends Object implements PageQuery.PageSortingOrder<P>
Immutable implementation of PageQuery.PageSortingOrder.

Use the builder to create immutable instances: ImmutablePageSortingOrder.builder().

  • Method Details

    • getDirection

      public PageQuery.PageSortDirection getDirection()
      Specified by:
      getDirection in interface PageQuery.PageSortingOrder<P>
      Returns:
      The value of the direction attribute
    • getProperty

      public P getProperty()
      Specified by:
      getProperty in interface PageQuery.PageSortingOrder<P>
      Returns:
      The value of the property attribute
    • getPropertyType

      @Nullable public String getPropertyType()
      Specified by:
      getPropertyType in interface PageQuery.PageSortingOrder<P>
      Returns:
      The value of the propertyType attribute
    • withDirection

      public final ImmutablePageSortingOrder<P> withDirection(PageQuery.PageSortDirection value)
      Copy the current immutable object by setting a value for the direction attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for direction
      Returns:
      A modified copy or the this object
    • withProperty

      public final ImmutablePageSortingOrder<P> withProperty(P value)
      Copy the current immutable object by setting a value for the property attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for property
      Returns:
      A modified copy or the this object
    • withPropertyType

      public final ImmutablePageSortingOrder<P> withPropertyType(@Nullable String value)
      Copy the current immutable object by setting a value for the propertyType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for propertyType (can be null)
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutablePageSortingOrder that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: direction, property, propertyType.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value PageSortingOrder with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static <P> ImmutablePageSortingOrder<P> copyOf(PageQuery.PageSortingOrder<P> instance)
      Creates an immutable copy of a PageQuery.PageSortingOrder value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Type Parameters:
      P - generic parameter P
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable PageSortingOrder instance
    • builder

      public static <P> ImmutablePageSortingOrder.Builder<P> builder()
      Creates a builder for ImmutablePageSortingOrder.
       ImmutablePageSortingOrder.<P>builder()
          .direction(io.resys.thena.api.entities.PageQuery.PageSortDirection) // required direction
          .property(P) // required property
          .propertyType(String | null) // nullable propertyType
          .build();
       
      Type Parameters:
      P - generic parameter P
      Returns:
      A new ImmutablePageSortingOrder builder