// Path: app/src/main/java/com/sregg/android/tv/spotifyPlayer/Constants.java
// public class Constants {
//     public static final String MARKET_FROM_TOKEN = "from_token";
//     public static final int PAGE_LIMIT = 50;
//     public static final int MAX_SONGS_PLAYED = 100;
// 
//     public static final String ANSWERS_CONTENT_NAME = "playlist";
//     public static final String ANSWERS_CONTENT_ALBUM = "album";
//     public static final String ANSWERS_CONTENT_TYPE = "detail_view";
// 
//     public static final String ANSWERS_EVENT_PLAYER_PLAY = "play";
//     public static final String ANSWERS_EVENT_PLAYER_PAUSE = "pause";
//     public static final String ANSWERS_EVENT_PLAYER_TRACK_CHANGE = "track_change";
// 
// }


import android.support.v17.leanback.widget.ArrayObjectAdapter;
import android.support.v17.leanback.widget.Presenter;
import android.support.v17.leanback.widget.PresenterSelector;
import com.sregg.android.tv.spotifyPlayer.Constants;
import java.util.Collection;
package com.sregg.android.tv.spotifyPlayer.adapters;




public abstract class PagingAdapter extends ArrayObjectAdapter {

    public static final int LOAD_THRESHOLD = Constants.PAGE_LIMIT;

    public PagingAdapter(PresenterSelector presenterSelector) {
        super(presenterSelector);
    }

    public PagingAdapter(Presenter presenter) {
        super(presenter);
    }

    public PagingAdapter() {
    }

    private int total;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    protected abstract void onLoadMore(int offset);

    private boolean canLoadMore() {
        return total > size();
    }

    public void addAll(int total, int index, Collection items) {
        super.addAll(index, items);
// Path: app/src/main/java/com/sregg/android/tv/spotifyPlayer/Constants.java
// public class Constants {
//     public static final String MARKET_FROM_TOKEN = "from_token";
//     public static final int PAGE_LIMIT = 50;
//     public static final int MAX_SONGS_PLAYED = 100;
// 
//     public static final String ANSWERS_CONTENT_NAME = "playlist";
//     public static final String ANSWERS_CONTENT_ALBUM = "album";
//     public static final String ANSWERS_CONTENT_TYPE = "detail_view";
// 
//     public static final String ANSWERS_EVENT_PLAYER_PLAY = "play";
//     public static final String ANSWERS_EVENT_PLAYER_PAUSE = "pause";
//     public static final String ANSWERS_EVENT_PLAYER_TRACK_CHANGE = "track_change";
// 
// }


// Path: app/src/main/java/com/sregg/android/tv/spotifyPlayer/adapters/PagingAdapter.java
import android.support.v17.leanback.widget.ArrayObjectAdapter;
import android.support.v17.leanback.widget.Presenter;
import android.support.v17.leanback.widget.PresenterSelector;
import com.sregg.android.tv.spotifyPlayer.Constants;
import java.util.Collection;

package com.sregg.android.tv.spotifyPlayer.adapters;




public abstract class PagingAdapter extends ArrayObjectAdapter {

    public static final int LOAD_THRESHOLD = Constants.PAGE_LIMIT;

    public PagingAdapter(PresenterSelector presenterSelector) {
        super(presenterSelector);
    }

    public PagingAdapter(Presenter presenter) {
        super(presenter);
    }

    public PagingAdapter() {
    }

    private int total;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    protected abstract void onLoadMore(int offset);

    private boolean canLoadMore() {
        return total > size();
    }

    public void addAll(int total, int index, Collection items) {
        super.addAll(index, items);
        this.total = total;