while (dest.next != null) dest = dest.next;
HashEntry next = dest.next; while (next != null) { dest = next; next = dest.next; }
  protected void rehash()  {    HashEntry<K, V>[] oldBuckets = buckets;    int newcapacity = (buckets.length * 2) + 1;    threshold = (int) (newcapacity * loadFactor);    buckets = (HashEntry<K, V>[]) new HashEntry[newcapacity];    for (int i = oldBuckets.length - 1; i >= 0; i--)      {        HashEntry<K, V> e = oldBuckets[i];        while (e != null)          {            int idx = hash(e.key);            HashEntry<K, V> dest = buckets[idx];            if (dest != null)              {                while (dest.next != null)                  dest = dest.next;                dest.next = e;              }            else              {                buckets[idx] = e;              }            HashEntry<K, V> next = e.next;            e.next = null;            e = next;          }      }  }