Skip to content

Instantly share code, notes, and snippets.

@qmx
Last active December 11, 2015 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qmx/4538323 to your computer and use it in GitHub Desktop.
Save qmx/4538323 to your computer and use it in GitHub Desktop.
PagedResult API proposals
public interface AsyncPagedResult<T> {
void next(Callback<List<T>> callback);
void prev(Callback<List<T>> callback);
void page(int offset, int limit, Callback<List<T>> callback);
public static interface Callback<U> {
public void onResult(U result);
}
}
public interface PagedResult<T> {
List<T> next();
List<T> prev();
List<T> page(int offset, int limit);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment