提交 40e54447 编写于 作者: I Ilkka Seppala

Added comments for iterator example.

上级 4fef18f6
package com.iluwatar;
/**
*
* Iterator (ItemIterator) adds abstraction layer on top of a
* collection (TreasureChest). This way the collection can change
* its internal implementation without affecting its clients.
*
*/
public class App
{
public static void main( String[] args )
......
package com.iluwatar;
/**
*
* Iterator interface.
*
*/
public interface ItemIterator {
boolean hasNext();
......
......@@ -3,6 +3,11 @@ package com.iluwatar;
import java.util.ArrayList;
import java.util.List;
/**
*
* Collection class.
*
*/
public class TreasureChest {
private List<Item> items;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册