package chaoran.business.engine.entity;

/*
 **********************************************
 *      DATE           PERSON       REASON
 *    2021-02-20          FXY        Created
 **********************************************
 */


import androidx.annotation.Nullable;

public class BlueToothSetting extends Setting {

    //蓝牙-名称
    private String name;
    //蓝牙-地址
    private String address;

    public BlueToothSetting(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public int hashCode() {
        return address.hashCode();
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (obj instanceof BlueToothSetting) {
            BlueToothSetting blueToothSetting = (BlueToothSetting) obj;
            return blueToothSetting.getAddress().equals(this.getAddress());
        }
        return false;
    }
}
