code: synchronized public Object[] toArray(Object[] values) {
      int count = 0;
      for (int bind = 0; bind < buckets.length; bind++) {
        if (counts[bind] > 0)
           System.arraycopy(buckets[bind], 0, values, count, counts[bind]);
        count += counts[bind];
      }
      return values;
    }
docs: Return the contents of the HashedArray as an array