public static class PagedResources.PageMetadata extends Object
Modifier | Constructor and Description |
---|---|
protected |
PageMetadata() |
|
PageMetadata(long size,
long number,
long totalElements)
Creates a new
PagedResources.PageMetadata from the given size, numer and total elements. |
|
PageMetadata(long size,
long number,
long totalElements,
long totalPages)
Creates a new
PagedResources.PageMetadata from the given size, number, total elements and total pages. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getNumber()
Returns the number of the current page.
|
long |
getSize()
Returns the requested size of the page.
|
long |
getTotalElements()
Returns the total number of elements available.
|
long |
getTotalPages()
Returns how many pages are available in total.
|
int |
hashCode() |
String |
toString() |
protected PageMetadata()
public PageMetadata(long size, long number, long totalElements, long totalPages)
PagedResources.PageMetadata
from the given size, number, total elements and total pages.size
- number
- zero-indexed, must be less than totalPagestotalElements
- totalPages
- public PageMetadata(long size, long number, long totalElements)
PagedResources.PageMetadata
from the given size, numer and total elements.size
- the size of the pagenumber
- the number of the pagetotalElements
- the total number of elements availablepublic long getSize()
public long getTotalElements()
public long getTotalPages()
public long getNumber()
Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.