From 810fc9f4263330937ca5a5398d97fa22ac83f5ab Mon Sep 17 00:00:00 2001 From: Sr <39112652+Itswag@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:08:52 +0800 Subject: [PATCH] =?UTF-8?q?[docs=20improve]=E4=BC=98=E5=8C=96=E8=A1=A8?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HashMap源码&底层数据结构分析#JDK1.8 之后-类的属性 (docs/java/collection/hashmap-source-code.md) --- docs/java/collection/hashmap-source-code.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/java/collection/hashmap-source-code.md b/docs/java/collection/hashmap-source-code.md index c2c5cf36..7d8e4c46 100644 --- a/docs/java/collection/hashmap-source-code.md +++ b/docs/java/collection/hashmap-source-code.md @@ -85,7 +85,7 @@ public class HashMap extends AbstractMap implements Map, Cloneabl static final int TREEIFY_THRESHOLD = 8; // 当桶(bucket)上的结点数小于这个值时树转链表 static final int UNTREEIFY_THRESHOLD = 6; - // 桶中结构转化为红黑树对应的table的最小大小 + // 桶中结构转化为红黑树对应的table的最小容量 static final int MIN_TREEIFY_CAPACITY = 64; // 存储元素的数组,总是2的幂次倍 transient Node[] table; @@ -95,7 +95,7 @@ public class HashMap extends AbstractMap implements Map, Cloneabl transient int size; // 每次扩容和更改map结构的计数器 transient int modCount; - // 临界值 当实际大小(容量*填充因子)超过临界值时,会进行扩容 + // 临界值(容量*填充因子) 当实际大小超过临界值时,会进行扩容 int threshold; // 加载因子 final float loadFactor; @@ -562,4 +562,4 @@ public class HashMapDemo { } } -``` \ No newline at end of file +```