forked from zfman/AlgorithmCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.java
More file actions
17 lines (16 loc) · 415 Bytes
/
Client.java
File metadata and controls
17 lines (16 loc) · 415 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package pattern.iterator;
/**
* 迭代器模式
* @author 刘壮飞
* https://github.com/zfman.
* https://blog.csdn.net/lzhuangfei.
*/
public class Client {
public static void main(String[] args){
NameRepository repository=new NameRepository();
Iterator iterator=repository.iterator();
while (iterator.hasNext()){
System.out.println(iterator.next());
}
}
}