package ru.job4j;

import java.util.Iterator;

/**
 * Task 4.1.2
 * Create Iterator even numbers
 *
 * @author Anton Vasilyuk on 03.06.2017.
 * @version 1.0
 * @since 0.1
 */
public class iterEvenNumbers implements Iterator {

    @Override
    public boolean hasNext() {
        return false;
    }
}

@@ -168,16 +168,17 @@
 0.1%0A */%0A
+%0A
 public c
@@ -186,12 +186,16 @@
 ass 
-i
+I
 ter
+ator
 Even
@@ -233,69 +233,810 @@
     
-@Override%0A    public boolean hasNext() %7B%0A        return false
+/**.%0A     * @values is array numbers%0A     */%0A    private int%5B%5D values;%0A%0A    /**.%0A     * @index is index array%0A     */%0A    private int index = 0;%0A%0A    /**.%0A     * Constructor for class IteratorEvenNumber%0A     * @param values is array numbers%0A     */%0A    public IteratorEvenNumbers(int%5B%5D values) %7B%0A        this.values = values;%0A    %7D%0A%0A    /**.%0A     * Check latest index%0A     * @return boolean%0A     */%0A    @Override%0A    public boolean hasNext() %7B%0A        return this.values.length %3E index;%0A    %7D%0A%0A    /**%0A     * Realisation iterator for even number%0A     * @return object on this position%0A     */%0A    @Override%0A    public Object next() %7B%0A        if(hasNext()) %7B%0A            while ((this.values%5Bindex%5D %25 2) != 0) %7B%0A                index++;%0A                %7D%0A            %7D%0A        return this.values%5Bindex++%5D
 ;%0A  
@@ -1041,8 +1041,9 @@
     %7D%0A%7D%0A
+%0A

add file for chapter_003_4.1.2