private void init() { ChunkList chunkList = info.getChunkList(); int cnt = chunkList.getChunkKeyCount(); keySet = new HashSet<ChunkKey>(); keyList = new ChunkKey[cnt]; for (int i = 0; i < cnt; i++) { ChunkKey key = ChunkKey.fromString(chunkList.getChunkKey(i)); keySet.add(key); keyList[i] = key; } }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < chunkKey_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(chunkKey_.getByteString(i)); } size += dataSize; size += 1 * getChunkKeyList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder clear() { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); version_ = ""; bitField0_ = (bitField0_ & ~0x00000002); objectsTotal_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); objectsDelta_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); bytesTotal_ = 0L; bitField0_ = (bitField0_ & ~0x00000010); if (tipListBuilder_ == null) { tipList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.TipObjectList.getDefaultInstance(); } else { tipListBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); if (chunkListBuilder_ == null) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance(); } else { chunkListBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; }
if (hasChunkList()) { result = result && getChunkList() .equals(other.getChunkList());
if (hasChunkList()) { result = result && getChunkList() .equals(other.getChunkList());
public Builder clear() { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); version_ = ""; bitField0_ = (bitField0_ & ~0x00000002); objectsTotal_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); objectsDelta_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); bytesTotal_ = 0L; bitField0_ = (bitField0_ & ~0x00000010); if (tipListBuilder_ == null) { tipList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.TipObjectList.getDefaultInstance(); } else { tipListBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); if (chunkListBuilder_ == null) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance(); } else { chunkListBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; }
public Builder mergeChunkList(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList value) { if (chunkListBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && chunkList_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.newBuilder(chunkList_).mergeFrom(value).buildPartial(); } else { chunkList_ = value; } onChanged(); } else { chunkListBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; return this; } public Builder clearChunkList() {
public Builder mergeChunkList(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList value) { if (chunkListBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && chunkList_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.newBuilder(chunkList_).mergeFrom(value).buildPartial(); } else { chunkList_ = value; } onChanged(); } else { chunkListBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; return this; } public Builder clearChunkList() {
@java.lang.Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList)) { return super.equals(obj); } org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList other = (org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList) obj; boolean result = true; result = result && getChunkKeyList() .equals(other.getChunkKeyList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < chunkKey_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(chunkKey_.getByteString(i)); } size += dataSize; size += 1 * getChunkKeyList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) return this; if (!other.chunkKey_.isEmpty()) { if (chunkKey_.isEmpty()) { chunkKey_ = other.chunkKey_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureChunkKeyIsMutable(); chunkKey_.addAll(other.chunkKey_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList getDefaultInstanceForType() { return org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance(); }
@java.lang.Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList)) { return super.equals(obj); } org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList other = (org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList) obj; boolean result = true; result = result && getChunkKeyList() .equals(other.getChunkKeyList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) return this; if (!other.chunkKey_.isEmpty()) { if (chunkKey_.isEmpty()) { chunkKey_ = other.chunkKey_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureChunkKeyIsMutable(); chunkKey_.addAll(other.chunkKey_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDescriptor(); }
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList getDefaultInstanceForType() { return org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance(); }
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList buildPartial() { org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList result = new org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { chunkKey_ = new com.google.protobuf.UnmodifiableLazyStringList( chunkKey_); bitField0_ = (bitField0_ & ~0x00000001); } result.chunkKey_ = chunkKey_; onBuilt(); return result; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < chunkKey_.size(); i++) { output.writeBytes(1, chunkKey_.getByteString(i)); } getUnknownFields().writeTo(output); }
private void initFields() { name_ = ""; version_ = ""; objectsTotal_ = 0L; objectsDelta_ = 0L; bytesTotal_ = 0L; tipList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.TipObjectList.getDefaultInstance(); chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance(); } private byte memoizedIsInitialized = -1;
public Builder clearChunkList() { if (chunkListBuilder_ == null) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance(); onChanged(); } else { chunkListBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; } public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.Builder getChunkListBuilder() {