int h = hash;
if (h == 0) {
int off = offset;
char val[] = value;
int len = count;
}
hash = h;
}
return h;
}
{
private String deviceMacAddr;
private String attribute;
private String operation;
private String value;
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((attribute == null) ? 0 : attribute.hashCode());
result = prime * result + ((deviceMacAddr == null) ? 0 : deviceMacAddr.hashCode());
result = prime * result + ((operation == null) ? 0 : operation.hashCode());
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
2. equals()不相等的兩個對象,卻並不能證明他們的hashcode()不相等。換句話說,equals()方法不相等的兩個對象,hashcode()有可能相等。