Class ImmutablePageSorting<P>

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

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

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

  • Method Details

    • getOrders

      public com.google.common.collect.ImmutableList<PageQuery.PageSortingOrder<P>> getOrders()
      Specified by:
      getOrders in interface PageQuery.PageSorting<P>
      Returns:
      The value of the orders attribute
    • withOrders

      @SafeVarargs public final ImmutablePageSorting<P> withOrders(PageQuery.PageSortingOrder<P>... elements)
      Copy the current immutable object with elements that replace the content of orders.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withOrders

      public final ImmutablePageSorting<P> withOrders(Iterable<? extends PageQuery.PageSortingOrder<P>> elements)
      Copy the current immutable object with elements that replace the content of orders. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of orders elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutablePageSorting 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: orders.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static <P> ImmutablePageSorting<P> copyOf(PageQuery.PageSorting<P> instance)
      Creates an immutable copy of a PageQuery.PageSorting 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 PageSorting instance
    • builder

      public static <P> ImmutablePageSorting.Builder<P> builder()
      Creates a builder for ImmutablePageSorting.
       ImmutablePageSorting.<P>builder()
          .addOrders|addAllOrders(io.resys.thena.api.entities.PageQuery.PageSortingOrder<P>) // orders elements
          .build();
       
      Type Parameters:
      P - generic parameter P
      Returns:
      A new ImmutablePageSorting builder