@Override public <K, V> MutableMap<K, V> withMapIterable(MapIterable<? extends K, ? extends V> mapIterable) { MutableMap<K, V> output = Maps.mutable.withInitialCapacity(mapIterable.size()); mapIterable.forEachKeyValue(output::put); return output; } }
@Override public <K, V> MutableMap<K, V> withMapIterable(MapIterable<? extends K, ? extends V> mapIterable) { MutableMap<K, V> output = Maps.mutable.withInitialCapacity(mapIterable.size()); mapIterable.forEachKeyValue(output::put); return output; } }
public static MutableMap<String, String> getStringMap(int size) { MutableMap<String, String> map = Maps.mutable.withInitialCapacity(size); Interval.fromTo(0, size - 1).each(each -> map.put(String.valueOf(each), String.valueOf(-each))); return map; }
public static MutableMap<Integer, Integer> getIntegerMap(int size) { MutableMap<Integer, Integer> map = Maps.mutable.withInitialCapacity(size); Interval.fromTo(0, size - 1).each(each -> map.put(each, -each)); return map; }