5package com.google.ortools.graph;
11 com.google.protobuf.GeneratedMessageV3 implements
14private static final long serialVersionUID = 0L;
16 private FlowArcProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
24 @SuppressWarnings({
"unused"})
26 UnusedPrivateParameter unused) {
30 public static final com.google.protobuf.Descriptors.Descriptor
32 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
36 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
38 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
39 .ensureFieldAccessorsInitialized(
40 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
43 private int bitField0_;
45 private long tail_ = 0L;
57 return ((bitField0_ & 0x00000001) != 0);
74 private long head_ = 0L;
81 return ((bitField0_ & 0x00000002) != 0);
93 private long capacity_ = 1L;
105 return ((bitField0_ & 0x00000004) != 0);
122 private long unitCost_ = 0L;
134 return ((bitField0_ & 0x00000008) != 0);
150 private byte memoizedIsInitialized = -1;
157 memoizedIsInitialized = 1;
162 public void writeTo(com.google.protobuf.CodedOutputStream output)
163 throws java.io.IOException {
164 if (((bitField0_ & 0x00000001) != 0)) {
165 output.writeInt64(1, tail_);
167 if (((bitField0_ & 0x00000002) != 0)) {
168 output.writeInt64(2, head_);
170 if (((bitField0_ & 0x00000004) != 0)) {
171 output.writeInt64(3, capacity_);
173 if (((bitField0_ & 0x00000008) != 0)) {
174 output.writeInt64(4, unitCost_);
176 getUnknownFields().writeTo(output);
181 int size = memoizedSize;
182 if (size != -1)
return size;
185 if (((bitField0_ & 0x00000001) != 0)) {
186 size += com.google.protobuf.CodedOutputStream
187 .computeInt64Size(1, tail_);
189 if (((bitField0_ & 0x00000002) != 0)) {
190 size += com.google.protobuf.CodedOutputStream
191 .computeInt64Size(2, head_);
193 if (((bitField0_ & 0x00000004) != 0)) {
194 size += com.google.protobuf.CodedOutputStream
195 .computeInt64Size(3, capacity_);
197 if (((bitField0_ & 0x00000008) != 0)) {
198 size += com.google.protobuf.CodedOutputStream
199 .computeInt64Size(4, unitCost_);
201 size += getUnknownFields().getSerializedSize();
207 public boolean equals(
final java.lang.Object obj) {
211 if (!(obj instanceof com.google.ortools.graph.FlowArcProto)) {
212 return super.equals(obj);
219 != other.
getTail())
return false;
224 != other.
getHead())
return false;
236 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
242 if (memoizedHashCode != 0) {
243 return memoizedHashCode;
249 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
254 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
259 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
264 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
267 hash = (29 * hash) + getUnknownFields().hashCode();
268 memoizedHashCode = hash;
273 java.nio.ByteBuffer data)
274 throws com.google.protobuf.InvalidProtocolBufferException {
278 java.nio.ByteBuffer data,
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws com.google.protobuf.InvalidProtocolBufferException {
284 com.google.protobuf.ByteString data)
285 throws com.google.protobuf.InvalidProtocolBufferException {
289 com.google.protobuf.ByteString data,
290 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
291 throws com.google.protobuf.InvalidProtocolBufferException {
295 throws com.google.protobuf.InvalidProtocolBufferException {
300 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
301 throws com.google.protobuf.InvalidProtocolBufferException {
305 throws java.io.IOException {
306 return com.google.protobuf.GeneratedMessageV3
307 .parseWithIOException(
PARSER, input);
310 java.io.InputStream input,
311 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
312 throws java.io.IOException {
313 return com.google.protobuf.GeneratedMessageV3
314 .parseWithIOException(
PARSER, input, extensionRegistry);
318 throws java.io.IOException {
319 return com.google.protobuf.GeneratedMessageV3
320 .parseDelimitedWithIOException(
PARSER, input);
324 java.io.InputStream input,
325 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
326 throws java.io.IOException {
327 return com.google.protobuf.GeneratedMessageV3
328 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
331 com.google.protobuf.CodedInputStream input)
332 throws java.io.IOException {
333 return com.google.protobuf.GeneratedMessageV3
334 .parseWithIOException(
PARSER, input);
337 com.google.protobuf.CodedInputStream input,
338 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
339 throws java.io.IOException {
340 return com.google.protobuf.GeneratedMessageV3
341 .parseWithIOException(
PARSER, input, extensionRegistry);
354 return this == DEFAULT_INSTANCE
360 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
368 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
371 public static final com.google.protobuf.Descriptors.Descriptor
373 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
377 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
379 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_fieldAccessorTable
380 .ensureFieldAccessorsInitialized(
381 com.google.ortools.graph.FlowArcProto.class, com.google.ortools.graph.FlowArcProto.Builder.class);
390 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
406 public com.google.protobuf.Descriptors.Descriptor
408 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowArcProto_descriptor;
413 return com.google.ortools.graph.FlowArcProto.getDefaultInstance();
420 throw newUninitializedMessageException(result);
428 if (bitField0_ != 0) { buildPartial0(result); }
433 private void buildPartial0(com.google.ortools.graph.FlowArcProto result) {
434 int from_bitField0_ = bitField0_;
435 int to_bitField0_ = 0;
436 if (((from_bitField0_ & 0x00000001) != 0)) {
437 result.tail_ = tail_;
438 to_bitField0_ |= 0x00000001;
440 if (((from_bitField0_ & 0x00000002) != 0)) {
441 result.head_ = head_;
442 to_bitField0_ |= 0x00000002;
444 if (((from_bitField0_ & 0x00000004) != 0)) {
445 result.capacity_ = capacity_;
446 to_bitField0_ |= 0x00000004;
448 if (((from_bitField0_ & 0x00000008) != 0)) {
449 result.unitCost_ = unitCost_;
450 to_bitField0_ |= 0x00000008;
452 result.bitField0_ |= to_bitField0_;
457 return super.
clone();
461 com.google.protobuf.Descriptors.FieldDescriptor field,
462 java.lang.Object value) {
463 return super.
setField(field, value);
467 com.google.protobuf.Descriptors.FieldDescriptor field) {
472 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
477 com.google.protobuf.Descriptors.FieldDescriptor field,
478 int index, java.lang.Object value) {
483 com.google.protobuf.Descriptors.FieldDescriptor field,
484 java.lang.Object value) {
489 if (other instanceof com.google.ortools.graph.FlowArcProto) {
490 return mergeFrom((com.google.ortools.graph.FlowArcProto)other);
492 super.mergeFrom(other);
498 if (other == com.google.ortools.graph.FlowArcProto.getDefaultInstance())
return this;
499 if (other.hasTail()) {
502 if (other.hasHead()) {
505 if (other.hasCapacity()) {
508 if (other.hasUnitCost()) {
523 com.google.protobuf.CodedInputStream input,
524 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
525 throws java.io.IOException {
526 if (extensionRegistry ==
null) {
527 throw new java.lang.NullPointerException();
530 boolean done =
false;
532 int tag = input.readTag();
538 tail_ = input.readInt64();
539 bitField0_ |= 0x00000001;
543 head_ = input.readInt64();
544 bitField0_ |= 0x00000002;
548 capacity_ = input.readInt64();
549 bitField0_ |= 0x00000004;
553 unitCost_ = input.readInt64();
554 bitField0_ |= 0x00000008;
558 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
565 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
566 throw e.unwrapIOException();
572 private int bitField0_;
586 return ((bitField0_ & 0x00000001) != 0);
614 bitField0_ |= 0x00000001;
628 bitField0_ = (bitField0_ & ~0x00000001);
641 return ((bitField0_ & 0x00000002) != 0);
659 bitField0_ |= 0x00000002;
668 bitField0_ = (bitField0_ & ~0x00000002);
674 private long capacity_ = 1L;
686 return ((bitField0_ & 0x00000004) != 0);
714 bitField0_ |= 0x00000004;
728 bitField0_ = (bitField0_ & ~0x00000004);
734 private long unitCost_ ;
746 return ((bitField0_ & 0x00000008) != 0);
774 bitField0_ |= 0x00000008;
788 bitField0_ = (bitField0_ & ~0x00000008);
795 final com.google.protobuf.UnknownFieldSet unknownFields) {
801 final com.google.protobuf.UnknownFieldSet unknownFields) {
812 DEFAULT_INSTANCE =
new com.google.ortools.graph.FlowArcProto();
816 return DEFAULT_INSTANCE;
819 @java.lang.Deprecated
public static final com.google.protobuf.Parser<
FlowArcProto>
823 com.google.protobuf.CodedInputStream input,
824 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
825 throws com.google.protobuf.InvalidProtocolBufferException {
828 builder.
mergeFrom(input, extensionRegistry);
829 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
831 }
catch (com.google.protobuf.UninitializedMessageException e) {
832 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
833 }
catch (java.io.IOException e) {
834 throw new com.google.protobuf.InvalidProtocolBufferException(e)
852 return DEFAULT_INSTANCE;