纹身 肝脏变色:hashvalue

来源:百度文库 编辑:高校问答 时间:2024/05/02 20:17:27
private int hashValue = 0;

public int hashCode()
{
if (this.hashValue == 0)
{
int result = 17;
int idValue = this.getId() == null ? 0 : this.getId().hashCode();
result = result * 37 + idValue;
this.hashValue = result;
}
return this.hashValue;
}

这个是 摘抄 代码 请问高手 这个 是 为了啥功能 写的!