Package org.springframework.data.geo
Class GeoResults<T>
java.lang.Object
org.springframework.data.geo.GeoResults<T>
- All Implemented Interfaces:
- Serializable,- Iterable<GeoResult<T>>
Value object to capture 
GeoResults as well as the average distance they have.- Since:
- 1.8
- Author:
- Oliver Gierke, Thomas Darimont
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionGeoResults(List<? extends GeoResult<T>> results) Creates a newGeoResultsinstance manually calculating the average distance from the distance values of the givenGeoResults.GeoResults(List<? extends GeoResult<T>> results, Distance averageDistance) Creates a newGeoResultsinstance from the givenGeoResults and average distance.GeoResults(List<? extends GeoResult<T>> results, Metric metric) Creates a newGeoResultsinstance manually calculating the average distance in the givenMetricfrom the distance values of the givenGeoResults.
- 
Method SummaryMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
GeoResultsCreates a newGeoResultsinstance manually calculating the average distance from the distance values of the givenGeoResults.- Parameters:
- results- must not be null.
 
- 
GeoResultsCreates a newGeoResultsinstance manually calculating the average distance in the givenMetricfrom the distance values of the givenGeoResults.- Parameters:
- results- must not be null.
- metric- must not be null.
 
- 
GeoResultsCreates a newGeoResultsinstance from the givenGeoResults and average distance.- Parameters:
- results- must not be null.
- averageDistance- must not be null.
 
 
- 
- 
Method Details- 
getAverageDistanceReturns the average distance of allGeoResults in this list.- Returns:
- the averageDistance
 
- 
getContentReturns the actual content of theGeoResults.- Returns:
 
- 
iterator
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-