6package com.google.ortools.graph;
11@com.google.protobuf.Generated
12public final class FlowArcProto
extends
13 com.google.protobuf.GeneratedMessage implements
16private static final long serialVersionUID = 0L;
18 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
19 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 FlowArcProto.class.getName());
27 private FlowArcProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
30 private FlowArcProto() {
34 public static final com.google.protobuf.Descriptors.Descriptor
36 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
40 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
42 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
43 .ensureFieldAccessorsInitialized(
44 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
47 private int bitField0_;
49 private long tail_ = 0L;
61 return ((bitField0_ & 0x00000001) != 0);
78 private long head_ = 0L;
85 return ((bitField0_ & 0x00000002) != 0);
97 private long capacity_ = 1L;
109 return ((bitField0_ & 0x00000004) != 0);
126 private long unitCost_ = 0L;
138 return ((bitField0_ & 0x00000008) != 0);
154 private byte memoizedIsInitialized = -1;
161 memoizedIsInitialized = 1;
166 public void writeTo(com.google.protobuf.CodedOutputStream output)
167 throws java.io.IOException {
168 if (((bitField0_ & 0x00000001) != 0)) {
169 output.writeInt64(1, tail_);
171 if (((bitField0_ & 0x00000002) != 0)) {
172 output.writeInt64(2, head_);
174 if (((bitField0_ & 0x00000004) != 0)) {
175 output.writeInt64(3, capacity_);
177 if (((bitField0_ & 0x00000008) != 0)) {
178 output.writeInt64(4, unitCost_);
180 getUnknownFields().writeTo(output);
185 int size = memoizedSize;
186 if (size != -1)
return size;
189 if (((bitField0_ & 0x00000001) != 0)) {
190 size += com.google.protobuf.CodedOutputStream
191 .computeInt64Size(1, tail_);
193 if (((bitField0_ & 0x00000002) != 0)) {
194 size += com.google.protobuf.CodedOutputStream
195 .computeInt64Size(2, head_);
197 if (((bitField0_ & 0x00000004) != 0)) {
198 size += com.google.protobuf.CodedOutputStream
199 .computeInt64Size(3, capacity_);
201 if (((bitField0_ & 0x00000008) != 0)) {
202 size += com.google.protobuf.CodedOutputStream
203 .computeInt64Size(4, unitCost_);
205 size += getUnknownFields().getSerializedSize();
211 public boolean equals(
final java.lang.Object obj) {
215 if (!(obj instanceof com.google.ortools.graph.FlowArcProto)) {
216 return super.equals(obj);
223 != other.
getTail())
return false;
228 != other.
getHead())
return false;
240 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
246 if (memoizedHashCode != 0) {
247 return memoizedHashCode;
253 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
258 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
263 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
268 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
271 hash = (29 * hash) + getUnknownFields().hashCode();
272 memoizedHashCode = hash;
277 java.nio.ByteBuffer data)
278 throws com.google.protobuf.InvalidProtocolBufferException {
279 return PARSER.parseFrom(data);
282 java.nio.ByteBuffer data,
283 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
284 throws com.google.protobuf.InvalidProtocolBufferException {
285 return PARSER.parseFrom(data, extensionRegistry);
288 com.google.protobuf.ByteString data)
289 throws com.google.protobuf.InvalidProtocolBufferException {
290 return PARSER.parseFrom(data);
293 com.google.protobuf.ByteString data,
294 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
295 throws com.google.protobuf.InvalidProtocolBufferException {
296 return PARSER.parseFrom(data, extensionRegistry);
299 throws com.google.protobuf.InvalidProtocolBufferException {
300 return PARSER.parseFrom(data);
304 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305 throws com.google.protobuf.InvalidProtocolBufferException {
306 return PARSER.parseFrom(data, extensionRegistry);
309 throws java.io.IOException {
310 return com.google.protobuf.GeneratedMessage
311 .parseWithIOException(PARSER, input);
314 java.io.InputStream input,
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws java.io.IOException {
317 return com.google.protobuf.GeneratedMessage
318 .parseWithIOException(PARSER, input, extensionRegistry);
322 throws java.io.IOException {
323 return com.google.protobuf.GeneratedMessage
324 .parseDelimitedWithIOException(PARSER, input);
328 java.io.InputStream input,
329 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
330 throws java.io.IOException {
331 return com.google.protobuf.GeneratedMessage
332 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
335 com.google.protobuf.CodedInputStream input)
336 throws java.io.IOException {
337 return com.google.protobuf.GeneratedMessage
338 .parseWithIOException(PARSER, input);
341 com.google.protobuf.CodedInputStream input,
342 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
343 throws java.io.IOException {
344 return com.google.protobuf.GeneratedMessage
345 .parseWithIOException(PARSER, input, extensionRegistry);
351 return DEFAULT_INSTANCE.toBuilder();
354 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
358 return this == DEFAULT_INSTANCE
364 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
371 public static final class Builder
extends
372 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
375 public static final com.google.protobuf.Descriptors.Descriptor
377 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
381 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
383 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
384 .ensureFieldAccessorsInitialized(
385 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
394 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
410 public com.google.protobuf.Descriptors.Descriptor
412 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
417 return com.google.ortools.graph.FlowArcProto.getDefaultInstance();
424 throw newUninitializedMessageException(result);
432 if (bitField0_ != 0) { buildPartial0(result); }
437 private void buildPartial0(com.google.ortools.graph.FlowArcProto result) {
438 int from_bitField0_ = bitField0_;
439 int to_bitField0_ = 0;
440 if (((from_bitField0_ & 0x00000001) != 0)) {
441 result.tail_ = tail_;
442 to_bitField0_ |= 0x00000001;
444 if (((from_bitField0_ & 0x00000002) != 0)) {
445 result.head_ = head_;
446 to_bitField0_ |= 0x00000002;
448 if (((from_bitField0_ & 0x00000004) != 0)) {
449 result.capacity_ = capacity_;
450 to_bitField0_ |= 0x00000004;
452 if (((from_bitField0_ & 0x00000008) != 0)) {
453 result.unitCost_ = unitCost_;
454 to_bitField0_ |= 0x00000008;
456 result.bitField0_ |= to_bitField0_;
460 public Builder
mergeFrom(com.google.protobuf.Message other) {
461 if (other instanceof com.google.ortools.graph.FlowArcProto) {
462 return mergeFrom((com.google.ortools.graph.FlowArcProto)other);
464 super.mergeFrom(other);
469 public Builder
mergeFrom(com.google.ortools.graph.FlowArcProto other) {
470 if (other == com.google.ortools.graph.FlowArcProto.getDefaultInstance())
return this;
471 if (other.hasTail()) {
474 if (other.hasHead()) {
477 if (other.hasCapacity()) {
480 if (other.hasUnitCost()) {
483 this.mergeUnknownFields(other.getUnknownFields());
495 com.google.protobuf.CodedInputStream input,
496 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
497 throws java.io.IOException {
498 if (extensionRegistry ==
null) {
499 throw new java.lang.NullPointerException();
502 boolean done =
false;
504 int tag = input.readTag();
510 tail_ = input.readInt64();
511 bitField0_ |= 0x00000001;
515 head_ = input.readInt64();
516 bitField0_ |= 0x00000002;
520 capacity_ = input.readInt64();
521 bitField0_ |= 0x00000004;
525 unitCost_ = input.readInt64();
526 bitField0_ |= 0x00000008;
530 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
537 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
538 throw e.unwrapIOException();
544 private int bitField0_;
558 return ((bitField0_ & 0x00000001) != 0);
586 bitField0_ |= 0x00000001;
600 bitField0_ = (bitField0_ & ~0x00000001);
613 return ((bitField0_ & 0x00000002) != 0);
631 bitField0_ |= 0x00000002;
640 bitField0_ = (bitField0_ & ~0x00000002);
646 private long capacity_ = 1L;
658 return ((bitField0_ & 0x00000004) != 0);
686 bitField0_ |= 0x00000004;
700 bitField0_ = (bitField0_ & ~0x00000004);
706 private long unitCost_ ;
718 return ((bitField0_ & 0x00000008) != 0);
746 bitField0_ |= 0x00000008;
760 bitField0_ = (bitField0_ & ~0x00000008);
772 DEFAULT_INSTANCE =
new com.google.ortools.graph.FlowArcProto();
776 return DEFAULT_INSTANCE;
779 private static final com.google.protobuf.Parser<
FlowArcProto>
780 PARSER =
new com.google.protobuf.AbstractParser<
FlowArcProto>() {
783 com.google.protobuf.CodedInputStream input,
784 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
785 throws com.google.protobuf.InvalidProtocolBufferException {
788 builder.mergeFrom(input, extensionRegistry);
789 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
790 throw e.setUnfinishedMessage(builder.buildPartial());
791 }
catch (com.google.protobuf.UninitializedMessageException e) {
792 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
793 }
catch (java.io.IOException e) {
794 throw new com.google.protobuf.InvalidProtocolBufferException(e)
795 .setUnfinishedMessage(builder.buildPartial());
797 return builder.buildPartial();
801 public static com.google.protobuf.Parser<FlowArcProto>
parser() {
812 return DEFAULT_INSTANCE;