added iterator sample

This commit is contained in:
Ilkka Seppala
2014-08-18 23:18:15 +03:00
parent 71d7c875d6
commit 91ed79e6bd
8 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package com.iluwatar;
public class Item {
private ItemType type;
private String name;
public Item(ItemType type, String name) {
this.setType(type);
this.name = name;
}
@Override
public String toString() {
return name;
}
public ItemType getType() {
return type;
}
public void setType(ItemType type) {
this.type = type;
}
}