用途
迭代器模式 (Iterator)
提供一种方法顺序访问一个聚合对象中各个元素,而又不暴露该对象的内部表示。
迭代器模式是一种行为型模式。
结构
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaIAAAFICAIAAACdtm3cAAAgAElEQVR4nOydd0AUx9uAFzCixsREE42aKFGRKEhRUbF8Gn8xKEalKKBgI5oYY2xgiSBHEwslRo1GwIZUAQVR7BIrWAClSVEQECvSjnJwuzvfHwPrchztuArv8xf33uzs7N3w3M5OIxAAAECHhpB1AQAAACQLaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4AgA4OaA4A2gFVg+haWRcCaAHQHAC0A7oW0XxZFwJoAdAcAAAdHHnRHEmShYWFLwBxU1hYSJKkrL/ezsKbN29k/YUrDG/fvpXa9yIvmsvPzx8wYEAvQNwMGDAgPz9f1l9vZ2HKlCmy/sIVhh9++EFq34u8aO758+c9e/b08/O7e/fu3Ts37t6+fhcQmdvX7965cffuXT8/v549ez5//lzWX29nQU9Pj8PhyPrrVwC2bds2YcIEqX0v8qW5e/fuIYQQTcJj3XZB8xFNIoTu3bsHmpMmenp6J0+elHUpFAA/P79OrzlATIDmpAxorpWA5gCxAZqTMqC5VgKaU0RohOi2pKckVZCGgOakjNxorq0VUtrZguYUELISUbzWJqZJxC9DtDRMB5qTMvKiOboWkVzxZ0tVI6pKLDmB5hQQmmryBo2mEMlt+C6N+wekAGhOyohfczQfkZXNRagaRFU3PqzlOtY455ahxPXzDJoTG+fOnbOxsfnzzz/5fBn229KIqmnmVj8uLs7GxmblypWvX78W+7lBc1JGvJqLioqyWb7MZtliGxsbGxub+/fvR0ZG2ixftt1+64dEzQ9LoKqb9B1NMbNx9+3bZ2Nj4+Pj06pi0RSiqtrZegXNiQTNF/iyz58/b2RkRBDEF198sXv37jdv3rQ6H+nNG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j4+PjM3jw4GnTpoWHhz96lGixwFRFRWX79u34rUuXLmVnZ6uqqhIE8f333+vr68+bN+/Nmze//fZbnz59Vq5c6ePjs3r16l69ev38888FBQVYc6NHj8aHv3///vDhw2PGjGEiAwcO/N///hcVeRrR/LS0NCUlJYIgQkNDORwOQRCampr4og4dOjR69Gh9fX0fH5/Dhw/379+fIAhnZ+f79++bmZkpKyu7uLj4+Phg++jo6PD5/OHDhxMEMXbs2O+//15XV5ckSXt7ezU1NRMTEx8fn+3bt6uoqFhYWDx69CgiImLatGmDBg3CRdLR0SEIYsmSJQghPp8fHByM48uXL//yyy9///33oqIifKKJEyf6+PgcO3aMy+Xu3btXW1t70qRJPj4++/bt692796xZsy5dusT+akBzTSGoOUQhulaWBeo0dBTN1fP8+fOePXsSBHHs2DGE0Llz53Db8P79+1hzP/30E045duxYgiC2bNly9uxZnCYhIYHJh9HczJkzN2zY4Ofnl5WV1bVrV4IgFi9e7O3tbWNjg4969OhR40arpaUlVqq3t7e3tzcWFofDQQg1o7n58+cTBGFhYYEQoihqxIgRWHPBwcEEQaioqGRkZCCEHBwcBDQ3adKkDRs2eHh41NbWqqurEwQxe/Zsb29vOzs7XMioqKg///wTuxifa86cOWzNHTlyBBd10aJFBEH06NEjNze3caN11qxZBEGMHz/e29t7586dn3/+OUEQnp6e7K8ANNcUjTQHSAnQXAuaO3nyJI4wmtPW1jZk8ezZs6Y0169fP3ZKf3//169f+/j4YM3Z29svXryYIIjBgwdfvHiRy+WKrDk3Nzd8XkZz6urqH0784//i4u42pbmysrKoqKivvvpq9OjRhoaGo0aNqtNcTvZso1lCNTdw4ED2dYWHh7O/AtBcU0hEczQFU4ZbpNNqjho7doxomgsMDBQoXlOaMzMzw+di4mFhYfhc/fr1+/rrr7/++us+ffoQBKGkpJSWliZGze3YseND+UguovlNae7Bgwe4SNHR0Qih48ePEwTRo0f33Kcps40MhWrOxsammS8LNNcUEtEcVYOoKvxXu/NqvotfvEe1nzact3NqjkL8srFj9KShOZpC/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mj/DiQOWDKj3g1992XAHoN0s3F/+pmPPQUxubI3D06eWUK7kyEzAFTFua+uUkvMwvAt0DmgCkLMnMATB1kDpgCmQMUAZkDpkDmAEVA5oApkDlAEZA5YApkDlAEZA6YApkDFAGZA6ZA5gBFQOaAKZA5QBGQOWDK7GQuOzv7GQA/VFlZ2YoVKyBzwNhMMyeRSGxtbf8GwMLw/e84Bz+fmWZOp9OJxeIPACwM+Hs/AMBmmjkAAFjgIHOAigza6V7vD1AQZA5QkUFr1rUFwc8BMgcobfLrJIOfA2QOUJgeaf+CaxcCyBygNngpByBzAACqg8wBACgOMgcAoDjIHACA4iBzAACKg8wBACgOMgcAoDjIHACA4iBzAACKg8wBACgOMgcAoDjIHACA4iBzAACKg8wBACgOMgcAoLj/AbooM/rDIW2QAAAAAElFTkSuQmCC" alt="" />
图-迭代器模式结构图
Iterator : 定义访问元素的接口。
interface Iterator { public Object first(); public Object next(); public boolean isDone(); public Object currentItem(); }
ConcreteIterator : 实现 Iterator
接口。记录当前访问的元素在集合中的位置信息。
class ConcreteIterator implements Iterator { private int current = 0; private ConcreteAggregate aggregate; public ConcreteIterator(ConcreteAggregate aggregate) { this.aggregate = aggregate; } @Override public Object first() { return aggregate.get(0); } @Override public Object next() { current++; if (current < aggregate.size()) { return aggregate.get(current); } return null; } @Override public boolean isDone() { return (current >= aggregate.size()) ? true : false; } @Override public Object currentItem() { return aggregate.get(current); } }
Aggregate : 定义创建 Iterator
对象的接口。
interface Aggregate { public Iterator CreateIterator(); }
ConcreteAggregate : 实现
Iterator 接口,返回一个合适的 ConcreteIterator 实例。
class ConcreteAggregate implements Aggregate { private List<Object> items = new ArrayList<Object>(); @Override public Iterator CreateIterator() { return new ConcreteIterator(this); } public int size() { return items.size(); } public Object get(int index) { return items.get(index); } public void set(int index, Object element) { items.set(index, element); } public void add(Object element) { items.add(element); } }
测试代码
public class IteratorPattern { public static void main(String[] args) { ConcreteAggregate aggregate = new ConcreteAggregate(); aggregate.add("张三"); aggregate.add("李四"); aggregate.add("王五"); aggregate.add("赵六"); Iterator iter = new ConcreteIterator(aggregate); Object item = iter.first(); System.out.println("第一个人是:" + item); System.out.println("所有人的名单是:"); while (!iter.isDone()) { System.out.println(iter.currentItem()); iter.next(); } } }
运行结果
第一个人是:张三 所有人的名单是: 张三 李四 王五 赵六
应用场景
访问一个聚合对象的内容而无需暴露它的内部表示。
支持对聚合对象的多种遍历。
为遍历不同的聚合结构提供一个统一的接口。
支持对聚合对象的多种遍历。
为遍历不同的聚合结构提供一个统一的接口。