LinkedHashMap底层实现(了解)
源码:
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);
}
}
2021-12-31 06:15:05
源码:
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);
}
}