
public class DoubleDistanceResultPair extends Object implements DistanceResultPair<DoubleDistance>
| Modifier and Type | Field and Description |
|---|---|
(package private) double |
distance
Distance value
|
(package private) DBID |
id
Object ID
|
| Constructor and Description |
|---|
DoubleDistanceResultPair(double distance,
DBID id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareByDistance(DistanceResultPair<DoubleDistance> o)
Compare value, but by distance only.
|
int |
compareTo(DistanceResultPair<DoubleDistance> o) |
boolean |
equals(Object obj) |
DBID |
getDBID()
Getter for second element in pair
|
DoubleDistance |
getDistance()
Getter for first
|
double |
getDoubleDistance()
Get the distance as double value.
|
DoubleDistance |
getFirst()
Deprecated.
Use
getDoubleDistance() or getDistance() for clearness. |
DBID |
getSecond()
Deprecated.
Use
getDBID() for clearness. |
void |
setDistance(DoubleDistance distance)
Setter for first
|
void |
setID(DBID id)
Setter for second
|
String |
toString() |
double distance
DBID id
public DoubleDistanceResultPair(double distance,
DBID id)
distance - Distance valueid - Object IDpublic DoubleDistance getDistance()
DistanceResultPairgetDistance in interface DistanceResultPair<DoubleDistance>public void setDistance(DoubleDistance distance)
DistanceResultPairsetDistance in interface DistanceResultPair<DoubleDistance>distance - new value for first elementpublic DBID getDBID()
DistanceResultPairgetDBID in interface DistanceResultPair<DoubleDistance>public void setID(DBID id)
DistanceResultPairsetID in interface DistanceResultPair<DoubleDistance>id - new value for second element@Deprecated public DoubleDistance getFirst()
PairInterfacegetFirst in interface PairInterface<DoubleDistance,DBID>@Deprecated public DBID getSecond()
getDBID() for clearness.PairInterfacegetSecond in interface PairInterface<DoubleDistance,DBID>public int compareByDistance(DistanceResultPair<DoubleDistance> o)
DistanceResultPaircompareByDistance in interface DistanceResultPair<DoubleDistance>o - Other objectpublic int compareTo(DistanceResultPair<DoubleDistance> o)
compareTo in interface Comparable<DistanceResultPair<DoubleDistance>>public double getDoubleDistance()