6package com.google.ortools.graph;
11public final class FlowArcProto
extends
12 com.google.protobuf.GeneratedMessage implements
15private static final long serialVersionUID = 0L;
17 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
18 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
23 FlowArcProto.class.getName());
26 private FlowArcProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
29 private FlowArcProto() {
33 public static final com.google.protobuf.Descriptors.Descriptor
35 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
39 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
41 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
42 .ensureFieldAccessorsInitialized(
43 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
46 private int bitField0_;
48 private long tail_ = 0L;
60 return ((bitField0_ & 0x00000001) != 0);
77 private long head_ = 0L;
84 return ((bitField0_ & 0x00000002) != 0);
96 private long capacity_ = 1L;
108 return ((bitField0_ & 0x00000004) != 0);
125 private long unitCost_ = 0L;
137 return ((bitField0_ & 0x00000008) != 0);
153 private byte memoizedIsInitialized = -1;
160 memoizedIsInitialized = 1;
165 public void writeTo(com.google.protobuf.CodedOutputStream output)
166 throws java.io.IOException {
167 if (((bitField0_ & 0x00000001) != 0)) {
168 output.writeInt64(1, tail_);
170 if (((bitField0_ & 0x00000002) != 0)) {
171 output.writeInt64(2, head_);
173 if (((bitField0_ & 0x00000004) != 0)) {
174 output.writeInt64(3, capacity_);
176 if (((bitField0_ & 0x00000008) != 0)) {
177 output.writeInt64(4, unitCost_);
179 getUnknownFields().writeTo(output);
184 int size = memoizedSize;
185 if (size != -1)
return size;
188 if (((bitField0_ & 0x00000001) != 0)) {
189 size += com.google.protobuf.CodedOutputStream
190 .computeInt64Size(1, tail_);
192 if (((bitField0_ & 0x00000002) != 0)) {
193 size += com.google.protobuf.CodedOutputStream
194 .computeInt64Size(2, head_);
196 if (((bitField0_ & 0x00000004) != 0)) {
197 size += com.google.protobuf.CodedOutputStream
198 .computeInt64Size(3, capacity_);
200 if (((bitField0_ & 0x00000008) != 0)) {
201 size += com.google.protobuf.CodedOutputStream
202 .computeInt64Size(4, unitCost_);
204 size += getUnknownFields().getSerializedSize();
210 public boolean equals(
final java.lang.Object obj) {
214 if (!(obj instanceof com.google.ortools.graph.FlowArcProto)) {
215 return super.equals(obj);
222 != other.
getTail())
return false;
227 != other.
getHead())
return false;
239 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
245 if (memoizedHashCode != 0) {
246 return memoizedHashCode;
252 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
257 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
262 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
267 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
270 hash = (29 * hash) + getUnknownFields().hashCode();
271 memoizedHashCode = hash;
276 java.nio.ByteBuffer data)
277 throws com.google.protobuf.InvalidProtocolBufferException {
278 return PARSER.parseFrom(data);
281 java.nio.ByteBuffer data,
282 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
283 throws com.google.protobuf.InvalidProtocolBufferException {
284 return PARSER.parseFrom(data, extensionRegistry);
287 com.google.protobuf.ByteString data)
288 throws com.google.protobuf.InvalidProtocolBufferException {
289 return PARSER.parseFrom(data);
292 com.google.protobuf.ByteString data,
293 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294 throws com.google.protobuf.InvalidProtocolBufferException {
295 return PARSER.parseFrom(data, extensionRegistry);
298 throws com.google.protobuf.InvalidProtocolBufferException {
299 return PARSER.parseFrom(data);
303 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304 throws com.google.protobuf.InvalidProtocolBufferException {
305 return PARSER.parseFrom(data, extensionRegistry);
308 throws java.io.IOException {
309 return com.google.protobuf.GeneratedMessage
310 .parseWithIOException(PARSER, input);
313 java.io.InputStream input,
314 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
315 throws java.io.IOException {
316 return com.google.protobuf.GeneratedMessage
317 .parseWithIOException(PARSER, input, extensionRegistry);
321 throws java.io.IOException {
322 return com.google.protobuf.GeneratedMessage
323 .parseDelimitedWithIOException(PARSER, input);
327 java.io.InputStream input,
328 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
329 throws java.io.IOException {
330 return com.google.protobuf.GeneratedMessage
331 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
334 com.google.protobuf.CodedInputStream input)
335 throws java.io.IOException {
336 return com.google.protobuf.GeneratedMessage
337 .parseWithIOException(PARSER, input);
340 com.google.protobuf.CodedInputStream input,
341 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
342 throws java.io.IOException {
343 return com.google.protobuf.GeneratedMessage
344 .parseWithIOException(PARSER, input, extensionRegistry);
350 return DEFAULT_INSTANCE.toBuilder();
353 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
357 return this == DEFAULT_INSTANCE
363 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
370 public static final class Builder
extends
371 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
374 public static final com.google.protobuf.Descriptors.Descriptor
376 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
380 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
382 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
383 .ensureFieldAccessorsInitialized(
384 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
393 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
409 public com.google.protobuf.Descriptors.Descriptor
411 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
416 return com.google.ortools.graph.FlowArcProto.getDefaultInstance();
423 throw newUninitializedMessageException(result);
431 if (bitField0_ != 0) { buildPartial0(result); }
436 private void buildPartial0(com.google.ortools.graph.FlowArcProto result) {
437 int from_bitField0_ = bitField0_;
438 int to_bitField0_ = 0;
439 if (((from_bitField0_ & 0x00000001) != 0)) {
440 result.tail_ = tail_;
441 to_bitField0_ |= 0x00000001;
443 if (((from_bitField0_ & 0x00000002) != 0)) {
444 result.head_ = head_;
445 to_bitField0_ |= 0x00000002;
447 if (((from_bitField0_ & 0x00000004) != 0)) {
448 result.capacity_ = capacity_;
449 to_bitField0_ |= 0x00000004;
451 if (((from_bitField0_ & 0x00000008) != 0)) {
452 result.unitCost_ = unitCost_;
453 to_bitField0_ |= 0x00000008;
455 result.bitField0_ |= to_bitField0_;
459 public Builder
mergeFrom(com.google.protobuf.Message other) {
460 if (other instanceof com.google.ortools.graph.FlowArcProto) {
461 return mergeFrom((com.google.ortools.graph.FlowArcProto)other);
463 super.mergeFrom(other);
468 public Builder
mergeFrom(com.google.ortools.graph.FlowArcProto other) {
469 if (other == com.google.ortools.graph.FlowArcProto.getDefaultInstance())
return this;
470 if (other.hasTail()) {
473 if (other.hasHead()) {
476 if (other.hasCapacity()) {
479 if (other.hasUnitCost()) {
482 this.mergeUnknownFields(other.getUnknownFields());
494 com.google.protobuf.CodedInputStream input,
495 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
496 throws java.io.IOException {
497 if (extensionRegistry ==
null) {
498 throw new java.lang.NullPointerException();
501 boolean done =
false;
503 int tag = input.readTag();
509 tail_ = input.readInt64();
510 bitField0_ |= 0x00000001;
514 head_ = input.readInt64();
515 bitField0_ |= 0x00000002;
519 capacity_ = input.readInt64();
520 bitField0_ |= 0x00000004;
524 unitCost_ = input.readInt64();
525 bitField0_ |= 0x00000008;
529 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
536 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
537 throw e.unwrapIOException();
543 private int bitField0_;
557 return ((bitField0_ & 0x00000001) != 0);
585 bitField0_ |= 0x00000001;
599 bitField0_ = (bitField0_ & ~0x00000001);
612 return ((bitField0_ & 0x00000002) != 0);
630 bitField0_ |= 0x00000002;
639 bitField0_ = (bitField0_ & ~0x00000002);
645 private long capacity_ = 1L;
657 return ((bitField0_ & 0x00000004) != 0);
685 bitField0_ |= 0x00000004;
699 bitField0_ = (bitField0_ & ~0x00000004);
705 private long unitCost_ ;
717 return ((bitField0_ & 0x00000008) != 0);
745 bitField0_ |= 0x00000008;
759 bitField0_ = (bitField0_ & ~0x00000008);
771 DEFAULT_INSTANCE =
new com.google.ortools.graph.FlowArcProto();
775 return DEFAULT_INSTANCE;
778 private static final com.google.protobuf.Parser<
FlowArcProto>
779 PARSER =
new com.google.protobuf.AbstractParser<
FlowArcProto>() {
782 com.google.protobuf.CodedInputStream input,
783 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
784 throws com.google.protobuf.InvalidProtocolBufferException {
787 builder.mergeFrom(input, extensionRegistry);
788 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
789 throw e.setUnfinishedMessage(builder.buildPartial());
790 }
catch (com.google.protobuf.UninitializedMessageException e) {
791 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
792 }
catch (java.io.IOException e) {
793 throw new com.google.protobuf.InvalidProtocolBufferException(e)
794 .setUnfinishedMessage(builder.buildPartial());
796 return builder.buildPartial();
800 public static com.google.protobuf.Parser<FlowArcProto>
parser() {
811 return DEFAULT_INSTANCE;