Spring Data Document

org.springframework.data.mongodb.core.geo
Class GeoResult<T>

java.lang.Object
  extended by org.springframework.data.mongodb.core.geo.GeoResult<T>

public class GeoResult<T>
extends Object

Calue object capturing some arbitrary object plus a distance.

Author:
Oliver Gierke

Constructor Summary
GeoResult(T content, Distance distance)
          Creates a new GeoResult for the given content and distance.
 
Method Summary
 boolean equals(Object obj)
           
 T getContent()
          Returns the actual content object.
 Distance getDistance()
          Returns the distance the actual content object has from the origin.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoResult

public GeoResult(T content,
                 Distance distance)
Creates a new GeoResult for the given content and distance.

Parameters:
content - must not be null.
distance - must not be null.
Method Detail

getContent

public T getContent()
Returns the actual content object.

Returns:
the content

getDistance

public Distance getDistance()
Returns the distance the actual content object has from the origin.

Returns:
the distance

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Spring Data Document

Copyright © 2012. All Rights Reserved.