org.springframework.data.mongodb.core.geo
Class GeoPage<T>
java.lang.Object
org.springframework.data.domain.PageImpl<GeoResult<T>>
org.springframework.data.mongodb.core.geo.GeoPage<T>
- All Implemented Interfaces:
- Serializable, Iterable<GeoResult<T>>, Page<GeoResult<T>>
public class GeoPage<T>
- extends PageImpl<GeoResult<T>>
Custom Page
to carry the average distance retrieved from the GeoResults
the GeoPage
is set up
from.
- Author:
- Oliver Gierke
- See Also:
- Serialized Form
Methods inherited from class org.springframework.data.domain.PageImpl |
equals, getContent, getNumber, getNumberOfElements, getSize, getSort, getTotalElements, getTotalPages, hasContent, hashCode, hasNextPage, hasPreviousPage, isFirstPage, isLastPage, iterator, toString |
GeoPage
public GeoPage(GeoResults<T> results)
- Creates a new
GeoPage
from the given GeoResults
.
- Parameters:
content
- must not be null.
GeoPage
public GeoPage(GeoResults<T> results,
Pageable pageable,
long total)
- Creates a new
GeoPage
from the given GeoResults
, Pageable
and total.
- Parameters:
results
- must not be null.pageable
- must not be null.total
-
getAverageDistance
public Distance getAverageDistance()
- Returns the average distance of the underlying results.
- Returns:
- the averageDistance
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.