tags:

views:

172

answers:

1

I'm looking for a KeyValuePair class in Java.
Since java.util heavily uses interfaces there is no concrete implementation provided, only the Map.Entry interface.

Is there some canonical implementation I can import? It is one of those "plumbers programming" classes I hate to implement 100x times.

+6  A: 

AbstractMap.SimpleEntry is generic and can be useful.

Eyal Schneider