Jim Cheesman wrote:

> 
> I implemented one of these a while back, and called it OrderedHashMap. Now
> I think about it, it seems to imply some kind of sort has taken place -
> though that could just be from Spanish leaking into my English ;)
> 
> SequencedHashMap doesn't do much for me either, though I can't think of a
> better one for now, at least not without ending up with some horrendously
> long name such as (InputTimeOrderedHashMap - yuk! ;)

How about KeyedList? 

Damn, only problem with that is you should then probably implement the
List interface as well, and then what do the list methods work on, do
they work on the Keys or on the Values :(

Actually, a horrible name like "InputOrderedMap" isn't _too_ bad - at
least it says exactly what the class provides. No need to make it
"InputTimeOrderedHashMap" - it's only important to know it implements
the Map interface, not how it implements it.

So when you get the values() collection and iterator from this class,
presumably they both come back in the order of addition, rather than
just the values() or keys ?

and lastly, sorry to be such a pain, but naming is one of those things
that makes me feel awkward and really pedantic at times. Names stick
around for a LONG time which is why I always end up creating a fuss over
naming  :). Also, a well named class is transparent to use, a bad,
misleadingly or misspelt class or method stores up trouble for later on.
(not that SequencedHashtable is bad, it's just doesn't seem quite
right).

Example? - how many of us have cursed the folks who misspelt "referer"
in the http spec??? grrrrrrrr. :)

Jari
--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd

Reply via email to