eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

ImmutableMapFactory missing withMap, ofMapIterable and withMapIterable

Open donraab opened this issue 6 years ago • 8 comments

There are three methods missing on ImmutableMapFactory interface. These are the methods on MutableMapFactory.

<K, V> MutableMap<K, V> ofMap(Map<? extends K, ? extends V> map);
<K, V> MutableMap<K, V> withMap(Map<? extends K, ? extends V> map);
<K, V> MutableMap<K, V> ofMapIterable(MapIterable<? extends K, ? extends V> mapIterable);
<K, V> MutableMap<K, V> withMapIterable(MapIterable<? extends K, ? extends V> mapIterable);

These are currently the methods available on ImmutableMapFactory.

<K, V> ImmutableMap<K, V> ofMap(Map<K, V> map);
<K, V> ImmutableMap<K, V> ofAll(Map<K, V> map);
<K, V> ImmutableMap<K, V> withAll(Map<K, V> map);

The ofAll and withAll methods should be deprecated on ImmutableMapFactory and withMap, ofMapIterable and withMapIterable should be added.

donraab avatar Jul 28 '19 23:07 donraab

We should also fix the generics on ofMap(), probably in a major version.

motlin avatar Jul 29 '19 23:07 motlin

I think next release should just be 11.0 instead of a minor version. It’s much easier to move forward with this philosophy. Thoughts?

nikhilnanivadekar avatar Jul 29 '19 23:07 nikhilnanivadekar

Starting on a major release is a commitment to not do any release for a while. I thought 9.1.0 and 9.2.0 went well.

On the other hand, most of the work of doing a release falls on you and it doesn't seem trivial, so I understand. It's also an acknowledgement of something that may already be the case, that we won't release for ~6 months whether it's major or minor.

motlin avatar Jul 29 '19 23:07 motlin

Would be interested to pick this ticket for my first contribution. @nikhilnanivadekar , @donraab - Can you assign the ticket to me?

prathasirisha avatar Nov 06 '19 23:11 prathasirisha

can u assign me this issue

im-prince avatar Feb 25 '23 11:02 im-prince

@donraab I have understood this issue so can you please assign this issue to me.

Rishabh-mikku avatar Jan 09 '24 17:01 Rishabh-mikku