Java迭代器原理
1迭代器模式
迭代器是一种设计模式,这种模式用于顺序访问集合对象的元素,不需要知道集合对象的底层表示。
一般实现方式如下:(来自)
aaarticlea/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAHgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQAEAsLCwwLEAwMEBcPDQ8XGxQQEBQbHxcXFxcXHx4XGhoaGhceHiMlJyUjHi8vMzMvL0BAQEBAQEBAQEBAQEBAQAERDw8RExEVEhIVFBEUERQaFBYWFBomGhocGhomMCMeHh4eIzArLicnJy4rNTUwMDU1QEA/QEBAQEBAQEBAQEBA/8AAEQgBEQIwAwEiAAIRAQMRAf/EAJ0AAQEAAwEBAQAAAAAAAAAAAAAFAQMEAgYHAQEBAQAAAAAAAAAAAAAAAAAAAQIQAAEDAgIECQgHBgUDAgcAAAIAAQMRBBIFIRMGFjEi0pOzFFSUVUFRYZEy03Q1cYHRUiNTFbFCcjM0NqFikiR1grJDonPB4cJjg0QmEQEAAAQFBAMAAAAAAAAAAAAA8AERQSFRYaHhcZGx0YHB8f/aAAwDAQACEQMRAD8A/QEREBERAREQEREBERAREQEREBERAREQEREBERAREQEREBERAWFlYQERTI7+4lu5YzpC8LE4WdPxpmb97EdBw/wV/i4WQU0UM7+5msbi4eYY5RcR6tGxCUNSb23kYTcn+hm9HlXp81v+tkNIurtd9TZsJPJV48YyVxU0PwtTT52QWkXzwZnmVtZWoySDNPdSyCMowSy4Bjxk9Yo5CM34tOFqLfDmOaXRxRCEdqb2+vlaWM3JixEFBDEDtWldPApnoLSL5S3zC4yvKIpAKI55Iyu5hGCaQpG4Xx6s3wV++T0/yqs2ZXhnczg0TWlpxTiJi1pvqhldxPFhb2mamF/pVFVFCss4zCeGSWUQjBognGaWGa3iar1KIilfjaP3x/0ra+dSvaNdtGMIieBwnJxaerNQraRmfEz/ALtQ43+VBYWVotLh7m3jneKSB5GrqpWwyD6Car0W9AREQEREBERAREQEREBYWVhARFLKa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6MVRWm1torS1htYWdooAGONner4QbC2n6luQEREBERAXBnguWSZiIs7k9rOzM3C7vGS71hB8vlO12Q22VWVtNOYyw28Ucg6iZ6EACJNVo6cLLr322c7RJzE3u1dWUEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7TfbZztEnMTe7V5EEHfbZztEnMTe7U+/z7LM3zPJorCQ5TivGM2eKQKDgJq1MBbyr65YQFlYWUBERAWFlYQfObTXcNjnGR3ty5Dbwnc6wxEjw4osI6AZ34XW7fbZztEnMTe7V1ZQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0ScxN7tN9tnO0ScxN7tXkQQd9tnO0HzE3u1jYwmPKJJBrhkurgwqztUSkd2ejq8iDKIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIg//9kA" alt="" />
public interface Iterator {
public boolean hasNext();
public Object next();
}
public interface Container {
public Iterator getIterator();
}
public class NameRepository implements Container {
public String names[] = {"Robert" , "John" ,"Julie" , "Lora"}; @Override
public Iterator getIterator() {
return new NameIterator();
} private class NameIterator implements Iterator { int index; @Override
public boolean hasNext() {
if(index < names.length){
return true;
}
return false;
} @Override
public Object next() {
if(this.hasNext()){
return names[index++];
}
return null;
}
}
}
public class IteratorPatternDemo { public static void main(String[] args) {
NameRepository namesRepository = new NameRepository(); for(Iterator iter = namesRepository.getIterator(); iter.hasNext();){
String name = (String)iter.next();
System.out.println("Name : " + name);
}
}
}
一般情况,我们自己开发时很少自定义迭代器,因为java本身已经把迭代器做到内部中了
2Java中的迭代器
(1)Iterator接口
package java.util; import java.util.function.Consumer; public interface Iterator<E> { /**
* 如果迭代器又更多的元素,返回true。
* 换句话说,如果next方法返回一个元素而不是抛出一个异常,则返回true。
*/
boolean hasNext(); //返回迭代器中的下一个元素,如果没有,则抛出NoSuchElementException异常
E next(); /**
* 从底层集合中删除该迭代器返回的最后一个元素(可选操作)。每执行一次next方法这个方法只能被调用1次。
* 如果在迭代过程中,除了调用此方法之外,任何其他方法修改基础集合,则迭代器的行为是不确定的。
* 默认实现是抛出一个UnsupportedOperationException异常,不执行其他操作。
* 如果每次调用该方法前next方法没有执行,则抛出IllegalStateException异常。
*/
default void remove() {
throw new UnsupportedOperationException("remove");
} /**
* @since 1.8(函数编程)。
* 对每个剩余元素执行给定的操作,直到所有元素都被处理或动作抛出异常为止。
* 如果指定了该顺序,则按迭代顺序执行操作。动作抛出的异常被传递给调用者。
* 如果action为null,则抛出NullPointerException
*/
default void forEachRemaining(Consumer<? super E> action) {
Objects.requireNonNull(action);
while (hasNext())
action.accept(next());
}
}
首先,Iterator接口是属于java.util包的。然后里面只有4个方法(用法介绍请看注释)。
forEachRemaining方法是Java8函数编程新加入的。作用是对前游标之后的每个元素进行处理(没有返回值),具体怎么处理根据传入的函数。这项里操作使得迭代器更加灵活,操作粒度更加细致。
补充:default关键字可以让接口中的方法可以有默认的函数体,当一个类实现这个接口时,可以不用去实现这个方法,当然,这个类若实现这个方法,就等于子类覆盖了这个方法,最终运行结果符合Java多态特性。(Java8的新特性)
类注释:
/**
* An iterator over a collection. {@code Iterator} takes the place of {@link Enumeration} in the Java Collections Framework. Iterators
* differ from enumerations in two ways:
*
* <ul>
* <li> Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
* <li> Method names have been improved.
* </ul>
*
* <p>This interface is a member of the <a href="{@docRoot}/../technotes/guides/collections/index.html">Java Collections Framework</a>.
*/
Iterator是集合上的迭代器。在Java集合框架中Iterator用来替代Enumeration,Iterator与Enumeration有以下两点区别:
- Iterator允许调用者通过定于语义良好的迭代器删除底层集合中的元素。
- 方法名称已得到改进。
这个接口是Java集合框架的成员。除了如上两点不同外,Java8版本Iterator还加入了函数式编程。
(2)Iterable接口
package java.lang; // 实现此接口,允许对象成为“for-each loop”语句的目标。
public interface Iterable<T> {
// 返回类型为T
元素的迭代器。
Iterator<T> iterator(); /**
* @since 1.8
* 对Iterable
的每个元素执行给定的操作,直到所有元素都被处理或动作引发异常。
* 除非实现类另有规定,否则按照迭代的顺序执行操作(如果指定了迭代顺序)。 动作抛出的异常被转发给调用者。
* 抛出NullPointerException
- 如果指定的动作为空
*/
default void forEach(Consumer<? super T> action) {
Objects.requireNonNull(action);
for (T t : this) {
action.accept(t);
}
} /**
* @since 1.8
* 在Iterable描述的元素上创建一个Spliterator。Spliterator继承了迭代器的fail-fast属性。
*
*/
default Spliterator<T> spliterator() {
return Spliterators.spliteratorUnknownSize(iterator(), 0);
}
}
Java集合包最常用的有Collection和Map两个接口的实现类。Map的实现类迭代器是内部实现的,而Collection继承了Iterable接口。
这里以ArrayList为例,梳理一下Iterator的工作流程。
ArrayList是Collection的子类,而Collection又实现了Iterable接口,Iterable接口里面有iterator()方法(该方法返回一个迭代器对象)。所以,ArrayList(或其父类)也必须实现iterator()方法。
iterator()方法返回一个Iterator对象,而前文中Iterator是个接口。我们不能不知道具体用哪个实现类也不能直接new接口,所以我们找到其直接父类AbstractList,查看iterator()到底如何实现的:
public Iterator<E> iterator() {
return new Itr();
} private class Itr implements Iterator<E> { // Index of element to be returned by subsequent call to next.
int cursor = 0; /**
* Index of element returned by most recent call to next or
* previous. Reset to -1 if this element is deleted by a call
* to remove.
*/
int lastRet = -1; /**
* The modCount value that the iterator believes that the backing
* List should have. If this expectation is violated, the iterator
* has detected concurrent modification.
*/
int expectedModCount = modCount; public boolean hasNext() {
return cursor != size();
} public E next() {
checkForComodification();
try {
int i = cursor;
E next = get(i);
lastRet = i;
cursor = i + 1;
return next;
} catch (IndexOutOfBoundsException e) {
checkForComodification();
throw new NoSuchElementException();
}
} public void remove() {
if (lastRet < 0)
throw new IllegalStateException();
checkForComodification(); try {
AbstractList.this.remove(lastRet);
if (lastRet < cursor)
cursor--;
lastRet = -1;
expectedModCount = modCount;
} catch (IndexOutOfBoundsException e) {
throw new ConcurrentModificationException();
}
} final void checkForComodification() {
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
}
}
这里是通过内部类实现了Iterator接口,然后再将其实例对象返回。
原理很简单,每调用一次next方法,先返回当前游标指向位置的值,然后游标往下移动一位,直到游标数值等于list的size。
而在ArrayList类里面又提供了一个实现版本:
/**
* An optimized version of AbstractList.Itr
*/
private class Itr implements Iterator<E> {
int cursor; // index of next element to return
int lastRet = -1; // index of last element returned; -1 if no such
int expectedModCount = modCount; Itr() {} public boolean hasNext() {
return cursor != size;
} @SuppressWarnings("unchecked")
public E next() {
checkForComodification();
int i = cursor;
if (i >= size)
throw new NoSuchElementException();
Object[] elementData = ArrayList.this.elementData;
if (i >= elementData.length)
throw new ConcurrentModificationException();
cursor = i + 1;
return (E) elementData[lastRet = i];
} public void remove() {
if (lastRet < 0)
throw new IllegalStateException();
checkForComodification(); try {
ArrayList.this.remove(lastRet);
cursor = lastRet;
lastRet = -1;
expectedModCount = modCount;
} catch (IndexOutOfBoundsException ex) {
throw new ConcurrentModificationException();
}
} @Override
@SuppressWarnings("unchecked")
public void forEachRemaining(Consumer<? super E> consumer) {
Objects.requireNonNull(consumer);
final int size = ArrayList.this.size;
int i = cursor;
if (i >= size) {
return;
}
final Object[] elementData = ArrayList.this.elementData;
if (i >= elementData.length) {
throw new ConcurrentModificationException();
}
while (i != size && modCount == expectedModCount) {
consumer.accept((E) elementData[i++]);
}
// update once at end of iteration to reduce heap write traffic
cursor = i;
lastRet = i - 1;
checkForComodification();
} final void checkForComodification() {
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
}
}
next方法很好理解,和父类大概是一个意思。remove方法是调用ArrayList.this.remove(lastRet)实现:
public E remove(int index) {
rangeCheck(index); modCount++;
E oldValue = elementData(index); int numMoved = size - index - 1;
if (numMoved > 0)
System.arraycopy(elementData, index+1, elementData, index,
numMoved);
elementData[--size] = null; // clear to let GC do its work return oldValue;
}
numMoved 是计算要移动的元素个数(删除数组的某一位置的值,后面的值要依次往前移)。
cursor = lastRet;
lastRet = -1;
表示删除之后,游标前移1位。为什么这么做?举个例子,数组a = [1,2,3,4],若cursor = 2,游标指向数字3,则lastRet = 1。当删除a[1]的时候,a = [1,3,4]。3对应的位置变为1了,所以会有cursor = lastRet。
lastRet的值置为-1,这里很好的解释了前面注释中为什么remove方法一定要在next方法之后执行了。
Java迭代器原理的更多相关文章
- [JavaEE]Java NIO原理图文分析及代码实现
转http://weixiaolu.iteye.com/blog/1479656 目录: 一.java NIO 和阻塞I/O的区别 1. 阻塞I/O通信模型 2. java NIO ...
- Java NIO原理图文分析及代码实现
原文: http://weixiaolu.iteye.com/blog/1479656 目录: 一.java NIO 和阻塞I/O的区别 1. 阻塞I/O通信模型 2. java ...
- Java NIO原理 图文分析及代码实现
Java NIO原理图文分析及代码实现 前言: 最近在分析hadoop的RPC(Remote Procedure Call Protocol ,远程过程调用协议,它是一种通过网络从远程计算机程序上请 ...
- 170118、快速失败Vs安全失败(Java迭代器附示例)
简介: 当错误发生时,如果系统立即关闭,即是快速失败,系统不会继续运行.运行中发生错误,它会立即停止操作,错误也会立即暴露.而安全失败系统在错误发生时不会停止运行.它们隐蔽错误,继续运行,而不会暴露错 ...
- 黑马----JAVA迭代器详解
JAVA迭代器详解 1.Interable.Iterator和ListIterator 1)迭代器生成接口Interable,用于生成一个具体迭代器 public interface Iterable ...
- JAVA监听器原理
http://blog.csdn.net/longyulu/article/details/25054697 JAVA监听器原理 标签: 监听器 2014-05-05 15:40 9070人阅读 评论 ...
- Java NIO原理分析
Java IO 在Client/Server模型中,Server往往需要同时处理大量来自Client的访问请求,因此Server端需采用支持高并发访问的架构.一种简单而又直接的解决方案是“one-th ...
- Java跨平台原理
此篇博文主要源自网络xiaozhen的天空的博客:http://xiaozhen1900.blog.163.com/blog/static/1741732572011325111945246/ 1.是 ...
- 【转】Java跨平台原理
原文地址:http://www.cnblogs.com/gw811/archive/2012/09/09/2677386.html 1.是么是平台 Java是可以跨平台的编程语言,那我们首先得知道什么 ...
随机推荐
- axis2实践(一)JAX-WS入门示例
1. 实例说明 现在大多数的网站都有通知功能(例如,放假通知,网站维护通知等),本实例就是针对于通知,发布两个WebService服务 1)根据供应商编号,状态,发布日期查询通知信息 2)根据编号查询 ...
- Sublime Text 2注册码
出处不详. ----- BEGIN LICENSE ----- Andrew Weber Single User License EA7E-855605 813A03DD 5E4AD9E6 6C0EE ...
- ajax数据读取和绑定
如何进行ajax数据读取和绑定呢? 首先创建一个AJAX对象 实现数据绑定 实现隔行变色 编写表格排序的方法(实现按照年龄这一列进行排序) 通过文档碎片,把排序后的最新顺序,重新添加到tBody中(通 ...
- 转:LinkedHashMap使用(可以用来实现LRU缓存)
1. LinkedHashMap概述: LinkedHashMap是HashMap的一个子类,它保留插入的顺序,如果需要输出的顺序和输入时的相同,那么就选用LinkedHashMap. LinkedH ...
- hdu6188&&百度之星初赛(B) T5
度度熊的交易计划 Problem Description 度度熊参与了喵哈哈村的商业大会,但是这次商业大会遇到了一个难题: 喵哈哈村以及周围的村庄可以看做是一共由n个片区,m条公路组成的地区. 由于生 ...
- mysql-\g和\G的作用
\g 的作用是分号和在sql语句中写’;’是等效的 \G 的作用是将查到的结构旋转90度变成纵向(可以将一个很长的行转为好看的格式) 这两个只能在DOS窗口使用,可视化工具中不能使用. 例如:
- authencated认证登录
#coding:utf-8 import tornado.httpserver import tornado.ioloop import tornado.options import tornado. ...
- JSON的相关内容
包括: JSON概述, JSON语法规则, 使用JSON(JSON对象,JSON数组,JSON文档与对象的转换) JSON应用 额外内容(PHP输出JSON数据,解析JSON字符串,客户端如何使用服务 ...
- 你不一定知道的、并没有什么卵用的一些python库
1. delorean,用来处理时间的库 import datetime import pytz # 一般情况下,我们想表示时间的话 est = pytz.timezone("Asia/Sh ...
- MFC学习之EDIT控件初始化
//四种方法为EDIT控件初始化 //调用系统API HWND hEidt = ::GetDlgItem(m_hWnd,IDC_EDIT1); ::SetWindowText( ...