package org.simpleflatmapper.util;

import org.simpleflatmapper.util.Enumarable;

public class ArrayEnumarable<T> implements Enumarable<T> {

    private final T[] objects;
    private int currentIndex = -1;

    public ArrayEnumarable(T[] objects) {
        this.objects = objects;
    }

    @Override
    public boolean next() {
        if (currentIndex < objects.length) {
            currentIndex ++;
            return true;
        }
        return false;
    }

    @Override
    public T currentValue() {
        return objects[currentIndex];
    }
}

@@ -33,54 +33,8 @@
 l;%0A%0A
-import org.simpleflatmapper.util.Enumarable;%0A%0A
 publ
@@ -275,24 +275,49 @@
 an next() %7B%0A
+        currentIndex ++;%0A
         if (
@@ -353,37 +353,8 @@
 ) %7B%0A
-            currentIndex ++;%0A
     

fix enumarable