org.springframework.data.domain

## Interface Pageable

All Known Implementing Classes:
  AbstractPageRequest, PageRequest, QPageRequest

    public interface Pageable

Abstract interface for pagination information.

Author:
  Oliver Gierke

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Default Methods
`Pageable` `first()` Returns the `Pageable` requesting the first page.
`long` `getOffset()` Returns the offset to be taken according to the underlying page and page size.
`int` `getPageNumber()` Returns the page to be returned.
`int` `getPageSize()` Returns the number of items to be returned.
`Sort` `getSort()` Returns the sorting parameters.
`default Sort` `getSortOr(Sort sort)` Returns the current `Sort` or the given one if the current one is unsorted.
`boolean` `hasPrevious()` Returns whether there's a previous `Pageable` we can access from the current one.
`default boolean` `isPaged()` Returns whether the current `Pageable` contains pagination information.
`default boolean` `isUnpaged()` Returns whether the current `Pageable` does not contain pagination information.
`Pageable` `next()` Returns the `Pageable` requesting the next `Page`.
`Pageable` `previousOrFirst()` Returns the previous `Pageable` or the first `Pageable` if the current one already is the first one.
`default Optional<Pageable>` `toOptional()` Returns an `Optional` so that it can easily be mapped on.
`static Pageable` `unpaged()` Returns a `Pageable` instance representing no pagination setup.

### Method Detail

#### unpaged

    static Pageable unpaged()

Returns a `Pageable` instance representing no pagination setup.

Returns:

#### isPaged

    default boolean isPaged()

Returns whether the current `Pageable` contains pagination information.

Returns:

#### isUnpaged

    default boolean isUnpaged()

Returns whether the current `Pageable` does not contain pagination information.

Returns:

#### getPageNumber

    int getPageNumber()

Returns the page to be returned.

Returns:
  the page to be returned.

#### getPageSize

    int getPageSize()

Returns the number of items to be returned.

Returns:
  the number of items of that page

#### getOffset

    long getOffset()

Returns the offset to be taken according to the underlying page and page size.

Returns:
  the offset to be taken

#### getSort

    Sort getSort()

Returns the sorting parameters.

Returns:

#### getSortOr

    default Sort getSortOr(Sort sort)

Returns the current `Sort` or the given one if the current one is unsorted.

Parameters:
  `sort` - must not be null.
Returns:

#### next

    Pageable next()

Returns the `Pageable` requesting the next `Page`.

Returns:

#### previousOrFirst

    Pageable previousOrFirst()

Returns the previous `Pageable` or the first `Pageable` if the current one already is the first one.

Returns:

#### first

    Pageable first()

Returns the `Pageable` requesting the first page.

Returns:

#### hasPrevious

    boolean hasPrevious()

Returns whether there's a previous `Pageable` we can access from the current one. Will return false in case the current `Pageable` already refers to the first page.

Returns:

#### toOptional

    default Optional<Pageable> toOptional()

Returns an `Optional` so that it can easily be mapped on.

Returns: