当前位置:网站首页>Iterable、Collection、List 的常见方法签名以及含义
Iterable、Collection、List 的常见方法签名以及含义
2022-07-06 09:19:00 【犇犇犇犇犇犇】
今天整理一下,我们Java集合中的的老大哥Collection接口以及它的父接口Iterable,子接口List。
Iterable是什么?
可以说是站在集合框架最顶端的接口,实现集合的遍历。
Collection是什么?
它是层次结构中的根接口继承于Iterable,是父接口不用于具体的实现,它里面定义了下面具体实现接口类的一些公共规范。
List
list是有序集合又叫序列,继承了Collection接口,它也是一个接口,并不能用来实例化对象,所以他的下面实现了ArrayList,LinkedList,Stack多种类
List官方文档
ArrayList
ArrayList实现了List,是顺序表,是数据结构中最简单的一种结构,是一组相同数据类型的集合也就是数组,他在逻辑结构和物理结构都是连续的。
LinkedList
LinkedList实现了List,是链表,Java中的LinkedList实现了双向链表,队列,双端队列,这些都是线性结构,他们虽然逻辑结构是连续的但是在物理结构上并不连续
Stack
Stack实现了vector,vector实现了List,所以Stack也实现了List,它是栈,数据结构中的栈,也是线性结构他和队列一样都是一种特殊的链表。
关系图
边栏推荐
- [algorithm] sword finger offer2 golang interview question 2: binary addition
- How to reduce the shutdown time of InnoDB database?
- [untitled]
- [algorithm] sword finger offer2 golang interview question 10: subarray with sum K
- Wechat applet development experience
- XV Function definition and call
- MySQL shutdown is slow
- [algorithm] sword finger offer2 golang interview question 8: the shortest subarray with a sum greater than or equal to K
- Exception: ioexception:stream closed
- Record: I accidentally wrote a recursion next time
猜你喜欢

【无标题】

Fgui project packaging and Publishing & importing unity & the way to display the UI

341. Flatten nested list iterator

Code example of MATLAB reading GNSS observation value o file

第一人称视角的角色移动

Experience summary of autumn recruitment of state-owned enterprises

面试必备:聊聊分布式锁的多种实现!
![[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等](/img/11/ee0628a68542236fc641966579a31a.png)
[算法] 剑指offer2 golang 面试题12:左右两边子数组的和相等
![[算法] 剑指offer2 golang 面试题4:只出现一次的数字](/img/f7/23ffc81ec8e9161c15d863c1a67916.png)
[算法] 剑指offer2 golang 面试题4:只出现一次的数字

FairyGUI增益BUFF數值改變的顯示
随机推荐
一文搞定 UDP 和 TCP 高频面试题!
Wechat applet development experience
[algorithm] sword finger offer2 golang interview question 3: the number of 1 in the binary form of the first n numbers
记录:newInstance()过时的代替方法
Chromatic judgement bipartite graph
基于rtklib源码进行片上移植的思路分享
几道高频的JVM面试题
[algorithm] sword finger offer2 golang interview question 10: subarray with sum K
Compile GDAL source code with nmake (win10, vs2022)
Record: newinstance() obsolete replacement method
Detailed explanation of balanced binary tree is easy to understand
错误:排序与角标越界
How do architects draw system architecture blueprints?
服务未正常关闭导致端口被占用
【RTKLIB 2.4.3 b34 】版本更新简介一
音乐播放(Toggle && PlayerPrefs)
Pride-pppar source code analysis
GPS高程拟合抗差中误差的求取代码实现
记录:Navicat Premium初次无法连接数据库MySQL之解决
KF UD分解之UD分解基础篇【1】