package com.imcok;
public class shouji {
double size;
String cpu;
String memory;
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
shouji other = (shouji) obj;
if (cpu == null) {
if (other.cpu != null)
return false;
} else if (!cpu.equals(other.cpu))
return false;
if (memory == null) {
if (other.memory != null)
return false;
} else if (!memory.equals(other.memory))
return false;
if (Double.doubleToLongBits(size) != Double
.doubleToLongBits(other.size))
return false;
return true;
}
}
没有啊,正常比较的啊
你在前面是不是去调用了这个size