{"id":1651,"date":"2021-10-15T20:56:46","date_gmt":"2021-10-15T12:56:46","guid":{"rendered":"https:\/\/www.xinot.icu\/?p=1651"},"modified":"2022-08-25T13:59:46","modified_gmt":"2022-08-25T05:59:46","slug":"%e6%97%a7%e6%97%b6%e7%ac%94%e8%ae%b0-%e9%9b%86%e5%90%88","status":"publish","type":"post","link":"https:\/\/www.xinot.icu\/?p=1651","title":{"rendered":"\u65e7\u65f6\u7b14\u8bb0-\u96c6\u5408"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1651\" class=\"elementor elementor-1651\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5159986 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5159986\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-75d72a9\" data-id=\"75d72a9\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2dfa075 elementor-widget elementor-widget-heading\" data-id=\"2dfa075\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\u65e7\u65f6\u7b14\u8bb0-\u96c6\u5408<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c5fa432 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c5fa432\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-321ea71\" data-id=\"321ea71\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6663224 elementor-widget elementor-widget-heading\" data-id=\"6663224\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">\u524d\u8a00\n<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5937a57 elementor-widget-divider--view-line elementor-widget elementor-widget-global elementor-global-1396 elementor-widget-divider\" data-id=\"5937a57\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;,&quot;_animation_delay&quot;:1000}\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-71338bf elementor-widget elementor-widget-text-editor\" data-id=\"71338bf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u8be5\u6587\u7ae0\u662f\u7ad9\u4e3b\u524d\u671f\u5b66\u4e60\u7b14\u8bb0\uff0c\u642c\u8fd0\u4e8e\u6b64\u65b9\u4fbf\u67e5\u8be2\u3002<\/p><p>\u6682\u6ca1\u6709\u4f5c\u683c\u5f0f\u5904\u7406\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3afe940 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3afe940\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a66a313\" data-id=\"a66a313\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4b785fa elementor-widget elementor-widget-heading\" data-id=\"4b785fa\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">\u6b63\u6587<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c118025 elementor-widget-divider--view-line elementor-widget elementor-widget-global elementor-global-1396 elementor-widget-divider\" data-id=\"c118025\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;,&quot;_animation_delay&quot;:1000}\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-17038c2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"17038c2\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-266df31\" data-id=\"266df31\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a00e0d2 elementor-widget elementor-widget-heading\" data-id=\"a00e0d2\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">\u6b63\u6587<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3f5e955 elementor-widget-divider--view-line elementor-widget elementor-widget-global elementor-global-1396 elementor-widget-divider\" data-id=\"3f5e955\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;,&quot;_animation_delay&quot;:1000}\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-729bbbe elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"729bbbe\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9477400\" data-id=\"9477400\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f48e80e elementor-widget elementor-widget-heading\" data-id=\"f48e80e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">\u6b63\u6587\n<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7f2efca elementor-widget-divider--view-line elementor-widget elementor-widget-global elementor-global-1396 elementor-widget-divider\" data-id=\"7f2efca\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;,&quot;_animation_delay&quot;:1000}\" data-widget_type=\"divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bb09673 elementor-widget elementor-widget-text-editor\" data-id=\"bb09673\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>\u96c6\u5408\u76f8\u5f53\u4e8e\u4e00\u4e2a\u5bb9\u5668\uff0c\u7528\u4e8e\u50a8\u5b58JAVA\u5bf9\u8c61\u7684\u5185\u5b58\u5730\u5740\uff08\u5f15\u7528\uff09\uff0c\u5728\u5f00\u53d1\u4e2d\u4f7f\u7528\u8f83\u591a<\/li><li>JAVA\u6709\u4e09\u79cd\u4e3b\u8981\u7684\u96c6\u5408\u7c7b\u578b\uff1aList\u3001Set\u3001Map\uff0c\u90fd\u662f\u63a5\u53e3\uff0c\u524d\u4e24\u4e2a\u7ee7\u627f\u81f3Collection\u63a5\u53e3\uff08\u4e00\u4e2a\u4e00\u4e2a\u5b58\uff09\uff0cMap\u4e3a\u72ec\u7acb\u7684\u9876\u7ea7\u63a5\u53e3\uff08\u4e00\u5bf9\u4e00\u5bf9\u5b58\uff09<\/li><li>List\uff1a\u6709\u5e8f\u7684\u96c6\u5408\uff0c\u53ef\u4ee5\u653e\u91cd\u590d\u7684\u6570\u636e<\/li><li>Set\uff1a\u65e0\u5e8f\u7684\u96c6\u5408\uff0c\u4e0d\u80fd\u653e\u91cd\u590d\u7684\u6570\u636e<\/li><li>Map\uff1a\u65e0\u5e8f\u7684\u96c6\u5408\uff0c\u96c6\u5408\u4e2d\u5305\u62ec\u4e00\u4e2a\u4e0d\u53ef\u91cd\u590d\u7684\u952e\u5bf9\u8c61\uff0c\u4e00\u4e2a\u53ef\u91cd\u590d\u7684\u503c\u5bf9\u8c61\u3002\uff08\u8eab\u4efd\u8bc1\u53f7-\u59d3\u540d\uff09<\/li><\/ul><p>\uff08List\u548cSet\u7684\u7ee7\u627f\u5173\u7cfb\uff09<\/p><p>\uff08Map\u7684\u7ee7\u627f\u5173\u7cfb\uff09<\/p><p>Collection<\/p><p>\u90e8\u5206\u65b9\u6cd5\uff1a<\/p><p>add\uff0c\u6dfb\u52a0\u5143\u7d20<\/p><p>clear\uff0c\u6e05\u7a7a\u96c6\u5408<\/p><p>isEmpty\uff0c\u5224\u65ad\u96c6\u5408\u4e2d\u662f\u5426\u6709\u5143\u7d20<\/p><p>size\uff0c\u83b7\u53d6\u96c6\u5408\u4e2d\u5143\u7d20\u4e2a\u6570<\/p><p>toArray\uff0c\u5c06\u96c6\u5408\u8f6c\u6362\u4e3a\u6570\u7ec4<\/p><p>iterator\uff0c\u83b7\u53d6\u96c6\u5408\u4e2d\u4f9d\u8d56\u7684\u8fed\u4ee3\u5668\u5bf9\u8c61<\/p><p>contains\uff0c\u5224\u65ad\u96c6\u5408\u4e2d\u662f\u5426\u5305\u542b\u67d0\u4e2a\u5143\u7d20<\/p><p>remove\uff0c\u5220\u9664\u96c6\u5408\u4e2d\u67d0\u4e2a\u5143\u7d20<\/p><p>iterator\uff0c\u83b7\u53d6\u8be5\u96c6\u5408\u7684\u8fed\u4ee3\u5668\u5bf9\u8c61<\/p><p>\u00a0<\/p><p>\u6ce8\u610f\uff1a\u6709\u53e6\u4e00\u4e2a\u5de5\u5177\u7c7b-Collectiongs\uff0c\u91cc\u9762\u6709\u4e00\u4e2a\u65b9\u6cd5\uff08synchronized\uff09\u53ef\u4ee5\u5c06\u975e\u7ebf\u7a0b\u5b89\u5168\u7684\u96c6\u5408\u8f6c\u6362\u4e3a\u7ebf\u7a0b\u5b89\u5168\u7684\u96c6\u5408\u3002<\/p><p>\u00a0<\/p><p>\uff08\u8fed\u4ee3\u5668\u539f\u7406\uff09<\/p><p>\u90e8\u5206\u5e38\u7528\u65b9\u6cd5\uff1a<\/p><p>hasNext<\/p><p>next\uff0c\u53d6\u51fa\u5143\u7d20\uff0c\u901a\u8fc7\u8fed\u4ee3\u5668\u53d6\u51fa\u7684\u5143\u7d20\u4e00\u5b9a\u662fObject\u7c7b\uff0c\u4e0d\u4f7f\u7528\u6cdb\u578b\u662f\uff0c\u6709\u65f6\u5019\u9700\u8981\u5f3a\u5236\u5411\u4e0b\u8f6c\u578b\u4ee5\u4f7f\u7528\u8fed\u4ee3\u51fa\u6765\u7684\u5143\u7d20\u7684\u65b9\u6cd5\u3002<\/p><p>\u6ce8\u610f\uff1a\u96c6\u5408\u7ed3\u6784\u4e00\u65e6\u53d1\u751f\u6539\u53d8\uff0c\u8fed\u4ee3\u5668\u5fc5\u987b\u91cd\u65b0\u83b7\u53d6<\/p><p>\u00a0<\/p><p>\u00a0<\/p><p>ArrayList<\/p><ul><li>\u6784\u9020\u65b9\u6cd5\u9ed8\u8ba4\u6784\u9020\u5bb9\u91cf\u4e3a10\u7684ArrayList\u96c6\u5408\uff0c\u53ef\u81ea\u5df1\u8f93\u5165\u53c2\u6570\u4ee5\u786e\u5b9a\u96c6\u5408\u7684\u5bb9\u91cf\u3002\u751a\u81f3\u53ef\u4ee5\u76f4\u63a5\u5199\u5165\u96c6\u5408\u3002<\/li><li>\u96c6\u5408\u7684\u6269\u5bb9\uff1a\u6269\u5bb9\u81f3\u5f53\u524d\u76845\u500d<\/li><li>\u6709\u70b9\uff1a\u68c0\u7d22\u6548\u7387\u9ad8\uff0c\u6bcf\u4e2a\u5143\u7d20\u90fd\u6709\u72ec\u6709\u7684\u4e0b\u6807\uff0c\u5411\u96c6\u5408\u672b\u5c3e\u6dfb\u52a0\u5143\u7d20\u6548\u7387\u4e5f\u6bd4\u8f83\u9ad8<\/li><li>\u7f3a\u70b9\uff1a\u968f\u673a\u589e\u5220\u5143\u7d20\u7684\u6548\u7387\u8fd8\u662f\u8f83\u4f4e\uff0c\u6b64\u5916\u6570\u7ec4\u7684\u50a8\u5b58\u65b9\u5f0f\u65e0\u6cd5\u50a8\u5b58\u5927\u6570\u636e\u91cf\u3002<\/li><\/ul><p>\u00a0<\/p><p>\u00a0<\/p><p>Map<\/p><ul><li>Map\u4e0eCollection\u4e4b\u95f4\u6ca1\u6709\u7ee7\u627f\u5173\u7cfb<\/li><li>Map\u96c6\u5408\u4ee5key\u548cvalue\u7684\u65b9\u5f0f\u50a8\u5b58\u6570\u636e\uff08\u952e\u503c\u5bf9\uff09\uff0c\u4e8c\u8005\u90fd\u662f\u5f15\u7528\u6570\u636e\u7c7b\u578b\u3002\u5176\u4e2dkey\u8d77\u4e3b\u5bfc\u4f5c\u7528\uff0cvalue\u662f\u9644\u5c5e\u54c1\u3002<\/li><li>\u5e38\u7528\u65b9\u6cd5\uff1a<\/li><\/ul><p>put\uff0c\u6dfb\u52a0\u5143\u7d20<\/p><p>get\uff0c\u901a\u8fc7key\u83b7\u53d6value<\/p><p>clear\uff0c\u6e05\u7a7aMap\u96c6\u5408<\/p><p>containsKey\uff0c\u5224\u65ad\u96c6\u5408\u4e2d\u662f\u5426\u5305\u542b\u67d0\u4e2akey<\/p><p>containsValue\uff0c\u5224\u65ad\u96c6\u5408\u4e2d\u662f\u5426\u5305\u542b\u67d0\u4e2avalue<\/p><p>size\uff0c\u83b7\u53d6\u8be5\u96c6\u5408\u7684\u957f\u5ea6<\/p><p>remove\uff0c\u901a\u8fc7key\u5220\u9664\u5143\u7d20<\/p><p>keySet\uff0c\u83b7\u53d6Map\u96c6\u5408\u4e2d\u6240\u6709\u7684key\uff08\u4ee5set\u96c6\u5408\u7684\u5f62\u5f0f\u83b7\u53d6\uff09<\/p><p>entrySet\uff0c\u5c06Map\u96c6\u5408\u8f6c\u6362\u4e3aSet\u96c6\u5408\uff0c\u8be5Set\u96c6\u5408\u4e2d\u7684\u7c7b\u578b\u4e3a\uff1aMap.Entry<\/p><ul><li>\u91cd\u70b9\uff1aHashMap\u96c6\u5408\u521d\u59cb\u5316\u5bb9\u91cf\u5fc5\u987b\u662f2\u6b21\u5e42\uff0c\u5426\u5219\u6027\u80fd\u5927\u6253\u6298\u6263\u3002<\/li><li>\u653e\u5728HashMap\u4e2d\u7684key\u5143\u7d20\u4ee5\u53ca\u653e\u5728HashSet\u96c6\u5408\u4e2d\u7684\u5143\u7d20\uff0c\u90fd\u9700\u8981\u91cd\u5199hashCode()\u65b9\u6cd5\u4ee5\u53caequals()\u65b9\u6cd5\u3002<\/li><li>\u5728jdk8\u4e4b\u540e\uff0cHashMap\u4e2d\u7684\u5355\u5411\u94fe\u8868\u6570\u636e\u7ed3\u6784\u82e5\u8d85\u8fc7\u516b\u4e2a\uff0c\u5219\u4f1a\u5c06\u5355\u5411\u94fe\u8868\u53d8\u4e3a\u7ea2\u9ed1\u6811\uff0c\u82e5\u7ea2\u9ed1\u6811\u4e0a\u7684\u8282\u70b9\u6570\u91cf\u5c0f\u4e8e6\u65f6\uff0c\u4f1a\u91cd\u65b0\u5427\u7ea2\u9ed1\u6811\u53d8\u6210\u5355\u9879\u94fe\u8868\u6570\u636e\u7ed3\u6784<\/li><li>HashMap\u96c6\u5408\u7684key\u4e0evalue\u53ef\u4ee5\u4e3anull\uff0c\u4f46\u662fHashtable\u4e0d\u53ef\u4ee5\u3002<\/li><\/ul><p>\u00a0<\/p><p>\u00a0<\/p><p>Tree<\/p><ul><li>TreeSet\u96c6\u5408\u4e0eTreeMap\u96c6\u5408\u5e95\u5c42\u90fd\u662f\u4e8c\u53c9\u6811\u3002<\/li><li>TreeSet\u96c6\u5408\u4e2d\u7684\u5143\u7d20\u76f8\u5f53\u4e8eTreeMap\u96c6\u5408\u4e2d\u7684key\u90e8\u5206\u3002<\/li><li>Tree\u96c6\u5408\u4e2d\u7684\u5143\u7d20\u53ef\u4ee5\u6839\u636e\u5143\u7d20\u7684\u5927\u5c0f\u81ea\u52a8\u6392\u5e8f\u3002\u524d\u63d0\u662f\u5143\u7d20\u5df2\u7ecf\u5b9e\u73b0\u4e86lang.Comparable\u63a5\u53e3\u6216\u4f7f\u7528Java.util.Comparator\u63a5\u53e3\u3002<\/li><li>\u7531\u4e8eTree\u96c6\u5408\u4e2d\u6709\u6bd4\u8f83\u7684\u65b9\u6cd5\uff0c\u6240\u4ee5\u4e00\u822c\u6765\u8bf4\u5143\u7d20\u4e0d\u7528\u91cd\u5199equals\u65b9\u6cd5\u3002<\/li><li>\u82e5\u5b58\u653e\u7684\u662f\u81ea\u5b9a\u4e49\u65b9\u6cd5\uff0c\u5219\u7a0b\u5e8f\u5458\u5fc5\u987b\u8981\u8ba9\u8be5\u81ea\u5b9a\u4e49\u7c7b\u5b9e\u73b0Compareable\u63a5\u53e3\u5e76\u91cd\u5199compareTo\u65b9\u6cd5\u3002<\/li><li>\u82e5\u6bd4\u8f83\u89c4\u5219\u6709\u591a\u4e2a\uff0c\u5e76\u4e14\u9700\u8981\u9891\u7e41\u5207\u6362\u6bd4\u8f83\u89c4\u5219\uff0c\u5efa\u8bae\u4f7f\u7528Comparator\u63a5\u53e3\u3002\uff08\u4f7f\u7528\u6bd4\u8f83\u5668\uff09<\/li><li>\u82e5\u6bd4\u8f83\u89c4\u5219\u4e0d\u4f1a\u53d1\u751f\u6539\u53d8\u7684\u6216\u53ea\u6709\u4e00\u4e2a\u6bd4\u8f83\u89c4\u5219\u7684\u65f6\u5019\uff0c\u5efa\u8bae\u4f7f\u7528Comparable\u63a5\u53e3\u3002\uff08\u8ba9\u8be5\u7c7b\u53ef\u4ee5\u6bd4\u8f83\uff09<\/li><\/ul><p>\u00a0<\/p><p>\u00a0<\/p><p>Java.lang.Comparable<\/p><ul><li>\u8fd9\u4e2a\u63a5\u53e3\u4e2d\u8981\u91cd\u5199compareTo(Object o)\u8fd9\u4e2a\u65b9\u6cd5\u3002<\/li><li>\u8fd9\u4e2a\u65b9\u6cd5\u8981\u8fd4\u56deint\u7c7b\u578b\u7684\u6570\u636e\u3002<\/li><li>\u6839\u636e\u8fd4\u56de\u7684\u6570\u5b57\u7684\u6b63\u8d1f\u8fd8\u662f0\u503c\uff0c\u8fdb\u884c\u6392\u5e8f\u3002<\/li><\/ul><p>\u8d1f\u503c\uff1a\u5927\u4e8e\u88ab\u6bd4\u8f83\u7684\u6570\u636e<\/p><p>\u6b63\u503c\uff1a\u5c0f\u4e8e\u88ab\u6bd4\u8f83\u7684\u6570\u636e<\/p><p>0 \uff1a\u7b49\u4e8e\u88ab\u6bd4\u8f83\u7684\u6570\u636e\uff0c\u8868\u793a\u76f8\u540c\uff0cValue<\/p><p>\u00a0<\/p><p>\u00a0<\/p><p>Tree\u5b50\u5e73\u8861\u4e8c\u53c9\u6811<\/p><ul><li>TreeSet\u4e0eTreeMap\u5e95\u5c42\u7684\u6570\u636e\u7ed3\u6784\u662f\u5b50\u5e73\u8861\u4e8c\u53c9\u6811\u3002<\/li><li>\u904d\u5386\u4e8c\u53c9\u6811\u65f6\u6709\u4e09\u79cd\u65b9\u5f0f\uff1a<\/li><\/ul><p>\u6839\u5de6\u53f3\uff08\u524d\u5e8f\u904d\u5386\uff09\u3001\u5de6\u6839\u53f3\uff08\u4e2d\u5e8f\u904d\u5386\uff09\u3001\u5de6\u53f3\u6839\uff08\u540e\u5e8f\u904d\u5386\uff09<\/p><ul><li>\u5728TreeSet\u4e0eTreeMap\u96c6\u5408\u4e2d\u91c7\u7528\u7684\u662f\u201c\u5de6\u6839\u53f3\u201d\u7684\u904d\u5386\u65b9\u5f0f\u3002<\/li><\/ul><p>\u00a0<\/p><p>\u00a0<\/p><p>Hash\u8868\u6570\u636e\u7ed3\u6784<\/p><ul><li>\u54c8\u5e0c\u8868\u662f\u6570\u7ec4\u4e0e\u5355\u9879\u94fe\u8868\u7684\u7ed3\u5408\u4f53\uff0c\u8bd5\u7528\u6070\u5f53\u65f6\u80fd\u53d1\u6325\u4e24\u8005\u7684\u4f18\u70b9\u3002<\/li><li>\u54c8\u5e0c\u8868\u5e95\u5c42\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u4e00\u7ef4\u6570\u7ec4\uff0c\u8fd9\u4e2a\u6570\u7ec4\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20\u662f\u4e00\u4e2a\u5355\u9879\u94fe\u8868\u3002\uff08\u732a\u732a\u8fde\uff09<\/li><li>\u54c8\u5e0c\u8868\u4e2d\u7684\u5143\u7d20\u90fd\u6709\u4e00\u4e2a\u54c8\u5e0c\u503c\uff0c\u8fd9\u4e2a\u503c\u7531\u54c8\u5e0c\u51fd\u6570\u5f97\u5230\u3002hashCode()\uff1b<\/li><li>\u4e3b\u8981\u638c\u63e1\uff0c\u5728\u54c8\u5e0c\u8868\u4e2d\u5982\u4f55\u6dfb\u52a0\u4e0e\u5220\u9664\u5143\u7d20<\/li><li>\u54c8\u5e0c\u8868\u4e2d\u6240\u6709\u7684\u5143\u7d20\u90fd\u9700\u8981\u91cd\u5199hashCoed() + equals()\u65b9\u6cd5\u3002<\/li><li>\u800c\u8ba9\u54c8\u5e0c\u8868\u53d1\u6325\u6027\u80fd\uff0c\u8d77\u51b3\u5b9a\u4f5c\u7528\u7684\u662fhashCoed()\u65b9\u6cd5\u7684\u91cd\u5199\u3002<\/li><li>HashMap\u96c6\u5408\u521d\u59cb\u5316\u5bb9\u91cf\u9ed8\u8ba4\u662f16\uff0c\u5f53\u50a8\u5b58\u7684\u5143\u7d20\u8fbe\u523075%\u7684\u65f6\u5019\uff0c\u6570\u7ec4\u5f00\u59cb\u6269\u5bb9\u3002<\/li><\/ul><p>\u00a0<\/p><p>\u00a0<\/p><p>Collectiongs\u5de5\u5177\u7c7b<\/p><ul><li>\u533a\u522b\u4e8eCollectiong\uff0cCollection\u662f\u96c6\u5408\u63a5\u53e3\uff0cCollections\u662f\u96c6\u5408\u5de5\u5177\u7c7b\uff0c\u5728util\u5305\u4e0b\u3002<\/li><li>\u662f\u4e00\u4e9b\u9488\u5bf9\u96c6\u5408\u7684\u65b9\u6cd5\uff0c\u65b9\u4fbf\u5bf9\u96c6\u5408\u7684\u76f4\u63a5\u64cd\u4f5c\u3002<\/li><li>\u4e3b\u8981\u65b9\u6cd5\uff1a<\/li><\/ul><p>synchronized\uff0c\u4f7f\u4e00\u4e2a\u96c6\u5408\u8f6c\u6362\u4e3a\u7ebf\u7a0b\u5b89\u5168\u7684\u96c6\u5408\u3002<\/p><p>sort\uff0c\u5bf9\u4e00\u4e2a\u96c6\u5408\u8fdb\u884c\u6392\u5e8f\uff0c\u524d\u63d0\u662f\u8be5\u96c6\u5408\u5df2\u7ecf\u5b9e\u73b0\u4e86Comparable\u63a5\u53e3\u3002<\/p><p>\u00a0<\/p><p>\u00a0<\/p><p>\u6cdb\u578b\uff08JDK5.0\uff09<\/p><ul><li>\u6cdb\u578b\u53ea\u5728\u7f16\u8bd1\u9636\u6bb5\u8d77\u4f5c\u7528\uff0c\u4e5f\u5c31\u662f\u7ed9\u7a0b\u5e8f\u5458\u770b\u7684\uff0c\u8fd0\u884c\u9636\u6bb5\u6ca1\u7528\u3002<\/li><li>\u6cdb\u578b\u7684\u597d\u5904\uff1a<\/li><\/ul><p>\u96c6\u5408\u4e2d\u5b58\u50a8\u7684\u5143\u7d20\u7edf\u4e00\u4e86\u3002<\/p><p>\u4ece\u96c6\u5408\u4e2d\u8fed\u4ee3\u51fa\u7684\u5143\u7d20\u662f\u6cdb\u578b\u6307\u5b9a\u7684\u7c7b\u578b\uff0c\u4e0d\u9700\u8981\u5927\u91cf\u7684\u5411\u4e0b\u8f6c\u578b\u3002<\/p><ul><li>\u6cdb\u578b\u7684\u7f3a\u70b9\uff1a<\/li><\/ul><p>\u00a0\u00a0\u00a0 \u5b58\u5165\u96c6\u5408\u7684\u5143\u7d20\u53d8\u5f97\u5355\u4e00\uff0c\u65e0\u591a\u6837\u6027\u3002<\/p><ul><li>\u6cdb\u578b\u9700\u8981\u5728\u521b\u5efa\u96c6\u5408\u5bf9\u8c61\u65f6\u58f0\u660e\u4ee5\u53ca\u83b7\u53d6\u8fed\u4ee3\u5668\u65f6\u58f0\u660e\uff0c\u8fed\u4ee3\u5668\u58f0\u660e\u540e\uff0c\u4ee3\u51fa\u6765\u7684\u6570\u636e\u4fbf\u662f\u58f0\u660e\u7684\u7c7b\u578b\uff0c\u4e0d\u518d\u662f\u9ed8\u8ba4\u7684object\u7c7b\u578b\u3002<\/li><li>0\u4e4b\u540e\u52a0\u5165\u4e86\u6cdb\u578b\u7684\uff0c\u81ea\u52a8\u7c7b\u578b\u63a8\u65ad\u673a\u5236\u3002\u5373\u5728new\u6cdb\u578b\u5bf9\u8c61\u65f6\uff0c\u7b49\u53f7\u5de6\u8fb9\u7684\u7c7b\u540d\u4e0d\u9700\u8981\u91cd\u590d\u5199\u6cdb\u578b\u6307\u5b9a\u7684\u7c7b\u578b\uff0c\u53ea\u5199&lt;&gt;\u5373\u53ef\u3002\uff08\u79f0\u4e3a\u94bb\u77f3\u8868\u8fbe\u5f0f\uff09<\/li><\/ul><p>\u53ef\u81ea\u5b9a\u4e49\u6cdb\u578b\uff0c\u4e00\u822c\u4f7f\u7528&lt;E&gt;\u6216&lt;T&gt;\u6765\u8868\u8fbe\u6cdb\u578b\u7684\u6807\u8bc6\u7b26\uff08element\u4e0etype\u9996\u5b57\u6bcd\uff09\uff0c\u5728\u81ea\u5b9a\u4e49\u7c7b\u540d\u524d\u58f0\u660e\u5373\u53ef\u3002<\/p><p>\u00a0<\/p><p>\u00a0<\/p><p>\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u65e7\u65f6\u7b14\u8bb0-\u96c6\u5408 \u524d\u8a00 \u8be5\u6587\u7ae0\u662f\u7ad9\u4e3b\u524d\u671f\u5b66\u4e60\u7b14\u8bb0\uff0c\u642c\u8fd0\u4e8e\u6b64\u65b9\u4fbf\u67e5\u8be2\u3002 \u6682\u6ca1\u6709\u4f5c\u683c\u5f0f\u5904\u7406\u3002 \u6b63\u6587 \u6b63\u6587 \u6b63\u6587 \u96c6\u5408 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.xinot.icu\/?p=1651\"> <span class=\"screen-reader-text\">\u65e7\u65f6\u7b14\u8bb0-\u96c6\u5408<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1653,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-1651","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-24"],"_links":{"self":[{"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/posts\/1651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1651"}],"version-history":[{"count":7,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/posts\/1651\/revisions"}],"predecessor-version":[{"id":1662,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/posts\/1651\/revisions\/1662"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=\/wp\/v2\/media\/1653"}],"wp:attachment":[{"href":"https:\/\/www.xinot.icu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xinot.icu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}