p***p 发帖数: 559 | 1 I am writing a DNS cache, map domain name and transport to DNS entry in a
Hashmap, both keys are string. I designed a key as a String=domain+transport
, well, it is not so intelligent, any other idea? | m******t 发帖数: 2416 | 2 I would have done transport+domain, which is a lot more intelligent.
No, I'm just kidding. What's wrong with domain+transport? In fact I can't
think of any better way to guarantee uniqueness. |
|