package com.zhaohaoting.framework.abs.datasource;

import com.zhaohaoting.framework.abs.entity.BaseListEntity;

/**
 * author：Created by ZHT on 2018/11/14 15:57
 * email：526309416@qq.com
 * desc：分页
 */
public abstract class BasePageListDataSource<DATA,BASE_DATA extends BaseListEntity<DATA>> extends RxDataSource<DATA, BASE_DATA> {

    private int pageSize;

    @Override
    public void setPage(BASE_DATA dataSource) {
        pageSize = dataSource.getPageSize();
    }

    @Override
    public boolean hasMore() {
        return page < pageSize;
    }
}
