-
Notifications
You must be signed in to change notification settings - Fork 0
/
21079.html
394 lines (385 loc) · 23.8 KB
/
21079.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>集合 | 征蓬</title><meta name="keywords" content="Java"><meta name="author" content="huy"><meta name="copyright" content="huy"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="集合相关的概述和基础知识。">
<meta property="og:type" content="article">
<meta property="og:title" content="集合">
<meta property="og:url" content="http://example.com/21079.html">
<meta property="og:site_name" content="征蓬">
<meta property="og:description" content="集合相关的概述和基础知识。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/pics/scenery/08.png">
<meta property="article:published_time" content="2020-11-25T16:00:00.000Z">
<meta property="article:modified_time" content="2022-04-11T00:44:30.878Z">
<meta property="article:author" content="huy">
<meta property="article:tag" content="Java">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/pics/scenery/08.png"><link rel="shortcut icon" href="/pics/avatar/8.png"><link rel="canonical" href="http://example.com/21079"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/node-snackbar/0.1.16/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="/font/wcsf.ttf" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
date_suffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"bottom-left"},
source: {
jQuery: 'https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js',
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
},
fancybox: {
js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: '集合',
isPost: true,
isHome: false,
isHighlightShrink: false,
isToc: true,
postUpdate: '2022-04-11 08:44:30'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end start --><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-butterfly-tag-plugins-plus@latest/lib/tag_plugins.min.css" media="defer" onload="this.media='all'"><script async src="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/carousel-touch.js"></script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.1"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/pics/Asoul/8.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">54</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">17</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">12</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/pics/scenery/08.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">征蓬</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">集合</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2020-11-25T16:00:00.000Z" title="发表于 2020-11-26 00:00:00">2020-11-26</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-04-11T00:44:30.878Z" title="更新于 2022-04-11 08:44:30">2022-04-11</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Java/">Java</a></span></div><div class="meta-secondline"></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="集合(Collection)概述">集合(Collection)概述</h2>
<p><img src="https://raw.githubusercontent.com/LazyLutra/imgBed/main/Java-Collections%E6%A6%82%E8%BF%B0.png" alt="分类 ———— 沉默王二"></p>
<p><img src="https://raw.githubusercontent.com/LazyLutra/imgBed/main/Java%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6.png" alt="概述导图"></p>
<p>Java集合定义了两种基本的数据结构:</p>
<ol>
<li>Collection:表示一组对象的集合;</li>
<li>Map:使用kay-value存储,表示对象间的一系列映射或关联关系。</li>
</ol>
<h3 id="数组和集合的区别">数组和集合的区别</h3>
<ol>
<li>容纳元素的区别</li>
</ol>
<ul>
<li>数组:可以存储基本数据类型和引用数据类型</li>
<li>集合:只能存储引用数据类型(如果存储的是Int类型,会自动封装为Integer)</li>
</ul>
<ol start="2">
<li>长度的区别</li>
</ol>
<ul>
<li>数组:长度是固定的,需要提前声明</li>
<li>集合:长度可变</li>
</ul>
<h3 id="List,Set,Map三者的区别">List,Set,Map三者的区别</h3>
<ol>
<li><strong>List</strong>:有序的对象集合。<br>
列表中每个元素有特定的位置,可以使用下标操作元素;元素可以重复。</li>
<li><strong>Set</strong>:无序的对象集合。<br>
不可以使用下标操作元素;元素不可重复。</li>
<li><strong>Map</strong>:无序的对象集合。<br>
使用 key-value 形式存储对象,其中 key 无序且不可重复,value 无序可重复。</li>
</ol>
<h3 id="List">List</h3>
<table>
<thead>
<tr>
<th>类名</th>
<th>表示方式</th>
<th>首次出现版本</th>
<th>随机访问</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>ArrayList</td>
<td>数组</td>
<td>1.2</td>
<td>支持</td>
<td>最佳全能实现</td>
</tr>
<tr>
<td>LinkedList</td>
<td>双向链表</td>
<td>1.2</td>
<td>不支持</td>
<td>高效插入和删除</td>
</tr>
<tr>
<td>CopyOnWrite<br>ArrayList</td>
<td>数组</td>
<td>5.0</td>
<td>支持</td>
<td>线程安全;遍历快,修改慢</td>
</tr>
</tbody>
</table>
<h3 id="Set">Set</h3>
<table>
<thead>
<tr>
<th>类</th>
<th>内部表示</th>
<th>首次出现版本</th>
<th>元素顺序</th>
<th>成员限制</th>
<th>基本操作</th>
<th>迭代性能</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>HashSet</td>
<td>HashMap</td>
<td>1.2</td>
<td>无</td>
<td>无</td>
<td><i>O(1)</i></td>
<td><i>O(capacity)</i>(根据容量确定)</td>
<td>最佳通用实现</td>
</tr>
<tr>
<td>Linked<br>HashSet</td>
<td>Linked<br>HashMap</td>
<td>1.2</td>
<td>插入的顺序</td>
<td>无</td>
<td><i>O(1)</i></td>
<td><i>O(n)</i></td>
<td>保留插入的顺序</td>
</tr>
<tr>
<td>TreeSet</td>
<td>红黑树</td>
<td>1.2</td>
<td>升序排列</td>
<td>可比较</td>
<td><i>O(log(n))</i></td>
<td><i>O(n)</i></td>
<td>元素所属类型需实现 Comparable 或 Comparator 接口</td>
</tr>
</tbody>
</table>
<h3 id="Map">Map</h3>
<table>
<thead>
<tr>
<th>类</th>
<th>表示方式</th>
<th>首次出现版本</th>
<th>key 是否可以为空</th>
<th>value 是否可以为空</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>HashMap</td>
<td>HashMap</td>
<td>1.2</td>
<td>是</td>
<td>是</td>
<td>通用实现</td>
</tr>
<tr>
<td>Concurrent<br>HashMap</td>
<td>HashMap</td>
<td>5.2</td>
<td>否</td>
<td>否 </td>
<td>线程安全实现</td>
</tr>
<tr>
<td>ConcurrentSkip<br>ListMap</td>
<td>HashMap</td>
<td>6.2</td>
<td>否</td>
<td>否</td>
<td>专用的线程安全实现</td>
</tr>
<tr>
<td>EnumMap</td>
<td>数组</td>
<td>5.0</td>
<td>否</td>
<td>是</td>
<td>key是枚举类型</td>
</tr>
<tr>
<td>LinkedHashMap</td>
<td>HashMap加列表</td>
<td>1.4</td>
<td>是</td>
<td>是</td>
<td>保留插入或访问顺序</td>
</tr>
<tr>
<td>TreeMap</td>
<td>红黑树</td>
<td>1.2</td>
<td>否</td>
<td>是</td>
<td>按照key排序。操作耗时为<i>O(log(n))</i>。参见SortedMap接口。</td>
</tr>
<tr>
<td>WeakHashMap</td>
<td>HashMap</td>
<td>1.2</td>
<td>是</td>
<td>是</td>
<td>不会阻止垃圾回收key。</td>
</tr>
<tr>
<td>HashTable</td>
<td>HashMap</td>
<td>1.0</td>
<td>否</td>
<td>否</td>
<td>过时的类;同步的方法,不使用。</td>
</tr>
<tr>
<td>Properties</td>
<td>HashMap</td>
<td>1.0</td>
<td>否</td>
<td>否</td>
<td>使用 String 类的方法扩展 HashTable 接口。</td>
</tr>
<tr>
<td>Identity<br>HashMap</td>
<td>HashMap</td>
<td>1.4</td>
<td>是</td>
<td>是</td>
<td>比较时使用 == ,而不是用 equals()。</td>
</tr>
</tbody>
</table>
<h2 id="List-2">List</h2>
<h3 id="List集合总结">List集合总结</h3>
<p><strong>ArrayList</strong>:</p>
<ul>
<li>底层使用数组实现</li>
<li>初始化时,默认容量为10,每次扩容的时增加原有容量的一半</li>
<li>进行增删操作时,需要数组的拷贝复制(navite方法由C/C++实现)</li>
</ul>
<p><strong>LinkedList</strong>:</p>
<ul>
<li>底层实现使用双向链表(方便向前遍历)</li>
</ul>
<p><strong>Vector</strong>:</p>
<ul>
<li>底层使用数组实现,现在被ArrayList替代,原因如下:
<ul>
<li>所有方法都是同步的,<strong>性能有所损失</strong></li>
<li>初始容量为10,超过时以100%的比率增加,<strong>会比ArrayList消耗更多内存</strong></li>
</ul>
</li>
</ul>
<p>总的来说,<strong>查询多</strong>用 <code>ArrayList</code> ,<strong>增删多</strong>用 <code>LinkedList</code>。</p>
<p>ArrayList的增删慢是大多数情况,在下列极端情况时,增删速度要优于LinkedList:</p>
<ol>
<li>如果一直使用 <strong>add()</strong> 增加元素(每次都增加到末尾)</li>
<li>一直删除 <strong>末尾元素</strong> 时(不需要移动位置)</li>
<li>删除 <strong>中间位置的元素</strong> 时</li>
</ol>
<h3 id="ArrayList">ArrayList</h3>
<h4 id="Diagrams">Diagrams</h4>
<p><img src="https://raw.githubusercontent.com/LazyLutra/imgBed/main/arratListDiagrams.png" alt="Diagrams"></p>
<h2 id="参考-6">参考</h2>
<ul>
<li>[1] <a target="_blank" rel="noopener" href="https://javaguide.cn/java/collection/java%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86&%E9%9D%A2%E8%AF%95%E9%A2%98%E6%80%BB%E7%BB%93/">Java集合框架基础知识&面试题总结 —— JavaGuide</a></li>
</ul>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">huy</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://example.com/21079.html">http://example.com/21079.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外,均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://example.com" target="_blank">征蓬</a>!</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Java/">Java</a></div><div class="post_share"><div class="social-share" data-image="/pics/scenery/08.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://jsdelivr.pai233.top/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://jsdelivr.pai233.top/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/31868.html" title="反射"><img class="cover" src="/pics/scenery/17.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-01-28</div><div class="title">反射</div></div></a></div><div><a href="/28665.html" title="注解"><img class="cover" src="/pics/scenery/20.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-01-19</div><div class="title">注解</div></div></a></div><div><a href="/20128.html" title="基础"><img class="cover" src="/pics/scenery/09.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-10-19</div><div class="title">基础</div></div></a></div><div><a href="/4876.html" title="异常"><img class="cover" src="/pics/scenery/27.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-12-20</div><div class="title">异常</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%9B%86%E5%90%88%EF%BC%88Collection%EF%BC%89%E6%A6%82%E8%BF%B0"><span class="toc-number">1.</span> <span class="toc-text">集合(Collection)概述</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%95%B0%E7%BB%84%E5%92%8C%E9%9B%86%E5%90%88%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">1.1.</span> <span class="toc-text">数组和集合的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#List%EF%BC%8CSet%EF%BC%8CMap%E4%B8%89%E8%80%85%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">1.2.</span> <span class="toc-text">List,Set,Map三者的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#List"><span class="toc-number">1.3.</span> <span class="toc-text">List</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Set"><span class="toc-number">1.4.</span> <span class="toc-text">Set</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Map"><span class="toc-number">1.5.</span> <span class="toc-text">Map</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#List-2"><span class="toc-number">2.</span> <span class="toc-text">List</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#List%E9%9B%86%E5%90%88%E6%80%BB%E7%BB%93"><span class="toc-number">2.1.</span> <span class="toc-text">List集合总结</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ArrayList"><span class="toc-number">2.2.</span> <span class="toc-text">ArrayList</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#Diagrams"><span class="toc-number">2.2.1.</span> <span class="toc-text">Diagrams</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%82%E8%80%83-6"><span class="toc-number">3.</span> <span class="toc-text">参考</span></a></li></ol></div></div></div></div></main><footer id="footer" style="background-image: url('/pics/scenery/08.png')"><div id="footer-wrap"><div class="copyright">©2021 - 2022 By huy</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/node-snackbar/0.1.16/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"></div><script defer="defer" id="ribbon" src="https://jsdelivr.pai233.top/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script id="click-heart" src="https://jsdelivr.pai233.top/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="false"></script></div><!-- hexo injector body_end start --><script async src="//at.alicdn.com/t/font_2032782_8d5kxvn09md.js"></script><!-- hexo injector body_end end --></body></html>