### Question:
FloatValueMap extends HashBase<T> implements Iterable<T> { public float[] values() { float[] result = new float[size()]; int j = 0; for (int i = 0; i < keys.length; i++) { if (hasValidKey(i)) { result[j++] = values[i]; } } return result; } FloatValueMap();  FloatValueMap(int size); private  FloatValueMap(FloatValueMap<T> other, T[] keys, float[] values); float get(T key); float incrementByAmount(T key, float amount); void set(T key, float value); float[] values(); List<Entry<T>> getAsEntryList(); FloatValueMap<T> copy(); Iterator<Entry<T>> entryIterator(); Iterable<Entry<T>> iterableEntries();  }### Answer:
@Test public void testValues() { FloatValueMap<String> set = new FloatValueMap<>(); set.set("a", 7); set.set("b", 2); set.set("c", 3); set.set("d", 4); set.set("d", 5); Assert.assertEquals(4, set.size()); float[] values = set.values(); Arrays.sort(values); Assert.assertTrue(Arrays.equals(new float[]{2f, 3f, 5f, 7f}, values)); }