1、Java 6提供AbstractMap.SimpleEntry<K,V>和AbstractMap.SimpleImmutableEntry<K,V>
Map.Entryentry1 = new AbstractMap.SimpleEntry ("key", 9527);
2、Apache commons-collections的KeyValue
Map.Entryentry3 = new DefaultMapEntry("key", 9527)KeyValue kv = new DefaultKeyValue("rkey", 9527);
3、Guava的Maps.immutableEntry
Map.Entryentry2 = Maps.immutableEntry("key", 9527);
4、Apache commons-lang3的Pair
Map.Entryentry4 =new ImmutablePair ("key", 9527);
5、Apache HttpClient的NameValuePair
NameValuePair nv = new BasicNameValuePair("key", "9527");
可以扩展Map.Entry或者封装Class。