@Test public void getValuesTest() { UIntMap<String> map = new UIntMap<>(); int size = 1000; List<String> expected = new ArrayList<>(); for (int i = 0; i < size; i++) { String value = String.valueOf(i + 1); map.put(i, value); expected.add(value); } Assert.assertEquals(expected, map.getValuesSortedByKey()); }
public List<T> getValues() { List<T> result = new ArrayList<>(); for (int i = 0; i < keys.length; i++) { int key = keys[i]; if (key >= 0) { result.add(values[i]); } } return result; }
UIntMap extends UIntKeyHashBase implements Iterable<T> { public List<T> getValues() { List<T> result = new ArrayList<>(); for (int i = 0; i < keys.length; i++) { int key = keys[i]; if (key >= 0) { result.add(values[i]); } } return result; } }
UIntMap extends UIntKeyHashBase implements Iterable<T> { public List<T> getValues() { List<T> result = new ArrayList<>(); for (int i = 0; i < keys.length; i++) { int key = keys[i]; if (key >= 0) { result.add(values[i]); } } return result; } UIntMap();  UIntMap(int size); }
UIntMap extends UIntKeyHashBase implements Iterable<T> { public List<T> getValues() { List<T> result = new ArrayList<>(); for (int i = 0; i < keys.length; i++) { int key = keys[i]; if (key >= 0) { result.add(values[i]); } } return result; } UIntMap();  UIntMap(int size); T get(int key); boolean containsKey(int key); void put(int key, T value); List<T> getValues(); @Override Iterator<T> iterator(); List<T> getValuesSortedByKey(); }
UIntMap extends UIntKeyHashBase implements Iterable<T> { public List<T> getValues() { List<T> result = new ArrayList<>(); for (int i = 0; i < keys.length; i++) { int key = keys[i]; if (key >= 0) { result.add(values[i]); } } return result; } UIntMap();  UIntMap(int size); T get(int key); boolean containsKey(int key); void put(int key, T value); List<T> getValues(); @Override Iterator<T> iterator(); List<T> getValuesSortedByKey();  }