Key that yields multiple Results

Posted by SgtStud on Stack Overflow See other posts from Stack Overflow or by SgtStud
Published on 2012-03-25T17:22:23Z Indexed on 2012/03/25 17:29 UTC
Read the original article Hit count: 137

Filed under:
|

I'm pretty new to programming so I'm sorry if this is a stupid question. I was wondering if there was a type of data that returns (possibly) more than one answer per key. For example:

TestType<int,String> test = new TestType<int,String>();

So if you typed, test.getKey(1), you could get {"hello","this","is","a","test"}.

Basically, is there a type of data that can return multiple answers, sort of like a HashMap and List combined?

© Stack Overflow or respective owner

Related posts about java

Related posts about hash