Class DefaultedPageable

java.lang.Object
org.springframework.data.rest.webmvc.support.DefaultedPageable

public final class DefaultedPageable extends Object
Value object to capture a Pageable as well whether it is the default one configured.
Author:
Oliver Gierke
  • Constructor Details

    • DefaultedPageable

      public DefaultedPageable(Pageable pageable, boolean isDefault)
  • Method Details

    • getPageable

      public Pageable getPageable()
      Returns the delegate Pageable.
      Returns:
      can be null.
    • isDefault

      public boolean isDefault()
      Returns whether the contained Pageable is the default one configured.
      Returns:
      the isDefault
    • unpagedIfDefault

      public Pageable unpagedIfDefault()
      Returns Pageable.unpaged() if the contained Pageable is the default one.
      Returns:
      will never be null.
      Since:
      3.3
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object