
D - Distance typepublic class GenericDistanceResultPair<D extends Distance<D>> extends Pair<D,DBID> implements DistanceResultPair<D>
| Constructor and Description |
|---|
GenericDistanceResultPair(D first,
DBID second)
Canonical constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareByDistance(DistanceResultPair<D> o)
Compare value, but by distance only.
|
int |
compareDBID(DBIDRef other)
Compare two objects by the value of the referenced DBID.
|
int |
compareTo(DistanceResultPair<D> o) |
boolean |
equals(Object obj)
Simple equals statement.
|
DBID |
getDBID()
Getter for second element in pair
|
D |
getDistance()
Getter for first
|
int |
getIntegerID()
Return the integer value of the object ID, if possible.
|
boolean |
sameDBID(DBIDRef other)
Compare the current value of two referenced DBIDs.
|
void |
setDistance(D first)
Setter for first
|
void |
setID(DBID second)
Setter for second
|
String |
toString()
Canonical toString operator
|
getFirst, getSecond, hashCode, newPairArray, setFirst, setSecondclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFirst, getSecondpublic final D getDistance()
getDistance in interface DistanceResultPair<D extends Distance<D>>public final void setDistance(D first)
setDistance in interface DistanceResultPair<D extends Distance<D>>first - new value for first elementpublic final DBID getDBID()
public int getIntegerID()
DBIDRefgetIntegerID in interface DBIDRefpublic boolean sameDBID(DBIDRef other)
DBIDRefpublic int compareDBID(DBIDRef other)
DBIDRefcompareDBID in interface DBIDRefother - Other DBID or objectpublic final void setID(DBID second)
setID in interface DistanceResultPair<D extends Distance<D>>second - new value for second elementpublic int compareByDistance(DistanceResultPair<D> o)
DistanceResultPaircompareByDistance in interface DistanceResultPair<D extends Distance<D>>o - Other objectpublic int compareTo(DistanceResultPair<D> o)
compareTo in interface Comparable<DistanceResultPair<D extends Distance<D>>>public boolean equals(Object obj)
PairPair.first and Pair.second element of
this Pair equal the Pair.first and Pair.second element,
respectively, of the other Pair.