src/main/java/com/workplacesystems/utilsj/collections/IterativeCallback.java
private R doIteration(Iterator<? extends T> it)
    {
        // save the iterator into member variable
        state.i = it;
        state.iterations = 0;
        
        if (state.do_break == true)
            return state.return_object;

        // do the iteration calling nextobject on each
        while (state.i.hasNext())
        {
            T o = state.i.next();

            if (delegate != null)
                delegate.delegate(o);
            else
                iterateObject(o);

            if (state.do_break == true)
                return state.return_object;
        }
        return state.amended_object;
    }
private R doIteration(Iterator<? extends T> it)
    {
        // save the iterator into member variable
        state.i = it;
        state.iterations = 0;
        
        if (state.do_break == true)
            return state.return_object;

        // do the iteration calling nextobject on each
        while (state.i.hasNext())
        {
            T o = state.i.next();

            if (delegate != null)
                delegate.delegate(o);
            else
                iterateObject(o);

            if (state.do_break == true)
                return state.return_object;
        }
        return state.amended_object;
    }
private R doIteration ( Iterator < ? extends T > it ) { // save the iterator into member variable
 state . i = it ; state . iterations = 0 ; if ( state . do_break == true ) return state . return_object ; // do the iteration calling nextobject on each
 while ( state . i . hasNext ( ) ) { T o = state . i . next ( ) ; if ( delegate != null ) delegate . delegate ( o ) ; else iterateObject ( o ) ; if ( state . do_break == true ) return state . return_object ; } return state . amended_object ; }
do the actual iteration
do the actual iteration