public class GeoPage<T> extends PageImpl<GeoResult<T>>
Constructor and Description |
---|
GeoPage(GeoResults<T> results)
Creates a new
GeoPage from the given GeoResults . |
GeoPage(GeoResults<T> results,
Pageable pageable,
long total)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Distance |
getAverageDistance()
Returns the average distance of the underlying results.
|
List<T> |
getContent()
Returns the page content as
List . |
int |
getNumber()
Returns the number of the current
Slice . |
int |
getNumberOfElements()
Returns the number of elements currently on this
Slice . |
int |
getSize()
Returns the size of the
Slice . |
Sort |
getSort()
Returns the sorting parameters for the
Slice . |
boolean |
hasContent()
Returns whether the
Slice has content at all. |
int |
hashCode() |
boolean |
hasPrevious()
Returns if there is a previous
Slice . |
boolean |
isFirst()
Returns whether the current
Slice is the first one. |
Iterator<T> |
iterator() |
Pageable |
nextPageable()
|
Pageable |
previousPageable()
|
getTotalElements, getTotalPages, hasNext, hasNextPage, hasPreviousPage, isFirstPage, isLast, isLastPage, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getContent, getNumber, getNumberOfElements, getSize, getSort, hasContent, hasPrevious, isFirst, nextPageable, previousPageable
forEach, iterator, spliterator
public GeoPage(GeoResults<T> results)
GeoPage
from the given GeoResults
.content
- must not be null.public GeoPage(GeoResults<T> results, Pageable pageable, long total)
results
- must not be null.pageable
- must not be null.total
- public Distance getAverageDistance()
public int getNumber()
Slice
Slice
. Is always non-negative.public int getSize()
Slice
Slice
.public int getNumberOfElements()
Slice
Slice
.getNumberOfElements
in interface Slice<T>
Slice
.public boolean hasPrevious()
Slice
Slice
.hasPrevious
in interface Slice<T>
Slice
.public boolean isFirst()
Slice
Slice
is the first one.public Pageable nextPageable()
Slice
Pageable
to request the next Slice
. Can be null in case the current
Slice
is already the last one. Clients should check Slice.hasNext()
before calling this method to make
sure they receive a non-null value.nextPageable
in interface Slice<T>
public Pageable previousPageable()
Slice
Pageable
to request the previous Slice
. Can be null in case the current
Slice
is already the first one. Clients should check Slice.hasPrevious()
before calling this method make
sure receive a non-null value.previousPageable
in interface Slice<T>
public boolean hasContent()
Slice
Slice
has content at all.hasContent
in interface Slice<T>
public List<T> getContent()
Slice
List
.getContent
in interface Slice<T>
public Sort getSort()
Slice
Slice
.Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.