This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package java.util; | |
...... | |
// LinkedHashMap 类继承自 HashMap | |
public class LinkedHashMap<K,V> | |
extends HashMap<K,V> | |
implements Map<K,V> | |
{ | |
// LinkedHashMap 内部节点,继承 HashMap.Node 类 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package java.util; | |
...... | |
public class Hashtable<K,V> | |
extends Dictionary<K,V> | |
implements Map<K,V>, Cloneable, java.io.Serializable { | |
// Entry 数组,每个 Entry 节点都是一个 LinkedList | |
private transient Entry<?,?>[] table; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package java.util; | |
...... | |
public class HashMap<K,V> extends AbstractMap<K,V> | |
implements Map<K,V>, Cloneable, Serializable { | |
// Node 数组的默认容量 | |
static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; |
NewerOlder