{"id":5065,"date":"2024-08-01T22:48:12","date_gmt":"2024-08-01T14:48:12","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=5065"},"modified":"2024-08-02T15:45:05","modified_gmt":"2024-08-02T07:45:05","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e9%98%bf%e9%87%8c%e4%b8%8d%e6%8e%a8%e8%8d%90%e4%bd%bf%e7%94%a8-keyset-%e9%81%8d%e5%8e%86hashmap%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/java\/%e4%b8%ba%e4%bb%80%e4%b9%88%e9%98%bf%e9%87%8c%e4%b8%8d%e6%8e%a8%e8%8d%90%e4%bd%bf%e7%94%a8-keyset-%e9%81%8d%e5%8e%86hashmap%ef%bc%9f\/","title":{"rendered":"\u4e3a\u4ec0\u4e48\u963f\u91cc\u4e0d\u63a8\u8350\u4f7f\u7528 keySet() \u904d\u5386HashMap\uff1f"},"content":{"rendered":"<div class=\"wxsyncmain\">\n<section style=\"margin-bottom: 0px; text-wrap: wrap; outline: 0px; color: #222222; letter-spacing: 0.544px; background-color: #ffffff; visibility: visible; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; margin-left: 0px; margin-right: 0px;\" data-mpa-powered-by=\"yiban.io\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; text-wrap: wrap; color: #222222; background-color: #ffffff; visibility: visible; margin-left: 0px; margin-right: 0px;\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; text-wrap: wrap; letter-spacing: 0.578px; background-color: #ffffff; visibility: visible; margin-left: 0px; margin-right: 0px;\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; text-wrap: wrap; letter-spacing: 0.578px; background-color: #ffffff; visibility: visible; margin-left: 0px; margin-right: 0px;\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; text-wrap: wrap; letter-spacing: 0.578px; background-color: #ffffff; line-height: 3em; visibility: visible; margin-left: 0px; margin-right: 0px;\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; text-wrap: wrap; letter-spacing: 0.578px; background-color: #ffffff; line-height: 3em; visibility: visible; margin-left: 0px; margin-right: 0px;\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; text-wrap: wrap; letter-spacing: 0.578px; background-color: #ffffff; line-height: 3em; visibility: visible; margin-left: 0px; margin-right: 0px;\"><\/section>\n<h1 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 24px; line-height: 28px; border-bottom: 1px solid #2584b5;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"padding: 2px 8px; background: #2584b5; color: white; counter-increment: counterh1 1;\">Part1<\/span><span style=\"margin-left: 8px; color: #2584b5; font-size: 20px;\">\u5f15\u8a00<\/span><\/h1>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">HashMap\u76f8\u4fe1\u6240\u6709\u5b66Java\u7684\u90fd\u4e00\u5b9a\u4e0d\u4f1a\u611f\u5230\u964c\u751f\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u975e\u5e38\u91cd\u7528\u4e14\u975e\u5e38\u5b9e\u7528\u7684Java\u63d0\u4f9b\u7684\u5bb9\u5668\uff0c\u5b83\u5728\u6211\u4eec\u7684\u4ee3\u7801\u91cc\u9762\u968f\u5904\u53ef\u89c1\u3002\u56e0\u6b64\u904d\u5386\u64cd\u4f5c\u4e5f\u662f\u6211\u4eec\u7ecf\u5e38\u4f1a\u4f7f\u7528\u5230\u7684\u3002HashMap\u7684\u904d\u5386\u65b9\u5f0f\u73b0\u5982\u4eca\u6709\u975e\u5e38\u591a\u79cd\uff1a<\/section>\n<ol class=\"list-paddingleft-1\" style=\"margin: 8px 0px; padding-left: 25px; width: 557.438px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u4f7f\u7528\u8fed\u4ee3\u5668\uff08Iterator)\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u4f7f\u7528<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">keySet()<\/code>\u83b7\u53d6\u952e\u7684\u96c6\u5408\uff0c\u7136\u540e\u901a\u8fc7\u589e\u5f3a\u7684 for \u5faa\u73af\u904d\u5386\u952e\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u4f7f\u7528<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">entrySet()<\/code>\u83b7\u53d6\u952e\u503c\u5bf9\u7684\u96c6\u5408\uff0c\u7136\u540e\u901a\u8fc7\u589e\u5f3a\u7684 for \u5faa\u73af\u904d\u5386\u952e\u503c\u5bf9\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u4f7f\u7528 Java 8+ \u7684 Lambda \u8868\u8fbe\u5f0f\u548c\u6d41\u3002<\/p>\n<\/section>\n<\/li>\n<\/ol>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u4ee5\u4e0a\u904d\u5386\u65b9\u5f0f\u7684\u5b70\u4f18\u5b70\u52a3\uff0c\u5728\u300a\u963f\u91cc\u5df4\u5df4\u5f00\u53d1\u624b\u518c\u300b\u4e2d\u5199\u9053\uff1a<\/section>\n<section style=\"padding-right: 10px; padding-left: 10px; text-wrap: wrap; font-size: 16px; color: black; line-height: 1.6; letter-spacing: 0px; word-break: break-word; text-align: left; counter-reset: counterh1 0 counterh2 0 counterh3 0; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; margin-left: 0px; margin-right: 0px;\">\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518716\" data-ratio=\"0.2387774594078319\" data-type=\"other\" data-w=\"1047\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518716\" data-ratio=\"0.2387774594078319\" data-type=\"other\" data-w=\"1047\" \/><\/noscript><\/figure>\n<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u8fd9\u91cc\u63a8\u8350\u4f7f\u7528\u7684\u662f<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">entrySet<\/code>\u8fdb\u884c\u904d\u5386\uff0c\u5728Java8\u4e2d\u63a8\u8350\u4f7f\u7528<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">Map.forEach()<\/code>\u3002\u7ed9\u51fa\u7684\u7406\u7531\u662f<strong style=\"color: #2584b5;\">\u904d\u5386\u6b21\u6570<\/strong>\u4e0a\u7684\u4e0d\u540c\u3002<\/section>\n<ol class=\"list-paddingleft-1\" style=\"margin: 8px 0px; padding-left: 25px; width: 557.438px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">keySet\u904d\u5386\uff0c\u9700\u8981\u7ecf\u8fc7<strong style=\"color: #2584b5;\">\u4e24\u6b21<\/strong>\u904d\u5386\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">entrySet\u904d\u5386\uff0c\u53ea\u9700\u8981<strong style=\"color: #2584b5;\">\u4e00\u6b21<\/strong>\u904d\u5386\u3002<\/p>\n<\/section>\n<\/li>\n<\/ol>\n<blockquote style=\"margin-top: 20px; margin-bottom: 20px; padding: 10px 10px 10px 20px; color: #6a737d; font-size: 0.9em; overflow: auto; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border: 1px dashed #2584b5;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<section style=\"padding-top: 8px; padding-bottom: 8px; font-size: 16px; color: black; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u5176\u4e2dkeySet\u904d\u5386\u4e86\u4e24\u6b21\uff0c\u4e00\u6b21\u662f\u8f6c\u4e3aIterator\u5bf9\u8c61\uff0c\u53e6\u4e00\u6b21\u662f\u4ecehashMap\u4e2d\u53d6\u51fakey\u6240\u5bf9\u5e94\u7684value\u3002<\/section>\n<\/blockquote>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u5176\u4e2d\u540e\u9762\u4e00\u6bb5\u8bdd\u5f88\u597d\u7406\u89e3\uff0c\u4f46\u662f\u524d\u9762\u8fd9\u53e5\u8bdd\u5374\u6709\u70b9\u7ed5\uff0c\u4e3a\u4ec0\u4e48\u8f6c\u6362\u6210\u4e86Iterator\u904d\u5386\u4e86\u4e00\u6b21\uff1f<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u6211\u67e5\u9605\u4e86\u5404\u4e2a\u5e73\u53f0\u5bf9HashMap\u7684\u904d\u5386\uff0c\u5176\u4e2d\u90fd\u6ca1\u6709\u6216\u8005\u539f\u5c01\u4e0d\u52a8\u7684\u7167\u642c\u4e0a\u53e5\u8bdd\u3002\uff08\u5f53\u7136\u4e5f\u53ef\u80fd\u662f\u6211\u6ca1\u6709\u67e5\u9605\u5230\u9760\u8c31\u7684\u6587\u7ae0\uff0c\u6b22\u8fce\u6307\u6b63\uff09<\/section>\n<h1 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 24px; line-height: 28px; border-bottom: 1px solid #2584b5;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"padding: 2px 8px; background: #2584b5; color: white; counter-increment: counterh1 1;\">Part2<\/span><span style=\"margin-left: 8px; color: #2584b5; font-size: 20px;\">keySet\u5982\u4f55\u904d\u5386\u4e86\u4e24\u6b21<\/span><\/h1>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u6211\u4eec\u9996\u5148\u5199\u4e00\u6bb5\u4ee3\u7801\uff0c\u4f7f\u7528keySet\u904d\u5386Map\u3002<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">Test<\/span><\/span>{<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">static<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">void<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]args)<\/span><\/span>{Map&lt;String,String&gt;map=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>HashMap&lt;&gt;();map.put(<span style=\"color: #a6e22e; line-height: 26px;\">\"k1\"<\/span>,<span style=\"color: #a6e22e; line-height: 26px;\">\"v1\"<\/span>);map.put(<span style=\"color: #a6e22e; line-height: 26px;\">\"k2\"<\/span>,<span style=\"color: #a6e22e; line-height: 26px;\">\"v2\"<\/span>);map.put(<span style=\"color: #a6e22e; line-height: 26px;\">\"k3\"<\/span>,<span style=\"color: #a6e22e; line-height: 26px;\">\"v3\"<\/span>);<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">for<\/span>(Stringkey:map.keySet()){Stringvalue=map.get(key);System.out.println(key+<span style=\"color: #a6e22e; line-height: 26px;\">\":\"<\/span>+value);}}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u8fd0\u884c\u7ed3\u679c\u663e\u800c\u6613\u89c1\u7684\u662f<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\">k1:v1k2:v2k3:v3<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u4e24\u6b21\u904d\u5386\uff0c\u7b2c\u4e00\u6b21\u904d\u5386\u6240\u63cf\u8ff0\u7684\u662f\u8f6c\u4e3aIterator\u5bf9\u8c61\u6211\u4eec\u597d\u50cf\u6ca1\u6709\u4ece\u4ee3\u7801\u4e2d\u770b\u89c1\uff0c\u6211\u4eec\u770b\u5230\u7684\u540e\u9762\u6240\u63cf\u8ff0\u7684\u904d\u5386\uff0c\u4e5f\u5c31\u662f\u904d\u5386<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">map,keySet()<\/code>\u6240\u8fd4\u56de\u7684<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">Set<\/code>\u96c6\u5408\u4e2d\u7684key\uff0c\u7136\u540e\u53bbHashMap\u4e2d\u62ff\u53d6value\u7684\u3002<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">Iterator\u5bf9\u8c61\u5462\uff1f\u5982\u4f55\u904d\u5386\u8f6c\u6362\u4e3aIterator\u5bf9\u8c61\u7684\u5462\uff1f<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u9996\u5148\u6211\u4eec\u8fd9\u79cd\u904d\u5386\u65b9\u5f0f\u5927\u5bb6\u90fd\u5e94\u8be5\u77e5\u9053\u662f\u53eb\uff1a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">\u589e\u5f3afor\u5faa\u73af\uff0cfor-each<\/code><\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u8fd9\u662f\u4e00\u79cdJava\u7684\u8bed\u6cd5\u7cd6~\u3002<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u53cd\u7f16\u8bd1\uff0c\u6216\u8005\u76f4\u63a5\u901a\u8fc7Idea\u5728class\u6587\u4ef6\u4e2d\u67e5\u770b\u5bf9\u5e94\u7684Class\u6587\u4ef6<\/section>\n<section style=\"margin-left: 0px; margin-right: 0px;\">\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518713\" data-ratio=\"0.6083333333333333\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518713\" data-ratio=\"0.6083333333333333\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/figure>\n<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">Test<\/span><\/span>{<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">Test<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">static<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">void<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]args)<\/span><\/span>{Map&lt;String,String&gt;map=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>HashMap();map.put(<span style=\"color: #a6e22e; line-height: 26px;\">\"k1\"<\/span>,<span style=\"color: #a6e22e; line-height: 26px;\">\"v1\"<\/span>);map.put(<span style=\"color: #a6e22e; line-height: 26px;\">\"k2\"<\/span>,<span style=\"color: #a6e22e; line-height: 26px;\">\"v2\"<\/span>);map.put(<span style=\"color: #a6e22e; line-height: 26px;\">\"k3\"<\/span>,<span style=\"color: #a6e22e; line-height: 26px;\">\"v3\"<\/span>);Iteratorvar2=map.keySet().iterator();<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">while<\/span>(var2.hasNext()){Stringkey=(String)var2.next();Stringvalue=(String)map.get(key);System.out.println(key+<span style=\"color: #a6e22e; line-height: 26px;\">\":\"<\/span>+value);}}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u548c\u6211\u4eec\u7f16\u5199\u7684\u662f\u5b58\u5728\u5dee\u5f02\u7684\uff0c\u5176\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5176\u4e2d\u901a\u8fc7<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">map.keySet().iterator()<\/code>\u83b7\u53d6\u5230\u4e86\u6211\u4eec\u6240\u9700\u8981\u770b\u89c1\u7684<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">Iterator<\/code>\u5bf9\u8c61\u3002<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u90a3\u4e48\u5b83\u53c8\u662f\u600e\u4e48\u8f6c\u6362\u6210\u7684\u5462\uff1f\u4e3a\u4ec0\u4e48\u9700\u8981\u904d\u5386\u5462\uff1f\u6211\u4eec\u67e5\u770b<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">iterator()<\/code>\u65b9\u6cd5<\/section>\n<h2 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 22px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"display: inline-block;\"><span style=\"padding: 2px 4px; counter-increment: counterh2 1; color: #9fcdd0; border-bottom: 4px solid #9fcdd0; font-size: 18px;\">1<\/span><\/span><span style=\"padding: 2px 4px; font-size: 18px; border-bottom: 4px solid #2584b5; color: #2584b5;\">iterator()<\/span><\/h2>\n<section style=\"margin-left: 0px; margin-right: 0px;\">\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518715\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518715\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/figure>\n<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u53d1\u73b0\u662fSet\u5b9a\u4e49\u7684\u4e00\u4e2a\u63a5\u53e3\u3002\u8fd4\u56de\u6b64\u96c6\u5408\u4e2d\u5143\u7d20\u7684\u8fed\u4ee3\u5668<\/section>\n<h2 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 22px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"display: inline-block;\"><span style=\"padding: 2px 4px; counter-increment: counterh2 1; color: #9fcdd0; border-bottom: 4px solid #9fcdd0; font-size: 18px;\">2<\/span><\/span><span style=\"padding: 2px 4px; font-size: 18px; border-bottom: 4px solid #2584b5; color: #2584b5;\">HashMap.KeySet#iterator()<\/span><\/h2>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u6211\u4eec\u67e5\u770bHashMap\u4e2dkeySet\u7c7b\u5bf9\u8be5\u65b9\u6cd5\u7684\u5b9e\u73b0\u3002<\/section>\n<section style=\"margin-left: 0px; margin-right: 0px;\">\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518717\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518717\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/figure>\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518714\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518714\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/figure>\n<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">KeySet<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">extends<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">AbstractSet<\/span>&lt;<span style=\"font-weight: bold; color: white; line-height: 26px;\">K<\/span>&gt;<\/span>{<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">int<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">size<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span>size;}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">void<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">clear<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{HashMap.<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">this<\/span>.clear();}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span>Iterator&lt;K&gt;<span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">iterator<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>KeyIterator();}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">boolean<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">contains<\/span><span style=\"line-height: 26px;\">(Objecto)<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span>containsKey(o);}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">boolean<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">remove<\/span><span style=\"line-height: 26px;\">(Objectkey)<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span>removeNode(hash(key),key,<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>,<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">false<\/span>,<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">true<\/span>)!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>;}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span>Spliterator&lt;K&gt;<span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">spliterator<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>KeySpliterator&lt;&gt;(HashMap.<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">this<\/span>,<span style=\"line-height: 26px;\">0<\/span>,-<span style=\"line-height: 26px;\">1<\/span>,<span style=\"line-height: 26px;\">0<\/span>,<span style=\"line-height: 26px;\">0<\/span>);}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">void<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">forEach<\/span><span style=\"line-height: 26px;\">(Consumer&lt;?<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">super<\/span>K&gt;action)<\/span><\/span>{Node&lt;K,V&gt;[]tab;<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(action==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>)<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">throw<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>NullPointerException();<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(size&gt;<span style=\"line-height: 26px;\">0<\/span>&amp;&amp;(tab=table)!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>){<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">int<\/span>mc=modCount;<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">for<\/span>(<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">int<\/span>i=<span style=\"line-height: 26px;\">0<\/span>;i&lt;tab.length;++i){<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">for<\/span>(Node&lt;K,V&gt;e=tab[i];e!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>;e=e.next)action.accept(e.key);}<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(modCount!=mc)<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">throw<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>ConcurrentModificationException();}}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u5176\u4e2d\u7684iterator()\u65b9\u6cd5\u8fd4\u56de\u7684\u662f\u4e00\u4e2a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">KeyIterator<\/code>\u5bf9\u8c61\uff0c\u90a3\u4e48\u7a76\u7adf\u662f\u5728\u54ea\u91cc\u8fdb\u884c\u4e86\u904d\u5386\u5462\uff1f\u6211\u4eec\u63a5\u7740\u5f80\u4e0b\u770b\u53bb\u3002<\/section>\n<h2 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 22px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"display: inline-block;\"><span style=\"padding: 2px 4px; counter-increment: counterh2 1; color: #9fcdd0; border-bottom: 4px solid #9fcdd0; font-size: 18px;\">3<\/span><\/span><span style=\"padding: 2px 4px; font-size: 18px; border-bottom: 4px solid #2584b5; color: #2584b5;\">HashMap.KeyIterator<\/span><\/h2>\n<section style=\"margin-left: 0px; margin-right: 0px;\">\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518718\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518718\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/figure>\n<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">KeyIterator<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">extends<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">HashIterator<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">implements<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">Iterator<\/span>&lt;<span style=\"font-weight: bold; color: white; line-height: 26px;\">K<\/span>&gt;<\/span>{<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span>K<span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">next<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span>nextNode().key;}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u8fd9\u4e2a\u7c7b\u4e5f\u5f88\u7b80\u5355\uff1a<\/section>\n<ol class=\"list-paddingleft-1\" style=\"margin: 8px 0px; padding-left: 25px; width: 557.438px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u7ee7\u627f\u4e86<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashIterator<\/code>\u7c7b\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u5b9e\u73b0\u4e86<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">Iterator<\/code>\u63a5\u53e3\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u4e00\u4e2a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">next()<\/code>\u65b9\u6cd5\u3002<\/p>\n<\/section>\n<\/li>\n<\/ol>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u8fd8\u662f\u6ca1\u6709\u770b\u89c1\u54ea\u91cc\u8fdb\u884c\u4e86\u904d\u5386\uff0c\u90a3\u4e48\u6211\u4eec\u7ee7\u7eed\u67e5\u770b<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashIterator<\/code>\u7c7b<\/section>\n<h2 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 22px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"display: inline-block;\"><span style=\"padding: 2px 4px; counter-increment: counterh2 1; color: #9fcdd0; border-bottom: 4px solid #9fcdd0; font-size: 18px;\">4<\/span><\/span><span style=\"padding: 2px 4px; font-size: 18px; border-bottom: 4px solid #2584b5; color: #2584b5;\">HashMap.HashIterator<\/span><\/h2>\n<section style=\"margin-left: 0px; margin-right: 0px;\">\n<figure style=\"margin-top: 10px; margin-bottom: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><img class=\"rich_pages wxw-img lazyload\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518719\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><noscript><img class=\"rich_pages wxw-img\" style=\"margin-right: auto; margin-left: auto; display: block;\" data-imgfileid=\"305518719\" data-ratio=\"0.6018518518518519\" data-type=\"other\" data-w=\"1080\" \/><\/noscript><\/figure>\n<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">abstract<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">HashIterator<\/span><\/span>{Node&lt;K,V&gt;next;<span style=\"color: #75715e; line-height: 26px;\">\/\/nextentrytoreturn<\/span>Node&lt;K,V&gt;current;<span style=\"color: #75715e; line-height: 26px;\">\/\/currententry<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">int<\/span>expectedModCount;<span style=\"color: #75715e; line-height: 26px;\">\/\/forfast-fail<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">int<\/span>index;<span style=\"color: #75715e; line-height: 26px;\">\/\/currentslot<\/span>HashIterator(){expectedModCount=modCount;Node&lt;K,V&gt;[]t=table;current=next=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>;index=<span style=\"line-height: 26px;\">0<\/span>;<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(t!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>&amp;&amp;size&gt;<span style=\"line-height: 26px;\">0<\/span>){<span style=\"color: #75715e; line-height: 26px;\">\/\/advancetofirstentry<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">do<\/span>{}<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">while<\/span>(index&lt;t.length&amp;&amp;(next=t[index++])==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>);}}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">boolean<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">hasNext<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span>next!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>;}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span>Node&lt;K,V&gt;<span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">nextNode<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{Node&lt;K,V&gt;[]t;Node&lt;K,V&gt;e=next;<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(modCount!=expectedModCount)<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">throw<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>ConcurrentModificationException();<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(e==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>)<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">throw<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>NoSuchElementException();<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>((next=(current=e).next)==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>&amp;&amp;(t=table)!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>){<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">do<\/span>{}<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">while<\/span>(index&lt;t.length&amp;&amp;(next=t[index++])==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>);}<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">return<\/span>e;}<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">final<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">void<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">remove<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{Node&lt;K,V&gt;p=current;<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(p==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>)<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">throw<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>IllegalStateException();<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(modCount!=expectedModCount)<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">throw<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>ConcurrentModificationException();current=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>;Kkey=p.key;removeNode(hash(key),key,<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>,<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">false<\/span>,<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">false<\/span>);expectedModCount=modCount;}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0\u8fd9\u4e2a\u6784\u9020\u5668\u4e2d\u5b58\u5728\u4e86\u4e00\u4e2a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">do-while<\/code>\u5faa\u73af\u64cd\u4f5c\uff0c\u76ee\u7684\u662f\u627e\u5230\u4e00\u4e2a\u7b2c\u4e00\u4e2a\u4e0d\u4e3a\u7a7a\u7684<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">entry<\/code>\u3002<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\">HashIterator(){expectedModCount=modCount;Node&lt;K,V&gt;[]t=table;current=next=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>;index=<span style=\"line-height: 26px;\">0<\/span>;<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">if<\/span>(t!=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>&amp;&amp;size&gt;<span style=\"line-height: 26px;\">0<\/span>){<span style=\"color: #75715e; line-height: 26px;\">\/\/advancetofirstentry<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">do<\/span>{}<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">while<\/span>(index&lt;t.length&amp;&amp;(next=t[index++])==<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">null<\/span>);}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u800c<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">KeyIterator<\/code>\u662fextend<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashIterator<\/code>\u5bf9\u8c61\u7684\u3002\u8fd9\u91cc\u6d89\u53ca\u5230\u4e86\u7ee7\u627f\u7684\u76f8\u5173\u6982\u5ff5\uff0c\u5927\u5bb6\u5fd8\u8bb0\u7684\u53ef\u4ee5\u627e\u76f8\u5173\u7684\u6587\u7ae0\u770b\u770b\uff0c\u6216\u8005\u6211\u4e5f\u53ef\u4ee5\u5199\u4e00\u7bc7~~dog\u3002<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u4f8b\u5982\u4e24\u4e2a\u7c7b<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">Father<\/span><\/span>{<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">Father<\/span><span style=\"line-height: 26px;\">()<\/span><\/span>{System.out.println(<span style=\"color: #a6e22e; line-height: 26px;\">\"father\"<\/span>);}}<\/section>\n<section style=\"padding: 16px; overflow-x: auto; background: #272822; color: #dddddd; display: -webkit-box; font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; border-radius: 0px; font-size: 12px; margin-left: 0px; margin-right: 0px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">class<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">Son<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">extends<\/span><span style=\"font-weight: bold; color: white; line-height: 26px;\">Father<\/span><\/span>{<span style=\"line-height: 26px;\"><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">public<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">static<\/span><span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">void<\/span><span style=\"color: #a6e22e; font-weight: bold; line-height: 26px;\">main<\/span><span style=\"line-height: 26px;\">(String[]args)<\/span><\/span>{Sonson=<span style=\"color: #f92672; font-weight: bold; line-height: 26px;\">new<\/span>Son();}}<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u521b\u5efaSon\u5bf9\u8c61\u7684\u540c\u65f6\uff0c\u4f1a\u6267\u884cFather\u6784\u9020\u5668\u3002\u4e5f\u5c31\u4f1a\u6253\u5370\u51fa<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">father<\/code>\u8fd9\u53e5\u8bdd\u3002<\/section>\n<section style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; margin-left: 0px; margin-right: 0px;\">\u90a3\u4e48\u8fd9\u4e2a\u5faa\u73af\u64cd\u4f5c\u5c31\u662f\u6211\u4eec\u8981\u627e\u7684\u5faa\u73af\u64cd\u4f5c\u4e86\u3002<\/section>\n<h1 style=\"margin: 30px 0px 15px; font-weight: bold; font-size: 24px; line-height: 28px; border-bottom: 1px solid #2584b5;\" data-tool=\"mdnice\u7f16\u8f91\u5668\"><span style=\"padding: 2px 8px; background: #2584b5; color: white; counter-increment: counterh1 1;\">Part3<\/span><span style=\"margin-left: 8px; color: #2584b5; font-size: 20px;\">\u603b\u7ed3<\/span><\/h1>\n<ol class=\"list-paddingleft-1\" style=\"margin: 8px 0px; padding-left: 25px; width: 557.438px;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\">\u4f7f\u7528keySet\u904d\u5386\uff0c\u5176\u5b9e\u5185\u90e8\u662f\u4f7f\u7528\u4e86\u5bf9\u5e94\u7684<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">iterator()<\/code>\u65b9\u6cd5\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">iterator()<\/code>\u65b9\u6cd5\u662f\u521b\u5efa\u4e86\u4e00\u4e2a<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">KeyIterator<\/code>\u5bf9\u8c61\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">KeyIterator<\/code>\u5bf9\u8c61extend<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashIterator<\/code>\u5bf9\u8c61\u3002<\/p>\n<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px; margin-bottom: 5px; line-height: 26px; color: #010101;\">\n<p style=\"padding-top: 8px; padding-bottom: 8px; line-height: 26px; color: black;\"><code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">HashIterator<\/code>\u5bf9\u8c61\u7684\u6784\u9020\u65b9\u6cd5\u4e2d\uff0c\u4f1a\u904d\u5386\u627e\u5230\u7b2c\u4e00\u4e2a\u4e0d\u4e3a\u7a7a\u7684<code style=\"margin-right: 2px; margin-left: 2px; padding: 2px 4px; font-size: 14px; border-radius: 4px; color: #1e6bb8; background-color: rgba(27, 31, 35, 0.05); font-family: 'Operator Mono', Consolas, Monaco, Menlo, monospace; word-break: break-all;\">entry<\/code>\u3002<\/p>\n<\/section>\n<\/li>\n<\/ol>\n<blockquote style=\"margin-top: 20px; margin-bottom: 20px; padding: 10px 10px 10px 20px; color: #6a737d; font-size: 0.9em; overflow: auto; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border: 1px dashed #2584b5;\" data-tool=\"mdnice\u7f16\u8f91\u5668\">\n<section style=\"padding-top: 8px; padding-bottom: 8px; font-size: 16px; color: black; line-height: 26px; margin-left: 0px; margin-right: 0px;\">keySet-&gt;iterator()-&gt;KeyIterator-&gt;HashIterator<\/section>\n<\/blockquote>\n<blockquote class=\"js_blockquote_wrap\" style=\"color: var(--weui-fg-1); text-wrap: wrap; outline: 0px; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; letter-spacing: normal; text-align: left; background-color: #ffffff;\" data-type=\"2\" data-url=\"\" data-author-name=\"\" data-content-utf8-length=\"37\" data-source-title=\"\">\n<section class=\"js_blockquote_digest\" style=\"outline: 0px;\">\n<section style=\"outline: 0px; margin-left: 0px; margin-right: 0px;\"><span style=\"outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; color: #888888; cursor: pointer; font-size: 11px;\">\u6765\u6e90\uff1ajuejin.cn\/post\/7295353579002396726<\/span><\/section>\n<\/section>\n<\/blockquote>\n<section style=\"margin-bottom: 0px; text-wrap: wrap; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; color: #3e3e3e; font-size: 14px; font-weight: bold; orphans: 4; widows: 1; word-spacing: 2px; background-color: #ffffff; text-align: center; margin-left: 0px; margin-right: 0px;\"><span style=\"outline: 0px; font-size: 18px; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;\">\ud83d\udd25<\/span><span style=\"outline: 0px; font-size: 18px; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; color: #000000;\">\u78ca\u54e5\u79c1\u85cf\u7cbe\u54c1 \u70ed\u95e8\u63a8\u8350<\/span><span style=\"outline: 0px; font-size: 18px; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;\">\ud83d\udd25<\/span><\/section>\n<section style=\"margin-bottom: 0px; text-wrap: wrap; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; color: #3e3e3e; font-size: 14px; font-weight: bold; orphans: 4; widows: 1; word-spacing: 2px; background-color: #ffffff; text-align: center; margin-left: 0px; margin-right: 0px;\"><\/section>\n<section style=\"margin-bottom: 0px; outline: 0px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; text-wrap: wrap; letter-spacing: 0.578px; text-size-adjust: inherit; background-color: #ffffff; text-align: left; margin-left: 0px; margin-right: 0px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzI4NTM1NDgwNw==&amp;mid=2247543189&amp;idx=1&amp;sn=05447d95b3d8e7b0782103076c3277f6&amp;scene=21#wechat_redirect\" target=\"_blank\" rel=\"noopener\" data-linktype=\"2\" rel=\"nofollow\" ><span style=\"outline: 0px; color: #000000;\"><span style=\"outline: 0px; font-size: 15px;\">\u78ca\u54e5\u8054\u5408\u516c\u53f8\u5408\u4f19\u4eba\uff0c\u4e00\u7ebf\u5927\u5382\u5728\u804c\u67b6\u6784\u5e08\u8017\u65f69\u4e2a\u6708\u8054\u5408\u6253\u9020<\/span><span style=\"outline: 0px; font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; font-size: 15px;\">\u4e86<\/span><\/span><span style=\"outline: 0px; color: #0052ff; font-size: 15px; text-decoration: underline;\"><strong style=\"outline: 0px;\">\u300a<\/strong><strong style=\"outline: 0px;\">2024\u5e74Java\u9ad8\u7ea7\u67b6\u6784\u5e08\u8bfe\u7a0b\u300b<\/strong><\/span><span style=\"outline: 0px; color: #000000; font-size: 15px;\"><span style=\"outline: 0px; letter-spacing: 0.578px;\">\u672c\u8bfe\u7a0b\u5bf9\u6807\u5916\u97623\u4e07\u5de6\u53f3\u7684\u67b6\u6784\u57f9\u8bad\u8bfe\u7a0b\uff0c\u520610\u4e2a\u9636\u6bb5\uff0c\u76ee<\/span>\u524d\u5df2\u7ecf\u66f4\u65b0\u4e86<\/span><span style=\"outline: 0px; font-size: 15px; color: #ff2941;\"><strong style=\"outline: 0px;\">181G<\/strong><\/span><span style=\"outline: 0px; color: #000000; font-size: 15px;\">\u89c6\u9891\uff0c\u5df2\u7ecf\u66f4\u65b0<\/span><span style=\"outline: 0px; font-size: 15px; color: #ff2941;\"><strong style=\"outline: 0px;\">1000+<\/strong><\/span><span style=\"outline: 0px; color: #000000; font-size: 15px;\">\u4e2a\u5c0f\u65f6\u89c6\u9891\uff0c<\/span><span style=\"outline: 0px; font-size: 15px; color: #ff2941;\"><strong style=\"outline: 0px;\">\u4e00\u6b21\u8d2d\u4e70\uff0c\u6301\u7eed\u66f4\u65b0\uff0c\u65e0\u97002\u6b21\u4ed8\u8d39<\/strong><\/span><\/a><\/section>\n<section style=\"display: none; margin-left: 0px; margin-right: 0px;\"><\/section>\n<p style=\"display: none;\">\n<blockquote><p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7: \u67b6\u6784\u5e08\u6280\u672f\u6808<\/p><\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>Part1\u5f15\u8a00 HashMap\u76f8\u4fe1\u6240\u6709\u5b66Java\u7684\u90fd\u4e00\u5b9a\u4e0d\u4f1a\u611f\u5230\u964c\u751f\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u975e\u5e38\u91cd\u7528\u4e14\u975e\u5e38\u5b9e\u7528\u7684Java\u63d0\u4f9b\u7684\u5bb9\u5668\uff0c\u5b83\u5728\u6211\u4eec\u7684\u4ee3 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":5060,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-5065","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215216328-150x150.jpeg","content_first_image":null,"post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215216328-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215216328-1024x435.jpeg","post_frist_image":null,"post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215216328-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215216328-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215216328.jpeg","post_all_images":[],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Java","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":785,"next_post_id":4882,"next_post_title":"Java \u6d41\u5a92\u4f53\u670d\u52a1\u6846\u67b6 ZLM4J \u53d1\u5e03 1.0.8 \u7248\u672c","previous_post_id":4911,"previous_post_title":"\u542c\u8bf4\u8fc7 HashMap \u4f1a\u5bfc\u81f4CPU\u98d9\u5347100%\u5417\uff1f","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=5065"}],"version-history":[{"count":2,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5065\/revisions"}],"predecessor-version":[{"id":6424,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5065\/revisions\/6424"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/5060"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=5065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=5065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=5065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}