You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Santiago Sánchez <sa...@gmail.com> on 2017/05/09 13:28:43 UTC

[collections] No general removeAll(MultiKey multiKey) method implemented

Hello,

I'm using the MultiKeyMap implementation for a project but I've realized
that there is no general method for removing a full MultiKey object, but
different and individual keys.

For example, I can remove a key using: MultiKeyMap#removeAll(key1, key2,
key3), but I can't do the same with MultiKeyMap#removeAll(new MultiKey(new
Object[] { key1, key2, key3 })), thus limiting the number of keys to the
ones being passed to the different method signatures.

The removeAll(...) method is the one whose behaviour approaches more. The
other methods named removeMultiKey(...) remove the exact match (i.e. not
the keys having more "descendants") from the MultiKeyMap.

I've implemented a method named removeAllMultiKey(Object multiKey) that
accomplishes what I'm stating here, so if it is okay for you I can make a
pull request at GitHub.

Cheers,
- Santiago.