java collections读书笔记(9)collection框架总览(2)
框架算法:
1)collection接口
add() Adds an element to the collection.
addAll() Adds a collection of elements to the collection.
clear() Clears all elements from the collection.
contains() Checks if a collection contains an element.
containsAll() Checks if a collection contains a collection of elements.
equals() Checks for equality with another object.
hashCode() Returns the computed hash code for the collection
isEmpty() Checks if a collection is empty.
iterator() Returns an object from the collection that allows all of the collection's elements to be visited.
remove() Clears a specific element from collection.
removeAll() Clears a collection of elements from the collection.
retainAll() Removes all elements from the collection not in another collection.
size() Returns the number of elements in the collection.
toArray() Returns the elements of a collection as an array.
Iterator接口:
interator接口是collection框架用来代替老的Enumeration接口的。
提供了在collection中遍历元素的一个标准方式。
hasNext() Checks for more elements in the iterator.
next() Fetches the next element of the iterator.
remove() Removes an element from the iterator.
java collections读书笔记(9)collection框架总览(2)的更多相关文章
- java collections读书笔记(8)collection框架总览(1)
- java collections读书笔记(11) Lists
继续这个系列,好久没学习了,懒惰呀. Set接口,实际上是collection 类别中最简单的一个接口,因为它并没有比Collection 接口增加任何的内容,相对而言,大家可能更喜欢List接口和它 ...
- java collections读书笔记(10) Set
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVgAAADbCAIAAACnXR7VAAAgAElEQVR4nOx9d1hVV9Y3880zb2YmM3 ...
- Java并发读书笔记:线程安全与互斥同步
目录 导致线程不安全的原因 什么是线程安全 不可变 绝对线程安全 相对线程安全 线程兼容 线程对立 互斥同步实现线程安全 synchronized内置锁 锁即对象 是否要释放锁 实现原理 啥是重进入? ...
- java effective 读书笔记
java effective 读书笔记 []创建和销毁对象 静态工厂方法 就是“封装了底层 暴露出一个访问接口 ” 门面模式 多参数时 用构建器,就是用个内部类 再让内部类提供构造好的对象 枚举 si ...
- 深入理解Java虚拟机 -- 读书笔记(1):JVM运行时数据区域
深入理解Java虚拟机 -- 读书笔记:JVM运行时数据区域 本文转载:http://blog.csdn.net/jubincn/article/details/8607790 本系列为<深入理 ...
- 单元测试之道Java版——读书笔记
单元测试知道Java版读书笔记 首先我们必须要知道我们所写的代码,它的功能是什么,如果我们不了解代码的行为,那么也就无从测试. 我们测试的目的,是为了我们整个程序架构的稳定,代码其实就是欧文要实现功能 ...
- Java设置的读书笔记和集合框架Collection API
一个.CollectionAPI 集合是一系列对象的聚集(Collection). 集合在程序设计中是一种重要的数据接口.Java中提供了有关集合的类库称为CollectionAPI. 集合实际上是用 ...
- 【java读书笔记】——Collection集合之六大接口(Collection、Set、List、Map、Iterator和Comparable)
两个月之前准备软考时,简单的从理论上总结了最经常使用的数据结构和算法,比方:线性表,链表,图.在进行java开发时,jdk为我们提供了一系列对应的类来实现主要的数据结构.jdk所提供的容器API位于j ...
随机推荐
- 【IOS笔记】Delegation
Delegation Delegation is a simple and powerful pattern in which one object in a program acts on beha ...
- 5 个 Composer 小技巧
Composer是新一代的PHP依赖管理工具.其介绍和基本用法可以看这篇<Composer PHP依赖管理的新时代>.本文介绍使用Composer的五个小技巧,希望能给你的PHP开发带来方 ...
- the OS maintains a number of queues
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION To do its job, the OS ...
- Oracle数值处理函数 (绝对值、取整...)
1.绝对值:abs() select abs(-2) value from dual; 2.取整函数(大):ceil() select ceil(-2.001) value from du ...
- SQL Server 触发器【转】
触发器是一种特殊类型的存储过程,它不同于之前的我们介绍的存储过程.触发器主要是通过事件进行触发被自动调用执行的.而存储过程可以通过存储过程的名称被调用. Ø 什么是触发器 触发器对表进行插入.更新.删 ...
- 实验三--for语句及分支结构else-if
本节课学习到的知识点: 1.for语句的表达式的应用与掌握.流程形式. 2.多分支else-if,用来判断真假等. 实验中遇到的问题及解决方法: 这次课的逻辑要求比之前的课要难许多,而且对于一些数学逻 ...
- java项目——数据结构实验报告
java项目——数据结构总结报告 20135315 宋宸宁 实验要求 1.用java语言实现数据结构中的线性表.哈希表.树.图.队列.堆栈.排序查找算法的类. 2.设计集合框架,使用泛型实现各类. ...
- ssh2 php扩展
如何通过PHP启动和关闭远程服务器上的某个软件,譬如Memcached.对于俺这个刚刚掌握PHP编程皮毛的菜鸟来说,最直接不过的想法就是用exec函数执行SSH命令呗,先把运行Apache+PHP的服 ...
- 在express项目中有效组织和使用mongoose
平凡之路 1.创建express项目 express mongooseExpress 2.最简express var express = require("express"); v ...
- HttpPost发送Json
1.public static JSONObject post(String url,JSONObject json){ 2. HttpClient client = new DefaultHttpC ...