package com.thefuntasty.infinity;

import android.support.annotation.UiThread;

import java.util.List;

public interface InfinityFiller<T> {

	void onLoad(int limit, int offset, InfinityFiller.Callback<T> callback);

	class Callback<T> {
		protected boolean interrupted = false;

		@UiThread public void onData(List<T> collection) { }

		@UiThread public void onError(Throwable error) { }

		protected void setInterrupted() {
			interrupted = true;
		}
	}
}

@@ -279,61 +279,346 @@
 %0A%0A%09%09
-@UiThread public void onData(List%3CT%3E collection) %7B %7D%0A
+/**%0A%09%09 * Method to add data downloaded from data source to the adapter%0A%09%09 *%0A%09%09 * @param collection one page data downloaded from source (API)%0A%09%09 */%0A%09%09@UiThread public void onData(List%3CT%3E collection) %7B %7D%0A%0A%09%09/**%0A%09%09 * Method to set error state to the adapter%0A%09%09 * @param error throwable what holds information about error what occurred%0A%09%09 */
 %0A%09%09@

add description to filler methods