package console;
|
|
import java.io.Serializable;
|
import java.util.Objects;
|
|
/**
|
* Created by Administrator on 2018/5/7.
|
*/
|
|
public class BeaconModel implements Serializable{
|
private String name;
|
private int major;
|
private int minor;
|
private String proximityUuid;
|
private String bluetoothAddress;
|
private int txPower;
|
private int rssi;
|
private String mac;
|
private double distance;
|
public BeaconModel(){}
|
|
public BeaconModel(String name, int major, int minor, String proximityUuid, String bluetoothAddress, int txPower, int rssi, String mac, double distance) {
|
this.name = name;
|
this.major = major;
|
this.minor = minor;
|
this.proximityUuid = proximityUuid;
|
this.bluetoothAddress = bluetoothAddress;
|
this.txPower = txPower;
|
this.rssi = rssi;
|
this.mac = mac;
|
this.distance = distance;
|
}
|
|
public BeaconModel(String name, int major, int minor, String proximityUuid, String bluetoothAddress, int txPower, int rssi) {
|
this.name = name;
|
this.major = major;
|
this.minor = minor;
|
this.proximityUuid = proximityUuid;
|
this.bluetoothAddress = bluetoothAddress;
|
this.txPower = txPower;
|
this.rssi = rssi;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public int getMajor() {
|
return major;
|
}
|
|
public void setMajor(int major) {
|
this.major = major;
|
}
|
|
public int getMinor() {
|
return minor;
|
}
|
|
public void setMinor(int minor) {
|
this.minor = minor;
|
}
|
|
public String getProximityUuid() {
|
return proximityUuid;
|
}
|
|
public void setProximityUuid(String proximityUuid) {
|
this.proximityUuid = proximityUuid;
|
}
|
|
public String getBluetoothAddress() {
|
return bluetoothAddress;
|
}
|
|
public void setBluetoothAddress(String bluetoothAddress) {
|
this.bluetoothAddress = bluetoothAddress;
|
}
|
|
public int getTxPower() {
|
return txPower;
|
}
|
|
public void setTxPower(int txPower) {
|
this.txPower = txPower;
|
}
|
|
public int getRssi() {
|
return rssi;
|
}
|
|
public void setRssi(int rssi) {
|
this.rssi = rssi;
|
}
|
|
public String getMac() {
|
return mac;
|
}
|
|
public void setMac(String mac) {
|
this.mac = mac;
|
}
|
|
public double getDistance() {
|
return distance;
|
}
|
|
public void setDistance(double distance) {
|
this.distance = distance;
|
}
|
|
@Override
|
public int hashCode() {
|
return bluetoothAddress.hashCode();
|
}
|
|
@Override
|
public boolean equals(Object obj) {
|
if (obj == null) {
|
return false;
|
}
|
|
if (getClass() != obj.getClass()) {
|
return false;
|
}
|
final BeaconModel model = (BeaconModel) obj;
|
|
return Objects.equals(getBluetoothAddress(), model.getBluetoothAddress());
|
}
|
|
|
}
|