
我想问下Keyset,Values,和HashMapNode之间是怎么联系起来的?谢谢

Map每个节点是一个Node
Node的键表示key,值表示value
Map部分源码:
public interface Map<K,V> {
Set<K> keySet();
Collection<V> values();
interface Entry<K,V> {
K getKey();
V getValue();
}
}
keySet、values是Map接口中的两个方法。
Entry是Map接口中的内部接口。
Node是Entry接口的实现类。