Spring Data Core

org.springframework.data.domain
Interface Page<T>

Type Parameters:
T -
All Superinterfaces:
Iterable<T>, Slice<T>
All Known Implementing Classes:
GeoPage, PageImpl

public interface Page<T>
extends Slice<T>

A page is a sublist of a list of objects. It allows gain information about the position of it in the containing entire list.

Author:
Oliver Gierke

Method Summary
 long getTotalElements()
          Returns the total amount of elements.
 int getTotalPages()
          Returns the number of total pages.
 boolean hasNextPage()
          Deprecated. use Slice.hasNext() instead.
 boolean hasPreviousPage()
          Deprecated. use Slice.hasPrevious() instead.
 boolean isFirstPage()
          Deprecated. use Slice.isFirst() instead.
 boolean isLastPage()
          Deprecated. use Slice.isLast() instead.
 
Methods inherited from interface org.springframework.data.domain.Slice
getContent, getNumber, getNumberOfElements, getSize, getSort, hasContent, hasNext, hasPrevious, isFirst, isLast, nextPageable, previousPageable
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getTotalPages

int getTotalPages()
Returns the number of total pages.

Returns:
the number of toral pages

getTotalElements

long getTotalElements()
Returns the total amount of elements.

Returns:
the total amount of elements

hasPreviousPage

@Deprecated
boolean hasPreviousPage()
Deprecated. use Slice.hasPrevious() instead.

Returns if there is a previous page.

Returns:
if there is a previous page

isFirstPage

@Deprecated
boolean isFirstPage()
Deprecated. use Slice.isFirst() instead.

Returns whether the current page is the first one.

Returns:

hasNextPage

@Deprecated
boolean hasNextPage()
Deprecated. use Slice.hasNext() instead.

Returns if there is a next page.

Returns:
if there is a next page

isLastPage

@Deprecated
boolean isLastPage()
Deprecated. use Slice.isLast() instead.

Returns whether the current page is the last one.

Returns:

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.