typesafehub / akka-contrib-extra

ConductR Akka contributions
Other
9 stars 16 forks source link

Add removeBindings method to ORMultiMap #6

Closed hseeberger closed 9 years ago

hseeberger commented 9 years ago

removeBinding removes exactly the given element, yet sometimes that's not what you want, e.g. because you don't have/know the exact element, but only some discriminating property. Therefore removeBindings is introduced which takes a predicate function determining which element(s) are to be removed.

huntc commented 9 years ago

I would prefer that we stick to the Scala MultiMap interface where possible in order to minimise learning. We should be able to get and then put.

Can you please change if you agree?

hseeberger commented 9 years ago

That puts too much (hard) work into user space, I really want that (or a similar) function. If you strongly feel that sticking to the Scala MultiMap interface is needed (I don't understand why, because IMHO MultiMap is neither widely used in Scala nor available in Java, i.e. I don't consider it a standard), then we could probably go with filterNot.

huntc commented 9 years ago

Scala's MultiMap is our benchmark here I think. I would prefer to stick with methods that already exist. I also don't think that getting and then putting the values is too much work - unless we were doing it all of the time, which we're not.

Note that this is destined for Akka itself. We should be as idiomatic as possible.

Any thoughts @patriknw?