src/main/java/com/workplacesystems/utilsj/collections/IterativeCallback.java
public R iterate(final FilterableCollection<? extends T> c)
    {
        initState();

        checkUsed();

        // If collection is decorated with a syncronized wrapper then synchronize the iteration
        if (c instanceof SynchronizedFilterableCollection)
        {
            return SyncUtils.synchronizeRead(c, new Callback<R>() {
                @Override
                protected void doAction()
                {
                    _return(doIteration(c.iterator()));
                }
            });
        }
        return doIteration(c.iterator());
    }
public R iterate(final FilterableCollection<? extends T> c)
    {
        initState();

        checkUsed();

        // If collection is decorated with a syncronized wrapper then synchronize the iteration
        if (c instanceof SynchronizedFilterableCollection)
        {
            return SyncUtils.synchronizeRead(c, new Callback<R>() {
                @Override
                protected void doAction()
                {
                    _return(doIteration(c.iterator()));
                }
            });
        }
        return doIteration(c.iterator());
    }
public wrapper for the iteration