1. public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof EncodedResource) {
EncodedResource otherRes = (EncodedResource) obj;
return (this.resource.equals(otherRes.resource) && ObjectUtils.nullSafeEquals(this.encoding, otherRes.encoding));
}
return false;
}
if (obj == this) {
return true;
}
if (obj instanceof EncodedResource) {
EncodedResource otherRes = (EncodedResource) obj;
return (this.resource.equals(otherRes.resource) && ObjectUtils.nullSafeEquals(this.encoding, otherRes.encoding));
}
return false;
}
本文探讨了如何通过实现equals方法来比较编码资源的等效性,包括资源内容和编码方式的匹配。
1万+

被折叠的 条评论
为什么被折叠?



