package com.ycgis.macall.personalcenter.p.callback;

import android.view.View;

/**
 * created by:   Macall
 * create time:  2023/10/13 16:30
 * copyright:    @ruansee.com
 * Describe:
 */
abstract public class OnAdapterLongClickListener<E> implements View.OnLongClickListener {

    private E data;
    private int position;

    public OnAdapterLongClickListener(E data, int position) {
        this.data = data;
        this.position = position;
    }


    public void setParam(E data, int position) {
        this.data = data;
        this.position = position;
    }

    @Override
    public boolean onLongClick(View v) {
        onLongClick(v,data,position);
        return true;
    }

    protected abstract void onLongClick(View v, E data, int position);
}
