0
0
0nk0l0g2016-09-30 11:58:29
Java
0nk0l0g, 2016-09-30 11:58:29

What can replace TreeMap?

Hello, tell me, is there a TreeMap replacement that allows you to store key-value data with several identical keys?
For example, C++ has multimap for this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evhen, 2016-09-30
@0nk0l0g

Multiple values ​​for the same key?
What's stopping you from doing this:
Another option is to use
guava multimap

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>19.0</version>
</dependency>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question