package ru.job4j;

import java.util.*;
/**
 * Task 4.1.4
 * Create iterator for iterators
 *
 * @author Anton Vasilyuk
 * @version 1.0
 * @since 0.1
 */
public class IteratorIterators implements Iterator{
    @Override
    public boolean hasNext() {
        return false;
    }

    @Override
    public Object next() {
        return null;
    }
}

@@ -32,16 +32,17 @@
 util.*;%0A
+%0A
 /**%0A * T
@@ -147,16 +147,17 @@
 0.1%0A */%0A
+%0A
 public c
@@ -202,144 +202,1231 @@
 ator
-%7B%0A    @Override%0A    public boolean hasNext() %7B%0A        return false;%0A    %7D%0A%0A    @Override%0A    public Object next() %7B%0A        return null
+Interface, Iterator %7B%0A%0A    /**.%0A     * @iter is iterator iterators%0A     */%0A    private Iterator%3CIterator%3CInteger%3E%3E iter;%0A%0A    /**.%0A     * @subIter is value for iterator%0A     */%0A    private Iterator%3CInteger%3E subIter = null;%0A%0A    /**.%0A     * Method for transform iterator iterators to one iterators%3CInteger%3E%0A     * @param it is input iterator%0A     * @return result iterator%0A     */%0A    public Iterator%3CInteger%3E convert(Iterator%3CIterator%3CInteger%3E%3E it) %7B%0A        this.iter = it;%0A        if (this.iter.hasNext()) %7B%0A            this.subIter = it.next();%0A        %7D%0A        return this;%0A    %7D%0A%0A    /**.%0A     * Check is there a next element%0A     * @return boolean%0A     */%0A    @Override%0A    public boolean hasNext() %7B%0A        return subIter.hasNext() %7C%7C iter.hasNext();%0A    %7D%0A%0A    /**.%0A     * Realization method next for input iterators%0A     * @return number%0A     */%0A    @Override%0A    public Integer next() %7B%0A        Integer result = 0;%0A        if(subIter.hasNext()) %7B%0A            result = subIter.next();%0A        %7D%0A        else if (iter.hasNext()) %7B%0A            subIter = iter.next();%0A            result = subIter.next();%0A        %7D%0A        else %7B%0A            new NoSuchElementException(%22No number!%22);%0A        %7D%0A        return result
 ;%0A  

add file for chapter_003_4.1.4