@@ -0,0 +1,1149 @@
+package ru.matevosyan;%0A%0A/**%0A * EvenNumber class.%0A * Created on 03.05.2017.%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0Apublic class NaturalNumber implements ArrayIterator %7B%0A%0A    private int index = 0;%0A    private int j = 0;%0A    private final int%5B%5D array;%0A%0A    /**%0A     * EvenNumber constructor.%0A     * @param array an array.%0A     */%0A%0A    public NaturalNumber (int%5B%5D array) %7B%0A        this.array = array;%0A    %7D%0A%0A    /**%0A     * Override the next() method to iterate each element from an array.%0A     * @return even numbers from an array.%0A     */%0A%0A    @Override%0A    public int next() %7B%0A        int value = 0;%0A        for (int i = index++; i %3C array.length; i++) %7B%0A            if (array%5Bi%5D %25 2 == 0) %7B%0A                value = i;%0A                break;%0A            %7D else %7B%0A                index++;%0A            %7D%0A        %7D%0A        return array%5Bvalue%5D;%0A    %7D%0A%0A    /**%0A     * Override hasNext() method to check if eny of elements are in array to read, looking to next() pointer.%0A     * @return true if there are any elements to read, else return false.%0A     */%0A%0A    @Override%0A    public boolean hasNext() %7B%0A        return array.length %3E index;%0A    %7D%0A%7D%0A

add NaturalNumber to the naturalNumbers