// Path: autoadapter/src/main/java/com/benny/library/autoadapter/factory/Factory.java
// public interface Factory<T> {
//     T create();
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/factory/MockViewHolerFactory.java
// public class MockViewHolerFactory<T> implements Factory<IViewHolder<T>> {
//     @Override
//     public IViewHolder<T> create() {
//         return new MockViewHolder<T>();
//     }
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/utils/Func3.java
// public interface Func3<T1, T2, T3, R> {
//     R call(T1 t1, T2 t2, T3 t3);
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/MockViewHolder.java
// public class MockViewHolder<T> implements IViewHolder<T> {
//     @Override
//     public void bind(View view) {
//     }
// 
//     @Override
//     public void onDataChange(DataGetter<T> getter, int position) {
//     }
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/IViewHolder.java
// public interface IViewHolder<T> {
//     void bind(View view);
//     void onDataChange(DataGetter<T> getter, int position);
// }


import android.view.View;
import android.view.ViewGroup;
import com.benny.library.autoadapter.factory.Factory;
import com.benny.library.autoadapter.factory.MockViewHolerFactory;
import com.benny.library.autoadapter.utils.Func3;
import com.benny.library.autoadapter.viewholder.MockViewHolder;
import com.benny.library.autoadapter.viewholder.IViewHolder;
import java.util.ArrayList;
import java.util.List;
        }

        public boolean canProcess(T data, int position, int itemCount) {
            return filter.call(data, position, itemCount);
        }
    }

    public static class Builder<T> {
        private int loadingResId = -1;
        private List<ViewTypeFilter<T> > viewTypeFilters = new ArrayList<ViewTypeFilter<T>>();

        private IViewCreator<T> defaultViewCreator;

        private Func3<T, Integer, Integer, Boolean> alwaysTrue = new Func3<T, Integer, Integer, Boolean>() {
            @Override
            public Boolean call(T t, Integer integer, Integer integer2) {
                return true;
            }
        };

        public Builder<T> loadingResId(int loadingResId) {
            this.loadingResId = loadingResId;
            return this;
        }

        public Builder<T> addFilter(IViewCreator<T> viewCreator) {
            defaultViewCreator = viewCreator;
            return this;
        }

// Path: autoadapter/src/main/java/com/benny/library/autoadapter/factory/Factory.java
// public interface Factory<T> {
//     T create();
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/factory/MockViewHolerFactory.java
// public class MockViewHolerFactory<T> implements Factory<IViewHolder<T>> {
//     @Override
//     public IViewHolder<T> create() {
//         return new MockViewHolder<T>();
//     }
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/utils/Func3.java
// public interface Func3<T1, T2, T3, R> {
//     R call(T1 t1, T2 t2, T3 t3);
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/MockViewHolder.java
// public class MockViewHolder<T> implements IViewHolder<T> {
//     @Override
//     public void bind(View view) {
//     }
// 
//     @Override
//     public void onDataChange(DataGetter<T> getter, int position) {
//     }
// }
// 
// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewholder/IViewHolder.java
// public interface IViewHolder<T> {
//     void bind(View view);
//     void onDataChange(DataGetter<T> getter, int position);
// }


// Path: autoadapter/src/main/java/com/benny/library/autoadapter/viewcreator/ViewCreatorCollection.java
import android.view.View;
import android.view.ViewGroup;
import com.benny.library.autoadapter.factory.Factory;
import com.benny.library.autoadapter.factory.MockViewHolerFactory;
import com.benny.library.autoadapter.utils.Func3;
import com.benny.library.autoadapter.viewholder.MockViewHolder;
import com.benny.library.autoadapter.viewholder.IViewHolder;
import java.util.ArrayList;
import java.util.List;

        }

        public boolean canProcess(T data, int position, int itemCount) {
            return filter.call(data, position, itemCount);
        }
    }

    public static class Builder<T> {
        private int loadingResId = -1;
        private List<ViewTypeFilter<T> > viewTypeFilters = new ArrayList<ViewTypeFilter<T>>();

        private IViewCreator<T> defaultViewCreator;

        private Func3<T, Integer, Integer, Boolean> alwaysTrue = new Func3<T, Integer, Integer, Boolean>() {
            @Override
            public Boolean call(T t, Integer integer, Integer integer2) {
                return true;
            }
        };

        public Builder<T> loadingResId(int loadingResId) {
            this.loadingResId = loadingResId;
            return this;
        }

        public Builder<T> addFilter(IViewCreator<T> viewCreator) {
            defaultViewCreator = viewCreator;
            return this;
        }

        public Builder<T> addFilter(int resId, Factory<? extends IViewHolder<T>> factory) {