public class GeoResults<T> extends Object implements Iterable<GeoResult<T>>, Serializable
GeoResult
s as well as the average distance they have.Constructor and Description |
---|
GeoResults(List<? extends GeoResult<T>> results)
Creates a new
GeoResults instance manually calculating the average distance from the distance values of the
given GeoResult s. |
GeoResults(List<? extends GeoResult<T>> results,
Distance averageDistance)
Creates a new
GeoResults instance from the given GeoResult s and average distance. |
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 GeoResult s. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Distance |
getAverageDistance()
Returns the average distance of all
GeoResult s in this list. |
List<GeoResult<T>> |
getContent()
Returns the actual content of the
GeoResults . |
int |
hashCode() |
Iterator<GeoResult<T>> |
iterator() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public GeoResults(List<? extends GeoResult<T>> results)
GeoResults
instance manually calculating the average distance from the distance values of the
given GeoResult
s.results
- must not be null.public GeoResults(List<? extends GeoResult<T>> results, Metric metric)
GeoResults
instance manually calculating the average distance in the given Metric
from the distance values of the given GeoResult
s.results
- must not be null.metric
- must not be null.public Distance getAverageDistance()
GeoResult
s in this list.public List<GeoResult<T>> getContent()
GeoResults
.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.