当前位置:网站首页>2.Collection interface
2.Collection interface
2022-08-09 09:33:00 【come here my bear】
Java Collection Interface
Collection System Collection
graph TD;Interface.Collection-->Interface.ListInterface.Collection-->Interface.SetInterface.List-->Class.ArrayListInterface.List-->Class.LinkedListInterface.List-->Class.VectorInterface.Set-->Class.HashSetInterface.Set-->Interface.SortedSetInterface.SortedSet-->Class.TreeSet
Interface (interface), Class (implementation class)
The root interface of the architecture, representing a set of objects, called a "collection"(Interface.Collection)
Characteristics of the List interface: ordered, subscripted, and repeatable elements
Characteristics of the Set interface: unordered, no subscripts, and elements cannot be repeated
Collection parent interface
Features: Represents a set of objects of any type, unordered, unsubscripted, and cannot be repeated
Method:
- boolean add(Object obj) add an object
- boolean addAll(Collection c) adds all objects in a collection to this collection
- void clear() clears all objects in this collection
- boolean contains(Object o) Check if this collection contains o object
- boolean equals(Object o) Compares this collection for equality with the specified object
- boolean isEmpty() Check if this collection is empty
- boolean remove(Object o) removes the o object from this collection
- int size() returns the number of elements in this collection
- Object[] toArray() converts this collection to an array
- iterator() returns an iterator over the elements of this collection
- hasNext() determines whether there is the next element and returns a boolean value
- next() gets the next element
- remove() removes the current element
- Cannot use the collecton method at the same time ConcurrentModificationException concurrent modification exception
边栏推荐
- 软件测试外包公司怎么样?有什么好处和坏处?为什么没人去?
- 1. The concept of flow
- 常用功能测试的检查点与用例设计思路
- 游戏测试的概念是什么?测试方法和流程有哪些?
- The div simulates the textarea text box, the height of the input text is adaptive, and the word count and limit are implemented
- “摄像头用不了”+win8.1+DELL+外置摄像头+USB免驱的解决办法
- 本体开发日记05-努力理解SWRL(下)
- 软件测试个人求职简历该怎么写,模板在这里
- What does the test plan include?What is the purpose and meaning?
- 命令行查询数据库
猜你喜欢
A Practical Guide to Building OWL Ontologies using Protege4 and CO-ODE Tools - Version 1.3 (7.4 Annotation Properties - Annotation Properties)
功能自动化测试实施的原则以及方法有哪些?
第三方免费开放API 获取用户IP 并查询其地理位置
命令行查询数据库
Anti App so层对抗分析
软件测试面试思路技巧和方法分享,学到就是赚到
[Personal study summary] CRC verification principle and implementation
使用Protege4和CO-ODE工具构建OWL本体的实用指南-1.3版本(4.Building An OWL Ontology)
本体开发日记05-努力理解SWRL(中)
通过程序发送 Gmail 邮件
随机推荐
恶意软件查杀工具分享
【面试体系知识点总结】---JVM
黑盒测试常见错误类型说明及解决方法有哪些?
web测试之功能测试常用的方法有哪几种?有什么要点要注意?
2.线程创建
本体开发日记05-努力理解SWRL(上)
列表
7.FileFilter interface
oracle查看表空间占用情况并删除多余表所占空间
lateral view explode的另一种实现方式
【分布式事务】
软件测试外包公司怎么样?有什么好处和坏处?为什么没人去?
Go-接口的那些事
第四讲 SVN
GBase数据库产生迁移工具假死的原因是什么?
Ontology Development Diary 01-Jena Configuration Environment Variables
性能测试包括哪些方面?分类及测试方法有哪些?
软件测试的流程规范有哪些?具体要怎么做?
map去重代码实现
7.Collections tool class