5package com.google.ortools.graph;
11 com.google.protobuf.GeneratedMessage implements
14private static final long serialVersionUID = 0L;
16 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
17 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
25 private FlowArcProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 public static final com.google.protobuf.Descriptors.Descriptor
34 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
38 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
40 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
41 .ensureFieldAccessorsInitialized(
42 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
45 private int bitField0_;
47 private long tail_ = 0L;
59 return ((bitField0_ & 0x00000001) != 0);
76 private long head_ = 0L;
83 return ((bitField0_ & 0x00000002) != 0);
95 private long capacity_ = 1L;
107 return ((bitField0_ & 0x00000004) != 0);
124 private long unitCost_ = 0L;
136 return ((bitField0_ & 0x00000008) != 0);
152 private byte memoizedIsInitialized = -1;
159 memoizedIsInitialized = 1;
164 public void writeTo(com.google.protobuf.CodedOutputStream output)
165 throws java.io.IOException {
166 if (((bitField0_ & 0x00000001) != 0)) {
167 output.writeInt64(1, tail_);
169 if (((bitField0_ & 0x00000002) != 0)) {
170 output.writeInt64(2, head_);
172 if (((bitField0_ & 0x00000004) != 0)) {
173 output.writeInt64(3, capacity_);
175 if (((bitField0_ & 0x00000008) != 0)) {
176 output.writeInt64(4, unitCost_);
178 getUnknownFields().writeTo(output);
183 int size = memoizedSize;
184 if (size != -1)
return size;
187 if (((bitField0_ & 0x00000001) != 0)) {
188 size += com.google.protobuf.CodedOutputStream
189 .computeInt64Size(1, tail_);
191 if (((bitField0_ & 0x00000002) != 0)) {
192 size += com.google.protobuf.CodedOutputStream
193 .computeInt64Size(2, head_);
195 if (((bitField0_ & 0x00000004) != 0)) {
196 size += com.google.protobuf.CodedOutputStream
197 .computeInt64Size(3, capacity_);
199 if (((bitField0_ & 0x00000008) != 0)) {
200 size += com.google.protobuf.CodedOutputStream
201 .computeInt64Size(4, unitCost_);
203 size += getUnknownFields().getSerializedSize();
209 public boolean equals(
final java.lang.Object obj) {
213 if (!(obj instanceof com.google.ortools.graph.FlowArcProto)) {
214 return super.equals(obj);
221 != other.
getTail())
return false;
226 != other.
getHead())
return false;
238 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
244 if (memoizedHashCode != 0) {
245 return memoizedHashCode;
251 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
256 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
261 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
266 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
269 hash = (29 * hash) + getUnknownFields().hashCode();
270 memoizedHashCode = hash;
275 java.nio.ByteBuffer data)
276 throws com.google.protobuf.InvalidProtocolBufferException {
277 return PARSER.parseFrom(data);
280 java.nio.ByteBuffer data,
281 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
282 throws com.google.protobuf.InvalidProtocolBufferException {
283 return PARSER.parseFrom(data, extensionRegistry);
286 com.google.protobuf.ByteString data)
287 throws com.google.protobuf.InvalidProtocolBufferException {
288 return PARSER.parseFrom(data);
291 com.google.protobuf.ByteString data,
292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293 throws com.google.protobuf.InvalidProtocolBufferException {
294 return PARSER.parseFrom(data, extensionRegistry);
297 throws com.google.protobuf.InvalidProtocolBufferException {
298 return PARSER.parseFrom(data);
302 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303 throws com.google.protobuf.InvalidProtocolBufferException {
304 return PARSER.parseFrom(data, extensionRegistry);
307 throws java.io.IOException {
308 return com.google.protobuf.GeneratedMessage
309 .parseWithIOException(PARSER, input);
312 java.io.InputStream input,
313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314 throws java.io.IOException {
315 return com.google.protobuf.GeneratedMessage
316 .parseWithIOException(PARSER, input, extensionRegistry);
320 throws java.io.IOException {
321 return com.google.protobuf.GeneratedMessage
322 .parseDelimitedWithIOException(PARSER, input);
326 java.io.InputStream input,
327 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
328 throws java.io.IOException {
329 return com.google.protobuf.GeneratedMessage
330 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
333 com.google.protobuf.CodedInputStream input)
334 throws java.io.IOException {
335 return com.google.protobuf.GeneratedMessage
336 .parseWithIOException(PARSER, input);
339 com.google.protobuf.CodedInputStream input,
340 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
341 throws java.io.IOException {
342 return com.google.protobuf.GeneratedMessage
343 .parseWithIOException(PARSER, input, extensionRegistry);
356 return this == DEFAULT_INSTANCE
362 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
370 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
373 public static final com.google.protobuf.Descriptors.Descriptor
375 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
379 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
381 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
382 .ensureFieldAccessorsInitialized(
383 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
392 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
408 public com.google.protobuf.Descriptors.Descriptor
410 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
415 return com.google.ortools.graph.FlowArcProto.getDefaultInstance();
422 throw newUninitializedMessageException(result);
430 if (bitField0_ != 0) { buildPartial0(result); }
435 private void buildPartial0(com.google.ortools.graph.FlowArcProto result) {
436 int from_bitField0_ = bitField0_;
437 int to_bitField0_ = 0;
438 if (((from_bitField0_ & 0x00000001) != 0)) {
439 result.tail_ = tail_;
440 to_bitField0_ |= 0x00000001;
442 if (((from_bitField0_ & 0x00000002) != 0)) {
443 result.head_ = head_;
444 to_bitField0_ |= 0x00000002;
446 if (((from_bitField0_ & 0x00000004) != 0)) {
447 result.capacity_ = capacity_;
448 to_bitField0_ |= 0x00000004;
450 if (((from_bitField0_ & 0x00000008) != 0)) {
451 result.unitCost_ = unitCost_;
452 to_bitField0_ |= 0x00000008;
454 result.bitField0_ |= to_bitField0_;
459 if (other instanceof com.google.ortools.graph.FlowArcProto) {
460 return mergeFrom((com.google.ortools.graph.FlowArcProto)other);
462 super.mergeFrom(other);
468 if (other == com.google.ortools.graph.FlowArcProto.getDefaultInstance())
return this;
469 if (other.hasTail()) {
472 if (other.hasHead()) {
475 if (other.hasCapacity()) {
478 if (other.hasUnitCost()) {
481 this.mergeUnknownFields(other.getUnknownFields());
493 com.google.protobuf.CodedInputStream input,
494 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
495 throws java.io.IOException {
496 if (extensionRegistry ==
null) {
497 throw new java.lang.NullPointerException();
500 boolean done =
false;
502 int tag = input.readTag();
508 tail_ = input.readInt64();
509 bitField0_ |= 0x00000001;
513 head_ = input.readInt64();
514 bitField0_ |= 0x00000002;
518 capacity_ = input.readInt64();
519 bitField0_ |= 0x00000004;
523 unitCost_ = input.readInt64();
524 bitField0_ |= 0x00000008;
528 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
535 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
536 throw e.unwrapIOException();
542 private int bitField0_;
556 return ((bitField0_ & 0x00000001) != 0);
584 bitField0_ |= 0x00000001;
598 bitField0_ = (bitField0_ & ~0x00000001);
611 return ((bitField0_ & 0x00000002) != 0);
629 bitField0_ |= 0x00000002;
638 bitField0_ = (bitField0_ & ~0x00000002);
644 private long capacity_ = 1L;
656 return ((bitField0_ & 0x00000004) != 0);
684 bitField0_ |= 0x00000004;
698 bitField0_ = (bitField0_ & ~0x00000004);
704 private long unitCost_ ;
716 return ((bitField0_ & 0x00000008) != 0);
744 bitField0_ |= 0x00000008;
758 bitField0_ = (bitField0_ & ~0x00000008);
770 DEFAULT_INSTANCE =
new com.google.ortools.graph.FlowArcProto();
774 return DEFAULT_INSTANCE;
777 private static final com.google.protobuf.Parser<
FlowArcProto>
778 PARSER =
new com.google.protobuf.AbstractParser<
FlowArcProto>() {
781 com.google.protobuf.CodedInputStream input,
782 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
783 throws com.google.protobuf.InvalidProtocolBufferException {
786 builder.mergeFrom(input, extensionRegistry);
787 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
788 throw e.setUnfinishedMessage(builder.buildPartial());
789 }
catch (com.google.protobuf.UninitializedMessageException e) {
790 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
791 }
catch (java.io.IOException e) {
792 throw new com.google.protobuf.InvalidProtocolBufferException(e)
793 .setUnfinishedMessage(builder.buildPartial());
795 return builder.buildPartial();
810 return DEFAULT_INSTANCE;