LinkedHashMap 理解

  1. LinkedHashMap 继承关系
public class LinkedHashMap<K,V>
    extends HashMap<K,V>
    implements Map<K,V>
{
...
}
  1. 该链接列表定义了迭代顺序与插入顺序一致
  static class Entry<K,V> extends HashMap.Node<K,V> {
        Entry<K,V> before, after;
        Entry(int hash, K key, V value, Node<K,V> next) {
            super(hash, key, value, next);
        }
    }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容