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
GeoResult
s 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 newGeoResults
instance manually calculating the average distance from the distance values of the givenGeoResult
s.GeoResults
(List<? extends GeoResult<T>> results, Distance averageDistance) Creates a newGeoResults
instance from the givenGeoResult
s and average distance.GeoResults
(List<? extends GeoResult<T>> results, Metric metric) Creates a newGeoResults
instance manually calculating the average distance in the givenMetric
from the distance values of the givenGeoResult
s. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the average distance of allGeoResult
s in this list.Returns the actual content of theGeoResults
.int
hashCode()
iterator()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GeoResults
Creates a newGeoResults
instance manually calculating the average distance from the distance values of the givenGeoResult
s.- Parameters:
results
- must not be null.
-
GeoResults
Creates a newGeoResults
instance manually calculating the average distance in the givenMetric
from the distance values of the givenGeoResult
s.- Parameters:
results
- must not be null.metric
- must not be null.
-
GeoResults
Creates a newGeoResults
instance from the givenGeoResult
s and average distance.- Parameters:
results
- must not be null.averageDistance
- must not be null.
-
-
Method Details
-
getAverageDistance
Returns the average distance of allGeoResult
s in this list.- Returns:
- the averageDistance
-
getContent
Returns the actual content of theGeoResults
.- Returns:
- the actual content.
-
iterator
-
equals
-
hashCode
public int hashCode() -
toString
-