package cn.net.caoyao.cpzshandset.ui.adapter;

import java.util.List;

import cn.net.caoyao.cpzshandset.ui.adapter.base.BasePresenterAdapter;
import cn.net.caoyao.cpzshandset.ui.vus.StationListItemView;

public class StationPresentAdapter<T> extends BasePresenterAdapter<StationListItemView>{
	private List<Class<T>> datas;
	
	public StationPresentAdapter(List<Class<T>> datas) {
		this.datas = datas;
	}
	
	public void refreshData(List<Class<T>> datas){
		this.datas = datas;
		notifyDataSetChanged();
	}
	
	@Override
	public int getCount() {
		return datas.size();
	}

	@Override
	public Object getItem(int position) {
		return datas.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	protected void onBindListItemVu(int position) {
		vu.setStationView(datas.get(position),position);
	}

	@Override
	protected Class<StationListItemView> getVuClass() {
		return StationListItemView.class;
	}

}
