|
|
|
@ -16,14 +16,15 @@ import com.msb.iterator.v4.Dog;
|
|
|
|
|
*/
|
|
|
|
|
public class Main {
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
Collection_ list = new LinkedList_();
|
|
|
|
|
Collection_<Dog> list = new LinkedList_();
|
|
|
|
|
for (int i=0; i<15; i++) {
|
|
|
|
|
list.add(new Dog(i));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Iterator_ iterator = list.iterator();
|
|
|
|
|
Iterator_<Dog> iterator = list.iterator();
|
|
|
|
|
while (iterator.hashNext()) {
|
|
|
|
|
System.out.println(iterator.next());
|
|
|
|
|
Dog dog = iterator.next();
|
|
|
|
|
System.out.println(dog);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|