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()
DistanceResultPair
getDistance
in interface DistanceResultPair<DoubleDistance>
public void setDistance(DoubleDistance distance)
DistanceResultPair
setDistance
in interface DistanceResultPair<DoubleDistance>
distance
- new value for first elementpublic DBID getDBID()
DistanceResultPair
getDBID
in interface DistanceResultPair<DoubleDistance>
public void setID(DBID id)
DistanceResultPair
setID
in interface DistanceResultPair<DoubleDistance>
id
- new value for second element@Deprecated public DoubleDistance getFirst()
PairInterface
getFirst
in interface PairInterface<DoubleDistance,DBID>
@Deprecated public DBID getSecond()
getDBID()
for clearness.PairInterface
getSecond
in interface PairInterface<DoubleDistance,DBID>
public int compareByDistance(DistanceResultPair<DoubleDistance> o)
DistanceResultPair
compareByDistance
in interface DistanceResultPair<DoubleDistance>
o
- Other objectpublic int compareTo(DistanceResultPair<DoubleDistance> o)
compareTo
in interface Comparable<DistanceResultPair<DoubleDistance>>
public double getDoubleDistance()