Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
RoutesConstraintProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/sat/cp_model.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.sat;
6
33public final class RoutesConstraintProto extends
34 com.google.protobuf.GeneratedMessage implements
35 // @@protoc_insertion_point(message_implements:operations_research.sat.RoutesConstraintProto)
37private static final long serialVersionUID = 0L;
38 static {
39 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
40 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
41 /* major= */ 4,
42 /* minor= */ 26,
43 /* patch= */ 1,
44 /* suffix= */ "",
45 RoutesConstraintProto.class.getName());
46 }
47 // Use RoutesConstraintProto.newBuilder() to construct.
48 private RoutesConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
49 super(builder);
50 }
51 private RoutesConstraintProto() {
52 tails_ = emptyIntList();
53 heads_ = emptyIntList();
54 literals_ = emptyIntList();
55 demands_ = emptyIntList();
56 }
57
58 public static final com.google.protobuf.Descriptors.Descriptor
60 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_RoutesConstraintProto_descriptor;
61 }
62
63 @java.lang.Override
64 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
66 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_RoutesConstraintProto_fieldAccessorTable
67 .ensureFieldAccessorsInitialized(
68 com.google.ortools.sat.RoutesConstraintProto.class, com.google.ortools.sat.RoutesConstraintProto.Builder.class);
69 }
70
71 public static final int TAILS_FIELD_NUMBER = 1;
72 @SuppressWarnings("serial")
73 private com.google.protobuf.Internal.IntList tails_ =
74 emptyIntList();
79 @java.lang.Override
80 public java.util.List<java.lang.Integer>
82 return tails_;
83 }
88 public int getTailsCount() {
89 return tails_.size();
90 }
96 public int getTails(int index) {
97 return tails_.getInt(index);
98 }
99 private int tailsMemoizedSerializedSize = -1;
100
101 public static final int HEADS_FIELD_NUMBER = 2;
102 @SuppressWarnings("serial")
103 private com.google.protobuf.Internal.IntList heads_ =
104 emptyIntList();
109 @java.lang.Override
110 public java.util.List<java.lang.Integer>
112 return heads_;
113 }
118 public int getHeadsCount() {
119 return heads_.size();
120 }
126 public int getHeads(int index) {
127 return heads_.getInt(index);
128 }
129 private int headsMemoizedSerializedSize = -1;
130
131 public static final int LITERALS_FIELD_NUMBER = 3;
132 @SuppressWarnings("serial")
133 private com.google.protobuf.Internal.IntList literals_ =
134 emptyIntList();
139 @java.lang.Override
140 public java.util.List<java.lang.Integer>
142 return literals_;
143 }
148 public int getLiteralsCount() {
149 return literals_.size();
150 }
156 public int getLiterals(int index) {
157 return literals_.getInt(index);
158 }
159 private int literalsMemoizedSerializedSize = -1;
160
161 public static final int DEMANDS_FIELD_NUMBER = 4;
162 @SuppressWarnings("serial")
163 private com.google.protobuf.Internal.IntList demands_ =
164 emptyIntList();
181 @java.lang.Override
182 public java.util.List<java.lang.Integer>
184 return demands_;
185 }
202 public int getDemandsCount() {
203 return demands_.size();
204 }
222 public int getDemands(int index) {
223 return demands_.getInt(index);
224 }
225 private int demandsMemoizedSerializedSize = -1;
226
227 public static final int CAPACITY_FIELD_NUMBER = 5;
228 private long capacity_ = 0L;
233 @java.lang.Override
234 public long getCapacity() {
235 return capacity_;
236 }
237
238 private byte memoizedIsInitialized = -1;
239 @java.lang.Override
240 public final boolean isInitialized() {
241 byte isInitialized = memoizedIsInitialized;
242 if (isInitialized == 1) return true;
243 if (isInitialized == 0) return false;
244
245 memoizedIsInitialized = 1;
246 return true;
247 }
248
249 @java.lang.Override
250 public void writeTo(com.google.protobuf.CodedOutputStream output)
251 throws java.io.IOException {
253 if (getTailsList().size() > 0) {
254 output.writeUInt32NoTag(10);
255 output.writeUInt32NoTag(tailsMemoizedSerializedSize);
256 }
257 for (int i = 0; i < tails_.size(); i++) {
258 output.writeInt32NoTag(tails_.getInt(i));
259 }
260 if (getHeadsList().size() > 0) {
261 output.writeUInt32NoTag(18);
262 output.writeUInt32NoTag(headsMemoizedSerializedSize);
263 }
264 for (int i = 0; i < heads_.size(); i++) {
265 output.writeInt32NoTag(heads_.getInt(i));
266 }
267 if (getLiteralsList().size() > 0) {
268 output.writeUInt32NoTag(26);
269 output.writeUInt32NoTag(literalsMemoizedSerializedSize);
270 }
271 for (int i = 0; i < literals_.size(); i++) {
272 output.writeInt32NoTag(literals_.getInt(i));
273 }
274 if (getDemandsList().size() > 0) {
275 output.writeUInt32NoTag(34);
276 output.writeUInt32NoTag(demandsMemoizedSerializedSize);
277 }
278 for (int i = 0; i < demands_.size(); i++) {
279 output.writeInt32NoTag(demands_.getInt(i));
280 }
281 if (capacity_ != 0L) {
282 output.writeInt64(5, capacity_);
283 }
284 getUnknownFields().writeTo(output);
285 }
286
287 @java.lang.Override
288 public int getSerializedSize() {
289 int size = memoizedSize;
290 if (size != -1) return size;
291
292 size = 0;
293 {
294 int dataSize = 0;
295 for (int i = 0; i < tails_.size(); i++) {
296 dataSize += com.google.protobuf.CodedOutputStream
297 .computeInt32SizeNoTag(tails_.getInt(i));
298 }
299 size += dataSize;
300 if (!getTailsList().isEmpty()) {
301 size += 1;
302 size += com.google.protobuf.CodedOutputStream
303 .computeInt32SizeNoTag(dataSize);
304 }
305 tailsMemoizedSerializedSize = dataSize;
306 }
307 {
308 int dataSize = 0;
309 for (int i = 0; i < heads_.size(); i++) {
310 dataSize += com.google.protobuf.CodedOutputStream
311 .computeInt32SizeNoTag(heads_.getInt(i));
312 }
313 size += dataSize;
314 if (!getHeadsList().isEmpty()) {
315 size += 1;
316 size += com.google.protobuf.CodedOutputStream
317 .computeInt32SizeNoTag(dataSize);
318 }
319 headsMemoizedSerializedSize = dataSize;
320 }
321 {
322 int dataSize = 0;
323 for (int i = 0; i < literals_.size(); i++) {
324 dataSize += com.google.protobuf.CodedOutputStream
325 .computeInt32SizeNoTag(literals_.getInt(i));
326 }
327 size += dataSize;
328 if (!getLiteralsList().isEmpty()) {
329 size += 1;
330 size += com.google.protobuf.CodedOutputStream
331 .computeInt32SizeNoTag(dataSize);
332 }
333 literalsMemoizedSerializedSize = dataSize;
334 }
335 {
336 int dataSize = 0;
337 for (int i = 0; i < demands_.size(); i++) {
338 dataSize += com.google.protobuf.CodedOutputStream
339 .computeInt32SizeNoTag(demands_.getInt(i));
340 }
341 size += dataSize;
342 if (!getDemandsList().isEmpty()) {
343 size += 1;
344 size += com.google.protobuf.CodedOutputStream
345 .computeInt32SizeNoTag(dataSize);
346 }
347 demandsMemoizedSerializedSize = dataSize;
348 }
349 if (capacity_ != 0L) {
350 size += com.google.protobuf.CodedOutputStream
351 .computeInt64Size(5, capacity_);
352 }
353 size += getUnknownFields().getSerializedSize();
354 memoizedSize = size;
355 return size;
356 }
357
358 @java.lang.Override
359 public boolean equals(final java.lang.Object obj) {
360 if (obj == this) {
361 return true;
362 }
363 if (!(obj instanceof com.google.ortools.sat.RoutesConstraintProto)) {
364 return super.equals(obj);
365 }
366 com.google.ortools.sat.RoutesConstraintProto other = (com.google.ortools.sat.RoutesConstraintProto) obj;
367
368 if (!getTailsList()
369 .equals(other.getTailsList())) return false;
370 if (!getHeadsList()
371 .equals(other.getHeadsList())) return false;
372 if (!getLiteralsList()
373 .equals(other.getLiteralsList())) return false;
374 if (!getDemandsList()
375 .equals(other.getDemandsList())) return false;
376 if (getCapacity()
377 != other.getCapacity()) return false;
378 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
379 return true;
380 }
381
382 @java.lang.Override
383 public int hashCode() {
384 if (memoizedHashCode != 0) {
385 return memoizedHashCode;
386 }
387 int hash = 41;
388 hash = (19 * hash) + getDescriptor().hashCode();
389 if (getTailsCount() > 0) {
390 hash = (37 * hash) + TAILS_FIELD_NUMBER;
391 hash = (53 * hash) + getTailsList().hashCode();
392 }
393 if (getHeadsCount() > 0) {
394 hash = (37 * hash) + HEADS_FIELD_NUMBER;
395 hash = (53 * hash) + getHeadsList().hashCode();
396 }
397 if (getLiteralsCount() > 0) {
398 hash = (37 * hash) + LITERALS_FIELD_NUMBER;
399 hash = (53 * hash) + getLiteralsList().hashCode();
400 }
401 if (getDemandsCount() > 0) {
402 hash = (37 * hash) + DEMANDS_FIELD_NUMBER;
403 hash = (53 * hash) + getDemandsList().hashCode();
404 }
405 hash = (37 * hash) + CAPACITY_FIELD_NUMBER;
406 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
407 getCapacity());
408 hash = (29 * hash) + getUnknownFields().hashCode();
409 memoizedHashCode = hash;
410 return hash;
411 }
412
414 java.nio.ByteBuffer data)
415 throws com.google.protobuf.InvalidProtocolBufferException {
416 return PARSER.parseFrom(data);
417 }
419 java.nio.ByteBuffer data,
420 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
421 throws com.google.protobuf.InvalidProtocolBufferException {
422 return PARSER.parseFrom(data, extensionRegistry);
423 }
425 com.google.protobuf.ByteString data)
426 throws com.google.protobuf.InvalidProtocolBufferException {
427 return PARSER.parseFrom(data);
428 }
430 com.google.protobuf.ByteString data,
431 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
432 throws com.google.protobuf.InvalidProtocolBufferException {
433 return PARSER.parseFrom(data, extensionRegistry);
434 }
436 throws com.google.protobuf.InvalidProtocolBufferException {
437 return PARSER.parseFrom(data);
438 }
440 byte[] data,
441 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
442 throws com.google.protobuf.InvalidProtocolBufferException {
443 return PARSER.parseFrom(data, extensionRegistry);
444 }
445 public static com.google.ortools.sat.RoutesConstraintProto parseFrom(java.io.InputStream input)
446 throws java.io.IOException {
447 return com.google.protobuf.GeneratedMessage
448 .parseWithIOException(PARSER, input);
449 }
451 java.io.InputStream input,
452 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
453 throws java.io.IOException {
454 return com.google.protobuf.GeneratedMessage
455 .parseWithIOException(PARSER, input, extensionRegistry);
456 }
457
459 throws java.io.IOException {
460 return com.google.protobuf.GeneratedMessage
461 .parseDelimitedWithIOException(PARSER, input);
462 }
463
465 java.io.InputStream input,
466 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
467 throws java.io.IOException {
468 return com.google.protobuf.GeneratedMessage
469 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
470 }
472 com.google.protobuf.CodedInputStream input)
473 throws java.io.IOException {
474 return com.google.protobuf.GeneratedMessage
475 .parseWithIOException(PARSER, input);
476 }
478 com.google.protobuf.CodedInputStream input,
479 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
480 throws java.io.IOException {
481 return com.google.protobuf.GeneratedMessage
482 .parseWithIOException(PARSER, input, extensionRegistry);
483 }
484
485 @java.lang.Override
486 public Builder newBuilderForType() { return newBuilder(); }
487 public static Builder newBuilder() {
488 return DEFAULT_INSTANCE.toBuilder();
489 }
490 public static Builder newBuilder(com.google.ortools.sat.RoutesConstraintProto prototype) {
491 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
492 }
493 @java.lang.Override
495 return this == DEFAULT_INSTANCE
496 ? new Builder() : new Builder().mergeFrom(this);
497 }
498
499 @java.lang.Override
501 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
502 Builder builder = new Builder(parent);
503 return builder;
504 }
531 public static final class Builder extends
532 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
533 // @@protoc_insertion_point(builder_implements:operations_research.sat.RoutesConstraintProto)
534 com.google.ortools.sat.RoutesConstraintProtoOrBuilder {
535 public static final com.google.protobuf.Descriptors.Descriptor
537 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_RoutesConstraintProto_descriptor;
538 }
539
540 @java.lang.Override
541 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
543 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_RoutesConstraintProto_fieldAccessorTable
544 .ensureFieldAccessorsInitialized(
545 com.google.ortools.sat.RoutesConstraintProto.class, com.google.ortools.sat.RoutesConstraintProto.Builder.class);
546 }
547
548 // Construct using com.google.ortools.sat.RoutesConstraintProto.newBuilder()
549 private Builder() {
550
551 }
552
553 private Builder(
554 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
555 super(parent);
556
557 }
558 @java.lang.Override
559 public Builder clear() {
560 super.clear();
561 bitField0_ = 0;
562 tails_ = emptyIntList();
563 heads_ = emptyIntList();
564 literals_ = emptyIntList();
565 demands_ = emptyIntList();
566 capacity_ = 0L;
567 return this;
568 }
569
570 @java.lang.Override
571 public com.google.protobuf.Descriptors.Descriptor
573 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_RoutesConstraintProto_descriptor;
574 }
575
576 @java.lang.Override
578 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
579 }
580
581 @java.lang.Override
584 if (!result.isInitialized()) {
585 throw newUninitializedMessageException(result);
586 }
587 return result;
588 }
589
590 @java.lang.Override
592 com.google.ortools.sat.RoutesConstraintProto result = new com.google.ortools.sat.RoutesConstraintProto(this);
593 if (bitField0_ != 0) { buildPartial0(result); }
594 onBuilt();
595 return result;
596 }
597
598 private void buildPartial0(com.google.ortools.sat.RoutesConstraintProto result) {
599 int from_bitField0_ = bitField0_;
600 if (((from_bitField0_ & 0x00000001) != 0)) {
601 tails_.makeImmutable();
602 result.tails_ = tails_;
603 }
604 if (((from_bitField0_ & 0x00000002) != 0)) {
605 heads_.makeImmutable();
606 result.heads_ = heads_;
607 }
608 if (((from_bitField0_ & 0x00000004) != 0)) {
609 literals_.makeImmutable();
610 result.literals_ = literals_;
611 }
612 if (((from_bitField0_ & 0x00000008) != 0)) {
613 demands_.makeImmutable();
614 result.demands_ = demands_;
615 }
616 if (((from_bitField0_ & 0x00000010) != 0)) {
617 result.capacity_ = capacity_;
618 }
619 }
620
621 @java.lang.Override
622 public Builder mergeFrom(com.google.protobuf.Message other) {
623 if (other instanceof com.google.ortools.sat.RoutesConstraintProto) {
624 return mergeFrom((com.google.ortools.sat.RoutesConstraintProto)other);
625 } else {
626 super.mergeFrom(other);
627 return this;
628 }
629 }
630
631 public Builder mergeFrom(com.google.ortools.sat.RoutesConstraintProto other) {
632 if (other == com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance()) return this;
633 if (!other.tails_.isEmpty()) {
634 if (tails_.isEmpty()) {
635 tails_ = other.tails_;
636 tails_.makeImmutable();
637 bitField0_ |= 0x00000001;
638 } else {
639 ensureTailsIsMutable();
640 tails_.addAll(other.tails_);
641 }
642 onChanged();
643 }
644 if (!other.heads_.isEmpty()) {
645 if (heads_.isEmpty()) {
646 heads_ = other.heads_;
647 heads_.makeImmutable();
648 bitField0_ |= 0x00000002;
649 } else {
650 ensureHeadsIsMutable();
651 heads_.addAll(other.heads_);
652 }
653 onChanged();
654 }
655 if (!other.literals_.isEmpty()) {
656 if (literals_.isEmpty()) {
657 literals_ = other.literals_;
658 literals_.makeImmutable();
659 bitField0_ |= 0x00000004;
660 } else {
661 ensureLiteralsIsMutable();
662 literals_.addAll(other.literals_);
663 }
664 onChanged();
665 }
666 if (!other.demands_.isEmpty()) {
667 if (demands_.isEmpty()) {
668 demands_ = other.demands_;
669 demands_.makeImmutable();
670 bitField0_ |= 0x00000008;
671 } else {
672 ensureDemandsIsMutable();
673 demands_.addAll(other.demands_);
674 }
675 onChanged();
676 }
677 if (other.getCapacity() != 0L) {
678 setCapacity(other.getCapacity());
679 }
680 this.mergeUnknownFields(other.getUnknownFields());
681 onChanged();
682 return this;
683 }
684
685 @java.lang.Override
686 public final boolean isInitialized() {
687 return true;
688 }
689
690 @java.lang.Override
692 com.google.protobuf.CodedInputStream input,
693 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
694 throws java.io.IOException {
695 if (extensionRegistry == null) {
696 throw new java.lang.NullPointerException();
697 }
698 try {
699 boolean done = false;
700 while (!done) {
701 int tag = input.readTag();
702 switch (tag) {
703 case 0:
704 done = true;
705 break;
706 case 8: {
707 int v = input.readInt32();
708 ensureTailsIsMutable();
709 tails_.addInt(v);
710 break;
711 } // case 8
712 case 10: {
713 int length = input.readRawVarint32();
714 int limit = input.pushLimit(length);
715 ensureTailsIsMutable();
716 while (input.getBytesUntilLimit() > 0) {
717 tails_.addInt(input.readInt32());
718 }
719 input.popLimit(limit);
720 break;
721 } // case 10
722 case 16: {
723 int v = input.readInt32();
724 ensureHeadsIsMutable();
725 heads_.addInt(v);
726 break;
727 } // case 16
728 case 18: {
729 int length = input.readRawVarint32();
730 int limit = input.pushLimit(length);
731 ensureHeadsIsMutable();
732 while (input.getBytesUntilLimit() > 0) {
733 heads_.addInt(input.readInt32());
734 }
735 input.popLimit(limit);
736 break;
737 } // case 18
738 case 24: {
739 int v = input.readInt32();
740 ensureLiteralsIsMutable();
741 literals_.addInt(v);
742 break;
743 } // case 24
744 case 26: {
745 int length = input.readRawVarint32();
746 int limit = input.pushLimit(length);
747 ensureLiteralsIsMutable();
748 while (input.getBytesUntilLimit() > 0) {
749 literals_.addInt(input.readInt32());
750 }
751 input.popLimit(limit);
752 break;
753 } // case 26
754 case 32: {
755 int v = input.readInt32();
756 ensureDemandsIsMutable();
757 demands_.addInt(v);
758 break;
759 } // case 32
760 case 34: {
761 int length = input.readRawVarint32();
762 int limit = input.pushLimit(length);
763 ensureDemandsIsMutable();
764 while (input.getBytesUntilLimit() > 0) {
765 demands_.addInt(input.readInt32());
766 }
767 input.popLimit(limit);
768 break;
769 } // case 34
770 case 40: {
771 capacity_ = input.readInt64();
772 bitField0_ |= 0x00000010;
773 break;
774 } // case 40
775 default: {
776 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
777 done = true; // was an endgroup tag
778 }
779 break;
780 } // default:
781 } // switch (tag)
782 } // while (!done)
783 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
784 throw e.unwrapIOException();
785 } finally {
786 onChanged();
787 } // finally
788 return this;
789 }
790 private int bitField0_;
791
792 private com.google.protobuf.Internal.IntList tails_ = emptyIntList();
793 private void ensureTailsIsMutable() {
794 if (!tails_.isModifiable()) {
795 tails_ = makeMutableCopy(tails_);
796 }
797 bitField0_ |= 0x00000001;
798 }
803 public java.util.List<java.lang.Integer>
805 tails_.makeImmutable();
806 return tails_;
807 }
812 public int getTailsCount() {
813 return tails_.size();
814 }
820 public int getTails(int index) {
821 return tails_.getInt(index);
822 }
830 int index, int value) {
831
832 ensureTailsIsMutable();
833 tails_.setInt(index, value);
834 bitField0_ |= 0x00000001;
835 onChanged();
836 return this;
837 }
843 public Builder addTails(int value) {
844
845 ensureTailsIsMutable();
846 tails_.addInt(value);
847 bitField0_ |= 0x00000001;
848 onChanged();
849 return this;
850 }
857 java.lang.Iterable<? extends java.lang.Integer> values) {
858 ensureTailsIsMutable();
859 com.google.protobuf.AbstractMessageLite.Builder.addAll(
860 values, tails_);
861 bitField0_ |= 0x00000001;
862 onChanged();
863 return this;
864 }
870 tails_ = emptyIntList();
871 bitField0_ = (bitField0_ & ~0x00000001);
872 onChanged();
873 return this;
874 }
875
876 private com.google.protobuf.Internal.IntList heads_ = emptyIntList();
877 private void ensureHeadsIsMutable() {
878 if (!heads_.isModifiable()) {
879 heads_ = makeMutableCopy(heads_);
880 }
881 bitField0_ |= 0x00000002;
882 }
887 public java.util.List<java.lang.Integer>
889 heads_.makeImmutable();
890 return heads_;
891 }
896 public int getHeadsCount() {
897 return heads_.size();
898 }
904 public int getHeads(int index) {
905 return heads_.getInt(index);
906 }
914 int index, int value) {
915
916 ensureHeadsIsMutable();
917 heads_.setInt(index, value);
918 bitField0_ |= 0x00000002;
919 onChanged();
920 return this;
921 }
927 public Builder addHeads(int value) {
928
929 ensureHeadsIsMutable();
930 heads_.addInt(value);
931 bitField0_ |= 0x00000002;
932 onChanged();
933 return this;
934 }
941 java.lang.Iterable<? extends java.lang.Integer> values) {
942 ensureHeadsIsMutable();
943 com.google.protobuf.AbstractMessageLite.Builder.addAll(
944 values, heads_);
945 bitField0_ |= 0x00000002;
946 onChanged();
947 return this;
948 }
954 heads_ = emptyIntList();
955 bitField0_ = (bitField0_ & ~0x00000002);
956 onChanged();
957 return this;
958 }
959
960 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
961 private void ensureLiteralsIsMutable() {
962 if (!literals_.isModifiable()) {
963 literals_ = makeMutableCopy(literals_);
964 }
965 bitField0_ |= 0x00000004;
966 }
971 public java.util.List<java.lang.Integer>
973 literals_.makeImmutable();
974 return literals_;
975 }
980 public int getLiteralsCount() {
981 return literals_.size();
982 }
988 public int getLiterals(int index) {
989 return literals_.getInt(index);
990 }
998 int index, int value) {
999
1000 ensureLiteralsIsMutable();
1001 literals_.setInt(index, value);
1002 bitField0_ |= 0x00000004;
1003 onChanged();
1004 return this;
1005 }
1011 public Builder addLiterals(int value) {
1012
1013 ensureLiteralsIsMutable();
1014 literals_.addInt(value);
1015 bitField0_ |= 0x00000004;
1016 onChanged();
1017 return this;
1018 }
1025 java.lang.Iterable<? extends java.lang.Integer> values) {
1026 ensureLiteralsIsMutable();
1027 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1028 values, literals_);
1029 bitField0_ |= 0x00000004;
1030 onChanged();
1031 return this;
1032 }
1038 literals_ = emptyIntList();
1039 bitField0_ = (bitField0_ & ~0x00000004);
1040 onChanged();
1041 return this;
1042 }
1043
1044 private com.google.protobuf.Internal.IntList demands_ = emptyIntList();
1045 private void ensureDemandsIsMutable() {
1046 if (!demands_.isModifiable()) {
1047 demands_ = makeMutableCopy(demands_);
1048 }
1049 bitField0_ |= 0x00000008;
1050 }
1067 public java.util.List<java.lang.Integer>
1069 demands_.makeImmutable();
1070 return demands_;
1071 }
1088 public int getDemandsCount() {
1089 return demands_.size();
1090 }
1108 public int getDemands(int index) {
1109 return demands_.getInt(index);
1110 }
1130 int index, int value) {
1131
1132 ensureDemandsIsMutable();
1133 demands_.setInt(index, value);
1134 bitField0_ |= 0x00000008;
1135 onChanged();
1136 return this;
1137 }
1155 public Builder addDemands(int value) {
1156
1157 ensureDemandsIsMutable();
1158 demands_.addInt(value);
1159 bitField0_ |= 0x00000008;
1160 onChanged();
1161 return this;
1162 }
1181 java.lang.Iterable<? extends java.lang.Integer> values) {
1182 ensureDemandsIsMutable();
1183 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1184 values, demands_);
1185 bitField0_ |= 0x00000008;
1186 onChanged();
1187 return this;
1188 }
1206 demands_ = emptyIntList();
1207 bitField0_ = (bitField0_ & ~0x00000008);
1208 onChanged();
1209 return this;
1210 }
1211
1212 private long capacity_ ;
1217 @java.lang.Override
1218 public long getCapacity() {
1219 return capacity_;
1220 }
1226 public Builder setCapacity(long value) {
1227
1228 capacity_ = value;
1229 bitField0_ |= 0x00000010;
1230 onChanged();
1231 return this;
1232 }
1238 bitField0_ = (bitField0_ & ~0x00000010);
1239 capacity_ = 0L;
1240 onChanged();
1241 return this;
1242 }
1243
1244 // @@protoc_insertion_point(builder_scope:operations_research.sat.RoutesConstraintProto)
1245 }
1246
1247 // @@protoc_insertion_point(class_scope:operations_research.sat.RoutesConstraintProto)
1248 private static final com.google.ortools.sat.RoutesConstraintProto DEFAULT_INSTANCE;
1249 static {
1250 DEFAULT_INSTANCE = new com.google.ortools.sat.RoutesConstraintProto();
1251 }
1252
1254 return DEFAULT_INSTANCE;
1255 }
1256
1257 private static final com.google.protobuf.Parser<RoutesConstraintProto>
1258 PARSER = new com.google.protobuf.AbstractParser<RoutesConstraintProto>() {
1259 @java.lang.Override
1260 public RoutesConstraintProto parsePartialFrom(
1261 com.google.protobuf.CodedInputStream input,
1262 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1263 throws com.google.protobuf.InvalidProtocolBufferException {
1264 Builder builder = newBuilder();
1265 try {
1266 builder.mergeFrom(input, extensionRegistry);
1267 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1268 throw e.setUnfinishedMessage(builder.buildPartial());
1269 } catch (com.google.protobuf.UninitializedMessageException e) {
1270 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1271 } catch (java.io.IOException e) {
1272 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1273 .setUnfinishedMessage(builder.buildPartial());
1274 }
1275 return builder.buildPartial();
1276 }
1277 };
1278
1279 public static com.google.protobuf.Parser<RoutesConstraintProto> parser() {
1280 return PARSER;
1281 }
1282
1283 @java.lang.Override
1284 public com.google.protobuf.Parser<RoutesConstraintProto> getParserForType() {
1285 return PARSER;
1286 }
1287
1288 @java.lang.Override
1290 return DEFAULT_INSTANCE;
1291 }
1292
1293}
1294
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.RoutesConstraintProto buildPartial()
com.google.ortools.sat.RoutesConstraintProto getDefaultInstanceForType()
Builder mergeFrom(com.google.ortools.sat.RoutesConstraintProto other)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeFrom(com.google.protobuf.Message other)
Builder addAllTails(java.lang.Iterable<? extends java.lang.Integer > values)
Builder addAllHeads(java.lang.Iterable<? extends java.lang.Integer > values)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder addAllDemands(java.lang.Iterable<? extends java.lang.Integer > values)
Builder addAllLiterals(java.lang.Iterable<? extends java.lang.Integer > values)
com.google.ortools.sat.RoutesConstraintProto build()
static com.google.ortools.sat.RoutesConstraintProto parseFrom(com.google.protobuf.ByteString data)
static com.google.protobuf.Parser< RoutesConstraintProto > parser()
static com.google.ortools.sat.RoutesConstraintProto getDefaultInstance()
static com.google.ortools.sat.RoutesConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.RoutesConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.sat.RoutesConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.RoutesConstraintProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.sat.RoutesConstraintProto parseFrom(java.nio.ByteBuffer data)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
java.util.List< java.lang.Integer > getHeadsList()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.sat.RoutesConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
java.util.List< java.lang.Integer > getLiteralsList()
static com.google.ortools.sat.RoutesConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Integer > getDemandsList()
static com.google.ortools.sat.RoutesConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.RoutesConstraintProto getDefaultInstanceForType()
static com.google.ortools.sat.RoutesConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Integer > getTailsList()
static Builder newBuilder(com.google.ortools.sat.RoutesConstraintProto prototype)
com.google.protobuf.Parser< RoutesConstraintProto > getParserForType()
static com.google.ortools.sat.RoutesConstraintProto parseFrom(java.io.InputStream input)
static com.google.ortools.sat.RoutesConstraintProto parseFrom(byte[] data)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()