if (distance < heap.peek().distance) { heap.add(new Neighbor<>(key, data.get(index), index, distance)); hit++;
Neighbor<T,T> datum = heap.peek(); if (dist < datum.distance) { datum.distance = dist;
if (distance < heap.peek().distance) { heap.add(new Neighbor<>(keys.get(index), data.get(index), index, distance)); hit++;
if (dist < heap.peek().distance) { heap.add(new Neighbor<>(key, data.get(index), index, dist)); hit++;