java
pppttx
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hashmap.tableSizeFor 方法
static final int MAXIMUM_CAPACITY = 1 << 30; static final int tableSizeFor(int cap) { // 0000 1000 0000 0000 0000 0000 0000 0000 n // 0000 0100 0000 0000 0000 0000 0000 0000 n>>>1 //->0000 1100 0000 0000...原创 2020-09-08 16:11:44 · 136 阅读 · 0 评论 -
hashmap.getNode() 方法
/** * Implements Map.get and related methods * * @param hash hash for key * @param key the key * @return the node, or null if none */ final Node<K,V> getNode(int hash, Object key) { Node<K,V>[] tab...原创 2020-09-04 17:05:37 · 606 阅读 · 0 评论 -
hashmap.putVal()方法
/** * Implements Map.put and related methods * * @param hash hash for key * @param key the key * @param value the value to put * @param onlyIfAbsent if true, don't change existing value * @param evict if false, the t...原创 2020-09-04 16:22:50 · 298 阅读 · 0 评论 -
hashmap.resize() 方法
/** * Initializes or doubles table size. If null, allocates in * accord with initial capacity target held in field threshold. * Otherwise, because we are using power-of-two expansion, the * elements from each bin must either stay ...原创 2020-09-04 15:42:45 · 235 阅读 · 0 评论
分享