Class GeoResults<T>

java.lang.Object
org.springframework.data.geo.GeoResults<T>
All Implemented Interfaces:
Serializable, Iterable<GeoResult<T>>

public class GeoResults<T> extends Object implements Iterable<GeoResult<T>>, Serializable
Value object to capture GeoResults as well as the average distance they have.
Since:
1.8
Author:
Oliver Gierke, Thomas Darimont
See Also:
  • Constructor Details

    • GeoResults

      public GeoResults(List<? extends GeoResult<T>> results)
      Creates a new GeoResults instance manually calculating the average distance from the distance values of the given GeoResults.
      Parameters:
      results - must not be null.
    • GeoResults

      public GeoResults(List<? extends GeoResult<T>> results, Metric metric)
      Creates a new GeoResults instance manually calculating the average distance in the given Metric from the distance values of the given GeoResults.
      Parameters:
      results - must not be null.
      metric - must not be null.
    • GeoResults

      public GeoResults(List<? extends GeoResult<T>> results, Distance averageDistance)
      Creates a new GeoResults instance from the given GeoResults and average distance.
      Parameters:
      results - must not be null.
      averageDistance - must not be null.
  • Method Details