@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasBlockId()) { hash = (37 * hash) + BLOCKID_FIELD_NUMBER; hash = (53 * hash) + hashLong(getBlockId()); } if (hasGenStamp()) { hash = (37 * hash) + GENSTAMP_FIELD_NUMBER; hash = (53 * hash) + hashLong(getGenStamp()); } if (hasNumBytes()) { hash = (37 * hash) + NUMBYTES_FIELD_NUMBER; hash = (53 * hash) + hashLong(getNumBytes()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto)) { return super.equals(obj); } org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto other = (org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto) obj; boolean result = true; result = result && (hasBlockId() == other.hasBlockId()); if (hasBlockId()) { result = result && (getBlockId() == other.getBlockId()); } result = result && (hasGenStamp() == other.hasGenStamp()); if (hasGenStamp()) { result = result && (getGenStamp() == other.getGenStamp()); } result = result && (hasNumBytes() == other.hasNumBytes()); if (hasNumBytes()) { result = result && (getNumBytes() == other.getNumBytes()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public Builder mergeFrom(org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto other) { if (other == org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.BlockProto.getDefaultInstance()) return this; if (other.hasBlockId()) { setBlockId(other.getBlockId()); } if (other.hasGenStamp()) { setGenStamp(other.getGenStamp()); } if (other.hasNumBytes()) { setNumBytes(other.getNumBytes()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }