Alice Boxhall wrote:
Just a quick question re MultiHashMap:
For my current project I need to be able to ensure that if I do

map.put("foo", a);
map.put("foo", b);
((Collection)map.get("foo")).iterator();

I will get a and b back in that order. Obviously with the current implementation this will be the case, but I was wondering if there was some way that I could ensure that in case the implementation changes.

If not, no big deal, I can easily work around it.

1) there are no plans to change this.

2) IIRC there is a protected method in MultiHahsMap that returns the new collection (so you can subclass and force it)

3) You might want to try the new and improved MultiValueMap in the map subpackage (not released yet). It allows you much greater control over this type of class, and is the designated replacement for MultiHashMap.

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to