
{"id":1208,"date":"2020-12-20T00:06:36","date_gmt":"2020-12-19T16:06:36","guid":{"rendered":"https:\/\/www.changxuan.top\/?p=1208"},"modified":"2020-12-20T20:32:16","modified_gmt":"2020-12-20T12:32:16","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88-hashmap-%e7%9a%84%e5%ae%b9%e9%87%8f%e5%a4%a7%e5%b0%8f%e8%a6%81%e8%ae%be%e7%bd%ae%e4%b8%ba2%e7%9a%84n%e6%ac%a1%e6%96%b9%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.changxuan.top\/?p=1208","title":{"rendered":"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f"},"content":{"rendered":"<section id=\"nice\" data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"font-size: 16px; color: black; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u524d\u4e24\u5929\uff0c\u6211\u5728\u4e00\u4f4d\u540c\u5b66\u63d0\u4ea4\u4e2d\u770b\u5230\u4e86\u4e0b\u9762\u8fd9\u6837\u7684\u4e00\u884c\u4ee3\u7801\u3002<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\">Map&lt;String,&nbsp;String&gt;&nbsp;temp&nbsp;=&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">new<\/span>&nbsp;HashMap&lt;&gt;(<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">6<\/span>);\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u6211\u7ed9\u4ed6\u8bf4\uff0c\u4f60\u8fd9\u6837\u5b9e\u4f8b\u5316 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">Map<\/code> \u5bf9\u8c61\u4e0d\u597d\u7528\uff0c\u4ed6\u4e0d\u670d\u6c14\u3002\u6211\u8bf4\u5c0f\u670b\u53cb\uff1a<strong style=\"font-weight: bold; color: black;\">\u5982\u679c\u60f3\u6307\u5b9a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u5bf9\u8c61\u7684\u5bb9\u91cf\u5f97\u75282\u7684N\u6b21\u65b9 \u3002\u5047\u5982\u4e0d\u662f2\u7684N\u6b21\u65b9\u90a3\u4e48\u5728\u7b2c\u4e00\u6b21<code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">put<\/code> \u5143\u7d20\u7684\u65f6\u5019\u4e5f\u4f1a\u81ea\u52a8\u628a\u5bb9\u91cf\u8bbe\u7f6e\u4e3a\u6bd4\u4f20\u5165\u53c2\u6570\u5927\u7684\u6700\u5c0f\u76842\u7684N\u6b21\u65b9\uff0c\u5e76\u4e0d\u662f\u4f60\u6307\u5b9a\u7684\u8fd9\u4e2a\u503c<\/strong>\u3002\u4ed6\u8bf4\u4f60\u8fd9\u4e5f\u6ca1\u7528\u3002\u6211\u8bf4\uff0c\u6211\u8fd9\u4e2a\u6709\u7528\uff0c\u8fd9\u6837\u624d\u80fd\u5145\u5206\u5229\u7528\u5206\u914d\u7684\u5185\u5b58\u7a7a\u95f4\uff0c\u51cf\u5c11\u54c8\u5e0c\u78b0\u649e\u6b21\u6570\u3002\u4ed6\u975e\u548c\u6211\u8bd5\u8bd5\uff0c\u6211\u8bf4\u53ef\u4ee5\uff0c\u54b1\u4eec\u5148\u6765\u770b\u770b\u6e90\u7801\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u4ec0\u4e48\u662fHashMap\uff1f<\/span><span class=\"suffix\" style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5728\u5f04\u61c2\u6807\u9898\u7684\u95ee\u9898\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u6e05\u695a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u7684\u6982\u5ff5\u3002<code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u662f\u57fa\u4e8e\u54c8\u5e0c\u8868\u7684 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">Map<\/code> \u63a5\u53e3\u7684\u5b9e\u73b0\uff0c\u7ebf\u7a0b\u4e0d\u5b89\u5168\uff0c\u4e14\u4e0d\u4fdd\u8bc1\u6620\u5c04\u987a\u5e8f\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u5b58\u50a8\u6570\u636e\u4f9d\u8d56\u7684\u662f\u6570\u7ec4\u548c[\u94fe\u8868|\u7ea2\u9ed1\u6811]\uff0c\u5177\u4f53\u94fe\u8868\u548c\u7ea2\u9ed1\u6811\u4e4b\u95f4\u5982\u4f55\u8f6c\u6362\u7684\u7ec6\u8282\u6b64\u6587\u4e0d\u505a\u8be6\u7ec6\u4ecb\u7ecd\u3002\u800c\u672c\u6587\u5f00\u5934\u63d0\u5230\u7684\u5b9e\u4f8b\u5316\u5bb9\u91cf\u5927\u5c0f\u6307\u7684\u5219\u662f\u6570\u7ec4\u7684\u5927\u5c0f\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;\"><span class=\"prefix\" style=\"display: none;\"><\/span><span class=\"content\">\u5982\u4f55\u8ba1\u7b97\u5143\u7d20\u5728\u6570\u7ec4\u4e2d\u6240\u5bf9\u5e94\u7684\u4e0b\u6807\uff1f<\/span><span class=\"suffix\" style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u9996\u5148\u8ba1\u7b97\u5143\u7d20\u7684\u54c8\u5e0c\u503c\uff0c\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">static<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">final<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">hash<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(Object&nbsp;key)<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;h;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/*\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;h&nbsp;=&nbsp;key.hashCode();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;h&nbsp;=&nbsp;h&nbsp;^&nbsp;(h&nbsp;&gt;&gt;&gt;&nbsp;16)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">return<\/span>&nbsp;(key&nbsp;==&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>)&nbsp;?&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>&nbsp;:&nbsp;(h&nbsp;=&nbsp;key.hashCode())&nbsp;^&nbsp;(h&nbsp;&gt;&gt;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">16<\/span>);\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u4f7f\u7528 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">key.hashCode()<\/code>\u7684\u503c\uff0c\u6211\u4eec\u540e\u9762\u4f1a\u63d0\u5230\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u8ba1\u7b97\u51fa\u6765\u54c8\u5e0c\u503c\u540e\uff0c\u7531\u4e8e\u6570\u7ec4\u5bb9\u91cf\u76f8\u5bf9\u6765\u8bf4\u8f83\u5c0f\u80af\u5b9a\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\u54c8\u5e0c\u503c\u5f53\u4f5c\u7d22\u5f15\u503c\u3002\u6240\u4ee5\u9700\u8981\u4f7f\u7528\u54c8\u5e0c\u503c\u5bf9\u6570\u7ec4\u957f\u5ea6\u51cf\u4e00\u540e\u7684\u503c\u53d6\u6a21\u3002\u4e0d\u8fc7\u5728\u5728 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u4e2d\u53ef\u4e0d\u662f\u76f4\u63a5\u4f7f\u7528 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">%<\/code> \u8fd0\u7b97\u7b26\u6765\u64cd\u4f5c\u7684\u3002\u4e3a\u4e86\u63d0\u9ad8\u6548\u7387\uff0c\u91c7\u7528\u7684\u662f<strong style=\"font-weight: bold; color: black;\">\u4e0e\u8fd0\u7b97<\/strong>\u7684\u65b9\u5f0f\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">final<\/span>&nbsp;V&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">putVal<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;hash,&nbsp;K&nbsp;key,&nbsp;V&nbsp;value,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">boolean<\/span>&nbsp;onlyIfAbsent,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">boolean<\/span>&nbsp;evict)<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Node&lt;K,V&gt;[]&nbsp;tab;&nbsp;Node&lt;K,V&gt;&nbsp;p;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;n,&nbsp;i;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;((tab&nbsp;=&nbsp;table)&nbsp;==&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>&nbsp;||&nbsp;(n&nbsp;=&nbsp;tab.length)&nbsp;==&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;=&nbsp;(tab&nbsp;=&nbsp;resize()).length;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/*&nbsp;n&nbsp;\u4e3a\u6570\u7ec4\u5bb9\u91cf\uff0c&nbsp;(n-1)&nbsp;&amp;&nbsp;hash&nbsp;\u5219\u662f\u8ba1\u7b97\u7d22\u5f15\u503c&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;((p&nbsp;=&nbsp;tab[i&nbsp;=&nbsp;(n&nbsp;-&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">1<\/span>)&nbsp;&amp;&nbsp;hash])&nbsp;==&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tab[i]&nbsp;=&nbsp;newNode(hash,&nbsp;key,&nbsp;value,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">else<\/span>&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;...\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u65e2\u7136\u6e05\u695a\u4e86\u8ba1\u7b97\u5143\u7b97\u5728\u6570\u7ec4\u4e2d\u6240\u5bf9\u5e94\u4e0b\u6807\u7684\u65b9\u6cd5\uff0c\u90a3\u4e48\u8bc1\u660e\u4e3a\u4ec0\u4e48\u5b9e\u4f8b\u5316 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u5bf9\u8c61\u7684\u5bb9\u91cf\u8981\u4f7f\u75282\u7684N\u6b21\u65b9\u5c31\u7b80\u5355\u591a\u4e86\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5047\u5982\u521d\u59cb\u5bb9\u91cf\u4e3a2\u76843\u6b21\u65b9\u6570\u5b578\uff0c\u5f53\u54c8\u5e0c\u503c\u4e0e\u5bb9\u91cf\u5927\u5c0f\u51cf\u4e00\u7684\u503c\u8fdb\u884c\u4e0e\u8fd0\u7b97\u65f6\u53ef\u4ee5\u4fdd\u8bc1\u7ed3\u679c\u6bd4\u8f83\u5747\u5300\u7684\u5206\u5e03\u5728\u6570\u7ec4\u4e0a\u3002<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\">&nbsp;&nbsp;10100101&nbsp;11000100&nbsp;00100101\n&amp;&nbsp;00000000&nbsp;00000000&nbsp;00000111&nbsp;\/\/&nbsp;7\n----------------------------------\n&nbsp;&nbsp;00000000&nbsp;00000000&nbsp;00000101&nbsp;\/\/&nbsp;\u7ed3\u679c\u53ef\u4ee5\u662f[0,7]\u4e2d\u7684\u4efb\u4e00\u6570\u5b57\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5982\u679c\u521d\u59cb\u5bb9\u91cf\u4e3a6\uff0c\u90a3\u4e48\u51fa\u73b0\u54c8\u5e0c\u51b2\u7a81\u7684\u51e0\u7387\u5c31\u4f1a\u589e\u52a0\u4e86\u3002<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\">&nbsp;&nbsp;10100101&nbsp;11000100&nbsp;00100101\n&amp;&nbsp;00000000&nbsp;00000000&nbsp;00000101&nbsp;\/\/&nbsp;5&nbsp;\n----------------------------------\n&nbsp;&nbsp;00000000&nbsp;00000000&nbsp;00000101&nbsp;\/\/&nbsp;5\n&nbsp;&nbsp;\n&nbsp;&nbsp;10100101&nbsp;11000100&nbsp;00100111\n&amp;&nbsp;00000000&nbsp;00000000&nbsp;00000101&nbsp;\/\/&nbsp;5&nbsp;\n----------------------------------\n&nbsp;&nbsp;00000000&nbsp;00000000&nbsp;00000101&nbsp;\/\/&nbsp;5\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5982\u679c\u4e0b\u9762\u7684\u503c\u4f4e\u4f4d\u5168\u662f1\uff0c\u90a3\u4e48\u4e0a\u9762\u7684\u8fd9\u6b21\u54c8\u5e0c\u51b2\u7a81\u5219\u53ef\u4ee5\u907f\u514d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u90a3\u4e48\u4f60\u60f3\u60f3\uff0c\u5047\u5982\u6307\u5b9a\u7684\u5bb9\u91cf\u5927\u5c0f\u4e3a5\u53c8\u4f1a\u600e\u4e48\u6837\u5462\uff1f\u5982\u679c\u662f5\uff0c\u90a3\u4e48\u5c31\u4f1a\u51fa\u73b0\u975e\u5e38\u4e25\u91cd\u7684\u54c8\u5e0c\u78b0\u649e\uff0c\u6240\u4ee5\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u51fa\u73b0\u3002<code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u5e76\u6ca1\u6709\u50bb\u4e4e\u4e4e\u7684\u76f4\u63a5\u4f7f\u7528\u7528\u6237\u6307\u5b9a\u7684\u5bb9\u91cf\u5927\u5c0f\u3002\u800c\u662f\u5728\u5b9e\u4f8b\u5316 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashMap<\/code> \u5bf9\u8c61\u65f6\uff0c\u5982\u679c\u521d\u59cb\u5bb9\u91cf\u5927\u5c0f\u4e0d\u662f2\u7684N\u6b21\u65b9\u5219\u4f1a\u628a <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">threshold<\/code> \u8bbe\u7f6e\u6210\u6bd4\u4f20\u5165\u521d\u59cb\u5bb9\u91cf\u5927\u7684\u6700\u5c0f\u76842\u7684N\u6b21\u65b9\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">public<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">HashMap<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;initialCapacity)<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">this<\/span>(initialCapacity,&nbsp;DEFAULT_LOAD_FACTOR);\n}\n\n<span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">public<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">HashMap<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;initialCapacity,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">float<\/span>&nbsp;loadFactor)<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;(initialCapacity&nbsp;&lt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">throw<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">new<\/span>&nbsp;IllegalArgumentException(<span class=\"hljs-string\" style=\"color: #50a14f; line-height: 26px;\">\"Illegal&nbsp;initial&nbsp;capacity:&nbsp;\"<\/span>&nbsp;+\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialCapacity);\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;(initialCapacity&nbsp;&gt;&nbsp;MAXIMUM_CAPACITY)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialCapacity&nbsp;=&nbsp;MAXIMUM_CAPACITY;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;(loadFactor&nbsp;&lt;=&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>&nbsp;||&nbsp;Float.isNaN(loadFactor))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">throw<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">new<\/span>&nbsp;IllegalArgumentException(<span class=\"hljs-string\" style=\"color: #50a14f; line-height: 26px;\">\"Illegal&nbsp;load&nbsp;factor:&nbsp;\"<\/span>&nbsp;+\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loadFactor);\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">this<\/span>.loadFactor&nbsp;=&nbsp;loadFactor;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/*&nbsp;\u8bbe\u7f6e&nbsp;threshold&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">this<\/span>.threshold&nbsp;=&nbsp;tableSizeFor(initialCapacity);\n}\n\n<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/*&nbsp;Returns&nbsp;a&nbsp;power&nbsp;of&nbsp;two&nbsp;size&nbsp;for&nbsp;the&nbsp;given&nbsp;target&nbsp;capacity.*\/<\/span>\n\n<span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">static<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">final<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">tableSizeFor<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;cap)<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;n&nbsp;=&nbsp;cap&nbsp;-&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">1<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;|=&nbsp;n&nbsp;&gt;&gt;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">1<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;|=&nbsp;n&nbsp;&gt;&gt;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">2<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;|=&nbsp;n&nbsp;&gt;&gt;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">4<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;|=&nbsp;n&nbsp;&gt;&gt;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">8<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;|=&nbsp;n&nbsp;&gt;&gt;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">16<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">return<\/span>&nbsp;(n&nbsp;&lt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)&nbsp;?&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">1<\/span>&nbsp;:&nbsp;(n&nbsp;&gt;=&nbsp;MAXIMUM_CAPACITY)&nbsp;?&nbsp;MAXIMUM_CAPACITY&nbsp;:&nbsp;n&nbsp;+&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">1<\/span>;\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5728\u7b2c\u4e00\u6b21\u8c03\u7528 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">put<\/code> \u65b9\u6cd5\u65f6\uff0c\u7531\u4e8e\u672a\u521d\u59cb\u5316\u6570\u7ec4\u5219\u4f1a\u8c03\u7528 <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">resize()<\/code> \u65b9\u6cd5\u521d\u59cb\u5316\u6570\u7ec4\uff0c\u800c <code style=\"font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; color: #1e6bb8; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all;\">threshold<\/code> \u53c2\u6570\u5219\u662f\u521d\u59cb\u5316\u6570\u7ec4\u7684\u957f\u5ea6\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"custom\" data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block; background: url(https:\/\/www.changxuan.top\/wp-content\/uploads\/2020\/11\/point.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #fafafa; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;\"><\/span><code class=\"hljs\" style=\"overflow-x: auto; padding: 16px; color: #383a42; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; padding-top: 15px; background: #fafafa; border-radius: 5px;\"><span class=\"hljs-function\" style=\"line-height: 26px;\"><span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">final<\/span>&nbsp;V&nbsp;<span class=\"hljs-title\" style=\"color: #4078f2; line-height: 26px;\">putVal<\/span><span class=\"hljs-params\" style=\"line-height: 26px;\">(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;hash,&nbsp;K&nbsp;key,&nbsp;V&nbsp;value,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">boolean<\/span>&nbsp;onlyIfAbsent,<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">boolean<\/span>&nbsp;evict)<\/span>&nbsp;<\/span>{\n&nbsp;&nbsp;&nbsp;&nbsp;Node&lt;K,V&gt;[]&nbsp;tab;&nbsp;Node&lt;K,V&gt;&nbsp;p;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;n,&nbsp;i;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/*&nbsp;\u521d\u59cb\u5316\u6570\u7ec4&nbsp;*\/<\/span>&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;((tab&nbsp;=&nbsp;table)&nbsp;==&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>&nbsp;||&nbsp;(n&nbsp;=&nbsp;tab.length)&nbsp;==&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;=&nbsp;(tab&nbsp;=&nbsp;resize()).length;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;((p&nbsp;=&nbsp;tab[i&nbsp;=&nbsp;(n&nbsp;-&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">1<\/span>)&nbsp;&amp;&nbsp;hash])&nbsp;==&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tab[i]&nbsp;=&nbsp;newNode(hash,&nbsp;key,&nbsp;value,&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>);\n&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;...\n}\n\n\n<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">final<\/span>&nbsp;Node&lt;K,V&gt;[]&nbsp;resize()&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;Node&lt;K,V&gt;[]&nbsp;oldTab&nbsp;=&nbsp;table;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;oldCap&nbsp;=&nbsp;(oldTab&nbsp;==&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">null<\/span>)&nbsp;?&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>&nbsp;:&nbsp;oldTab.length;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;oldThr&nbsp;=&nbsp;threshold;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>&nbsp;newCap,&nbsp;newThr&nbsp;=&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;(oldCap&nbsp;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;...\n&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">else<\/span>&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;(oldThr&nbsp;&gt;&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newCap&nbsp;=&nbsp;oldThr;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">else<\/span>&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;...\n&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">if<\/span>&nbsp;(newThr&nbsp;==&nbsp;<span class=\"hljs-number\" style=\"color: #986801; line-height: 26px;\">0<\/span>)&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">float<\/span>&nbsp;ft&nbsp;=&nbsp;(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">float<\/span>)newCap&nbsp;*&nbsp;loadFactor;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;newThr&nbsp;=&nbsp;(newCap&nbsp;&lt;&nbsp;MAXIMUM_CAPACITY&nbsp;&amp;&amp;&nbsp;ft&nbsp;&lt;&nbsp;(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">float<\/span>)MAXIMUM_CAPACITY&nbsp;?\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">int<\/span>)ft&nbsp;:&nbsp;Integer.MAX_VALUE);\n&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;&nbsp;&nbsp;threshold&nbsp;=&nbsp;newThr;\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-comment\" style=\"color: #a0a1a7; font-style: italic; line-height: 26px;\">\/*&nbsp;\u521d\u59cb\u5316\u6570\u7ec4&nbsp;*\/<\/span>\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-meta\" style=\"color: #4078f2; line-height: 26px;\">@SuppressWarnings<\/span>({<span class=\"hljs-string\" style=\"color: #50a14f; line-height: 26px;\">\"rawtypes\"<\/span>,<span class=\"hljs-string\" style=\"color: #50a14f; line-height: 26px;\">\"unchecked\"<\/span>})\n&nbsp;&nbsp;&nbsp;&nbsp;Node&lt;K,V&gt;[]&nbsp;newTab&nbsp;=&nbsp;(Node&lt;K,V&gt;[])<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">new<\/span>&nbsp;Node[newCap];\n&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;...\n&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\" style=\"color: #a626a4; line-height: 26px;\">return<\/span>&nbsp;newTab;\n}\n<\/code><\/pre>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\"><strong style=\"font-weight: bold; color: black;\">\u5176\u5b9e2\u7684N\u6b21\u65b9\u6570\u5b57-1\u7684\u4e8c\u8fdb\u5236\u5f62\u5f0f\u8fd9\u4e2a\u7279\u6027\u5728\u597d\u591a\u5730\u65b9\u4f1a\u5f88\u597d\u7528\uff0c\u53ef\u4ee5\u5728\u5c0f\u672c\u672c\u8bb0\u4e0a\u3002<\/strong><\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u54e6\uff0c\u524d\u9762\u8bf4\u4e3a\u4ec0\u4e48\u8ba1\u7b97\u51fa\u6765\u7684\u6563\u5217\u503c\u9700\u8981\u518d\u8ba9\u9ad816\u4f4d\u548c\u4f4e\u5341\u516d\u4f4d\u505a\u5f02\u6216\u8fd0\u7b97\uff0c\u4e3b\u8981\u662f\u8ba9\u53c2\u4e0e\u4e0e\u8fd0\u7b97\u7684\u4f4d\u540c\u65f6\u5177\u6709\u9ad8\u4f4d\u548c\u4f4e\u4f4d\u7684\u7279\u5f81\uff0c\u6765\u51cf\u5c11\u54c8\u5e0c\u78b0\u649e\u6b21\u6570\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u6700\u540e\uff0c\u867d\u7136\u4f60\u6307\u5b9a\u4e86\u5bb9\u91cf\u5927\u5c0f\uff0c\u4f46\u662f\u7a0b\u5e8f\u5e76\u6ca1\u6709\u6309\u7167\u4f60\u7684\u610f\u613f\u8fdb\u884c\u521d\u59cb\u5316\u6570\u7ec4\uff0c\u800c\u4e14\u5bf9\u4f60\u7684\u201c\u9519\u8bef\u201d\u884c\u4e3a\u8fdb\u884c\u4e86\u7ea0\u9519\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;\">\u5c0f\u670b\u53cb\uff0c\u8fd8\u8bd5\u4e0d\u8bd5\u5566\uff01<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u4e24\u5929\uff0c\u6211\u5728\u4e00\u4f4d\u540c\u5b66\u63d0\u4ea4\u4e2d\u770b\u5230\u4e86\u4e0b\u9762\u8fd9\u6837\u7684\u4e00\u884c\u4ee3\u7801\u3002 Map&lt;String,&nbsp;String&#038;g &hellip; <a href=\"https:\/\/www.changxuan.top\/?p=1208\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[95],"class_list":["post-1208","post","type-post","status-publish","format-standard","hentry","category-tech","tag-95"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f - \u5e38\u8f69<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.changxuan.top\/?p=1208\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f - \u5e38\u8f69\" \/>\n<meta property=\"og:description\" content=\"\u524d\u4e24\u5929\uff0c\u6211\u5728\u4e00\u4f4d\u540c\u5b66\u63d0\u4ea4\u4e2d\u770b\u5230\u4e86\u4e0b\u9762\u8fd9\u6837\u7684\u4e00\u884c\u4ee3\u7801\u3002 Map&lt;String,&nbsp;String&amp;g &hellip; \u7ee7\u7eed\u9605\u8bfb\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.changxuan.top\/?p=1208\" \/>\n<meta property=\"og:site_name\" content=\"\u5e38\u8f69\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-19T16:06:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-20T12:32:16+00:00\" \/>\n<meta name=\"author\" content=\"\u5e38\u8f69\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5e38\u8f69\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208\"},\"author\":{\"name\":\"\u5e38\u8f69\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\"},\"headline\":\"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f\",\"datePublished\":\"2020-12-19T16:06:36+00:00\",\"dateModified\":\"2020-12-20T12:32:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208\"},\"wordCount\":11,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\"},\"keywords\":[\"\u6e90\u7801\"],\"articleSection\":[\"\u6280\u672f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.changxuan.top\\\/?p=1208#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208\",\"url\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208\",\"name\":\"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f - \u5e38\u8f69\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#website\"},\"datePublished\":\"2020-12-19T16:06:36+00:00\",\"dateModified\":\"2020-12-20T12:32:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.changxuan.top\\\/?p=1208\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/?p=1208#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/www.changxuan.top\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#website\",\"url\":\"https:\\\/\\\/www.changxuan.top\\\/\",\"name\":\"\u5e38\u8f69\",\"description\":\"\u95fb\u9053\u6709\u5148\u540e\uff0c\u672f\u4e1a\u6709\u4e13\u653b-\u4e00\u4e8c\u4e09\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.changxuan.top\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/#\\\/schema\\\/person\\\/08c8f0af44536928094dc1b4f88da3bd\",\"name\":\"\u5e38\u8f69\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\",\"url\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\",\"contentUrl\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\",\"width\":960,\"height\":960,\"caption\":\"\u5e38\u8f69\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.changxuan.top\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/IMG_008520200606-095631.jpg\"},\"description\":\"\u603b\u8981\u505a\u70b9\u4ec0\u4e48\u5427\uff01\",\"sameAs\":[\"https:\\\/\\\/www.changxuan.top\"],\"url\":\"https:\\\/\\\/www.changxuan.top\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f - \u5e38\u8f69","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.changxuan.top\/?p=1208","og_locale":"zh_CN","og_type":"article","og_title":"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f - \u5e38\u8f69","og_description":"\u524d\u4e24\u5929\uff0c\u6211\u5728\u4e00\u4f4d\u540c\u5b66\u63d0\u4ea4\u4e2d\u770b\u5230\u4e86\u4e0b\u9762\u8fd9\u6837\u7684\u4e00\u884c\u4ee3\u7801\u3002 Map&lt;String,&nbsp;String&g &hellip; \u7ee7\u7eed\u9605\u8bfb\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f","og_url":"https:\/\/www.changxuan.top\/?p=1208","og_site_name":"\u5e38\u8f69","article_published_time":"2020-12-19T16:06:36+00:00","article_modified_time":"2020-12-20T12:32:16+00:00","author":"\u5e38\u8f69","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5e38\u8f69","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.changxuan.top\/?p=1208#article","isPartOf":{"@id":"https:\/\/www.changxuan.top\/?p=1208"},"author":{"name":"\u5e38\u8f69","@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd"},"headline":"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f","datePublished":"2020-12-19T16:06:36+00:00","dateModified":"2020-12-20T12:32:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.changxuan.top\/?p=1208"},"wordCount":11,"commentCount":0,"publisher":{"@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd"},"keywords":["\u6e90\u7801"],"articleSection":["\u6280\u672f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.changxuan.top\/?p=1208#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.changxuan.top\/?p=1208","url":"https:\/\/www.changxuan.top\/?p=1208","name":"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f - \u5e38\u8f69","isPartOf":{"@id":"https:\/\/www.changxuan.top\/#website"},"datePublished":"2020-12-19T16:06:36+00:00","dateModified":"2020-12-20T12:32:16+00:00","breadcrumb":{"@id":"https:\/\/www.changxuan.top\/?p=1208#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.changxuan.top\/?p=1208"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.changxuan.top\/?p=1208#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.changxuan.top\/"},{"@type":"ListItem","position":2,"name":"\u4e3a\u4ec0\u4e48 HashMap \u7684\u5bb9\u91cf\u5927\u5c0f\u8981\u8bbe\u7f6e\u4e3a2\u7684N\u6b21\u65b9\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.changxuan.top\/#website","url":"https:\/\/www.changxuan.top\/","name":"\u5e38\u8f69","description":"\u95fb\u9053\u6709\u5148\u540e\uff0c\u672f\u4e1a\u6709\u4e13\u653b-\u4e00\u4e8c\u4e09","publisher":{"@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.changxuan.top\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.changxuan.top\/#\/schema\/person\/08c8f0af44536928094dc1b4f88da3bd","name":"\u5e38\u8f69","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg","url":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg","contentUrl":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg","width":960,"height":960,"caption":"\u5e38\u8f69"},"logo":{"@id":"https:\/\/www.changxuan.top\/wp-content\/uploads\/2021\/04\/IMG_008520200606-095631.jpg"},"description":"\u603b\u8981\u505a\u70b9\u4ec0\u4e48\u5427\uff01","sameAs":["https:\/\/www.changxuan.top"],"url":"https:\/\/www.changxuan.top\/?author=1"}]}},"views":1960,"_links":{"self":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts\/1208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1208"}],"version-history":[{"count":4,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts\/1208\/revisions"}],"predecessor-version":[{"id":1216,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=\/wp\/v2\/posts\/1208\/revisions\/1216"}],"wp:attachment":[{"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.changxuan.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}