1

I will appreciate if someone can provide their guess for why my answer to my own question is getting downvoted.

To summarize, the question is:

Is there a Map<K1, K2, V> implemented in Java where the retrieval can be performed with either of two different types, like a primary key and alternate key?

My answer:

There isn't such a popular map implementation.

6
  • 11
    Well, it doesn't answer the question for starters...
    – Servy
    Commented Mar 12, 2013 at 18:29
  • Terrible "answer", accepted for the sake of it, with lots of reasonable ones available... -1
    – brasofilo
    Commented Mar 12, 2013 at 18:32
  • 5
    The answer is "I need to accept some answer. The consensus seems to be that no such exists out there but is a useful concept." ... The first sentence is already a pretty good indication you should have stopped right there. And the second sentence doesn't add a whole lot either. It's a bad answer.
    – Bart
    Commented Mar 12, 2013 at 18:37
  • Nope.
    – user1228
    Commented Mar 12, 2013 at 18:42
  • Thank you for additional downvotes. I did get several comments asking me to improve my accept rate, which is why I accepted it. But I would argue that it does answer the question. The question "is there any...?" the answer is "no" Commented Mar 12, 2013 at 20:25
  • @HemalPandya There no longer is such a thing as accept rate. And such comments are easily ignored (and should really be flagged). Don't ever feel pushed into accepting anything.
    – Bart
    Commented Mar 12, 2013 at 21:53

1 Answer 1

15

Because it isn't really an answer and is at best a comment on your question.

Why not just leave your question open? We no longer show your accept rate publicly, so there is no impetus to accept a non-answer if none exist.

(Rereading your question, you should encourage Rekin to post their comment as an answer. A composite key would likely be best made into its own class.)

4
  • It is an answer -- for example, to the question "is there anything that travels faster then light"? The answer is "no". Commented Mar 12, 2013 at 20:26
  • 2
    @Hemal The strictly correct answer to that is actually "not to our knowledge" :)
    – Jack
    Commented Mar 12, 2013 at 21:31
  • @Hermal: considering you were given 2 answers to your question, you have no leg to stand on. If you don't like those answers, that is fine, but they were answers that would work. (I downvoted the one that did not actually work)
    – user7116
    Commented Mar 12, 2013 at 22:00
  • @sixlettervariables which answer is correct? Aren't they all describing a complex key situation instead of alternate key that I am asking for? Commented Mar 13, 2013 at 1:23

Not the answer you're looking for? Browse other questions tagged .