/** * Returns the entry corresponding to the given key, if it is in the tree; * {@code null}, otherwise. * * @param k * the key to search for. * @return the corresponding entry, or {@code null} if no entry with the given * key exists. */ final Entry<V> findKey(final float k) { Entry<V> e = tree; int cmp; while (e != null && (cmp = compare(k, e.key)) != 0) e = cmp < 0 ? e.left() : e.right(); return e; } /**
/** * Locates a key. * * @param k * a key. * @return the last entry on a search for the given key; this will be the given * key, if it present; otherwise, it will be either the smallest greater * key or the greatest smaller key. */ final Entry<V> locateKey(final float k) { Entry<V> e = tree, last = tree; int cmp = 0; while (e != null && (cmp = compare(k, e.key)) != 0) { last = e; e = cmp < 0 ? e.left() : e.right(); } return cmp == 0 ? e : last; } /**
int cmp, i = 0; while (true) { if ((cmp = compare(k, p.key)) == 0) { return p;
final float kk = k; while (true) { if ((cmp = compare(kk, p.key)) == 0) break; else if (dir = cmp > 0) {