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 Summary
ConstructorsConstructorDescriptionGeoResults(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 Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GeoResults
Creates a newGeoResultsinstance manually calculating the average distance from the distance values of the givenGeoResults.- Parameters:
results- must not be null.
-
GeoResults
Creates 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.
-
GeoResults
Creates a newGeoResultsinstance from the givenGeoResults and average distance.- Parameters:
results- must not be null.averageDistance- must not be null.
-
-
Method Details
-
getAverageDistance
Returns the average distance of allGeoResults in this list.- Returns:
- the averageDistance
-
getContent
Returns the actual content of theGeoResults.- Returns:
-
iterator
-
equals
-
hashCode
public int hashCode() -
toString
-