|
Spring Data Document | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.mongodb.core.geo.Distance
public class Distance
Value object to represent distances in a given metric.
Constructor Summary | |
---|---|
Distance(double value)
Creates a new Distance . |
|
Distance(double value,
Metric metric)
Creates a new Distance with the given Metric . |
Method Summary | |
---|---|
Distance |
add(Distance other)
Adds the given distance to the current one. |
Distance |
add(Distance other,
Metric metric)
Adds the given Distance to the current one and forces the result to be in a given Metric . |
boolean |
equals(Object obj)
|
Metric |
getMetric()
|
double |
getNormalizedValue()
Returns the normalized value regarding the underlying Metric . |
double |
getValue()
|
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Distance(double value)
Distance
.
value
- public Distance(double value, Metric metric)
Distance
with the given Metric
.
value
- metric
- Method Detail |
---|
public double getValue()
public double getNormalizedValue()
Metric
.
public Metric getMetric()
public Distance add(Distance other)
Distance
will be in the same metric as the
current one.
other
-
public Distance add(Distance other, Metric metric)
Distance
to the current one and forces the result to be in a given Metric
.
other
- metric
-
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Spring Data Document | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |