package de.lmu.ifi.dbs.elki.database;

import de.lmu.ifi.dbs.elki.distance.Distance;
import de.lmu.ifi.dbs.elki.utilities.pairs.CPair;

public class DistanceResultPair<D extends Distance<D>> extends CPair<D, Integer> {
  public DistanceResultPair(D first, Integer second) {
    super(first, second);
  }

  /**
   * Getter for first
   * 
   * @return first element in pair
   */
  public final D getDistance() {
    return first;
  }

  /**
   * Setter for first
   * 
   * @param first new value for first element
   */
  public final void setDistance(D first) {
    this.first = first;
  }

  /**
   * Getter for second element in pair
   * 
   * @return second element in pair
   */
  public final Integer getID() {
    return second;
  }

  /**
   * Setter for second
   * 
   * @param second new value for second element
   */
  public final void setID(Integer second) {
    this.second = second;
  }

}

@@ -133,90 +133,349 @@
 r;%0A%0A
-public class DistanceResultPair%3CD extends Distance%3CD%3E%3E extends CPair%3CD, Integer%3E %7B
+/**%0A * Class that consists of a pair (distance, object ID) commonly returned%0A * for kNN and range queries.%0A * %0A * @author Erich Schubert%0A *%0A * @param %3CD%3E%0A */%0Apublic class DistanceResultPair%3CD extends Distance%3CD%3E%3E extends CPair%3CD, Integer%3E %7B%0A  /**%0A   * Canonical constructor%0A   * %0A   * @param first Distance%0A   * @param second Object ID%0A   */
 %0A  p
@@ -1159,11 +1159,10 @@
 nd;%0A  %7D%0A
-%0A
 %7D%0A

Add missing JavaDoc