内容复用问题
为什么我在bean中添加了isChecked,按照你写的方法写了一遍,还是出现复用呀,第二种方法不会有复用,这是怎么回事呀
为什么我在bean中添加了isChecked,按照你写的方法写了一遍,还是出现复用呀,第二种方法不会有复用,这是怎么回事呀
 
                            2015-08-06
package com.doop.commonadapter.bean;
/**
 * Created by king on 2016/12/4.
 */
public class Bean {
    //定义变量
    private String title;
    private String desc;
    private String time;
    private String phone;
    private Boolean isChecked;
//记录复选框是否选中
    public Boolean getChecked() {
        return isChecked;
    }
    public void setChecked(Boolean checked) {
        isChecked = checked;
    }
    //添加构造方法
    //代码→生成→构造函数
    public Bean() {
    }
    //添加属性构造方法
    //代码→生成→构造函数(按住shift全选参数)
    public Bean(String title, String desc, String time, String phone) {
        this.title = title;
        this.desc = desc;
        this.time = time;
        this.phone = phone;
    }
    // 生成get和set
//代码→生成→构造get和set(按住shift全选参数)
    public String getTitle() {
        return title;
    }
    public Bean setTitle(String title) {
        this.title = title;
        return this;
    }
    public String getDesc() {
        return desc;
    }
    public Bean setDesc(String desc) {
        this.desc = desc;
        return this;
    }
    public String getTime() {
        return time;
    }
    public Bean setTime(String time) {
        this.time = time;
        return this;
    }
    public String getPhone() {
        return phone;
    }
    public Bean setPhone(String phone) {
        this.phone = phone;
        return this;
    }
}
举报