Java Reference

Java Reference

AutomatonConstraintProto.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
4package com.google.ortools.sat;
5
14public final class AutomatonConstraintProto extends
15 com.google.protobuf.GeneratedMessageV3 implements
16 // @@protoc_insertion_point(message_implements:operations_research.sat.AutomatonConstraintProto)
18private static final long serialVersionUID = 0L;
19 // Use AutomatonConstraintProto.newBuilder() to construct.
20 private AutomatonConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
21 super(builder);
22 }
23 private AutomatonConstraintProto() {
24 finalStates_ = emptyLongList();
25 transitionTail_ = emptyLongList();
26 transitionHead_ = emptyLongList();
27 transitionLabel_ = emptyLongList();
28 vars_ = emptyIntList();
29 }
30
31 @java.lang.Override
32 @SuppressWarnings({"unused"})
33 protected java.lang.Object newInstance(
34 UnusedPrivateParameter unused) {
35 return new AutomatonConstraintProto();
36 }
37
38 @java.lang.Override
39 public final com.google.protobuf.UnknownFieldSet
41 return this.unknownFields;
42 }
44 com.google.protobuf.CodedInputStream input,
45 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
46 throws com.google.protobuf.InvalidProtocolBufferException {
47 this();
48 if (extensionRegistry == null) {
49 throw new java.lang.NullPointerException();
50 }
51 int mutable_bitField0_ = 0;
52 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
53 com.google.protobuf.UnknownFieldSet.newBuilder();
54 try {
55 boolean done = false;
56 while (!done) {
57 int tag = input.readTag();
58 switch (tag) {
59 case 0:
60 done = true;
61 break;
62 case 16: {
63
64 startingState_ = input.readInt64();
65 break;
66 }
67 case 24: {
68 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
69 finalStates_ = newLongList();
70 mutable_bitField0_ |= 0x00000001;
71 }
72 finalStates_.addLong(input.readInt64());
73 break;
74 }
75 case 26: {
76 int length = input.readRawVarint32();
77 int limit = input.pushLimit(length);
78 if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
79 finalStates_ = newLongList();
80 mutable_bitField0_ |= 0x00000001;
81 }
82 while (input.getBytesUntilLimit() > 0) {
83 finalStates_.addLong(input.readInt64());
84 }
85 input.popLimit(limit);
86 break;
87 }
88 case 32: {
89 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
90 transitionTail_ = newLongList();
91 mutable_bitField0_ |= 0x00000002;
92 }
93 transitionTail_.addLong(input.readInt64());
94 break;
95 }
96 case 34: {
97 int length = input.readRawVarint32();
98 int limit = input.pushLimit(length);
99 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
100 transitionTail_ = newLongList();
101 mutable_bitField0_ |= 0x00000002;
102 }
103 while (input.getBytesUntilLimit() > 0) {
104 transitionTail_.addLong(input.readInt64());
105 }
106 input.popLimit(limit);
107 break;
108 }
109 case 40: {
110 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
111 transitionHead_ = newLongList();
112 mutable_bitField0_ |= 0x00000004;
113 }
114 transitionHead_.addLong(input.readInt64());
115 break;
116 }
117 case 42: {
118 int length = input.readRawVarint32();
119 int limit = input.pushLimit(length);
120 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
121 transitionHead_ = newLongList();
122 mutable_bitField0_ |= 0x00000004;
123 }
124 while (input.getBytesUntilLimit() > 0) {
125 transitionHead_.addLong(input.readInt64());
126 }
127 input.popLimit(limit);
128 break;
129 }
130 case 48: {
131 if (!((mutable_bitField0_ & 0x00000008) != 0)) {
132 transitionLabel_ = newLongList();
133 mutable_bitField0_ |= 0x00000008;
134 }
135 transitionLabel_.addLong(input.readInt64());
136 break;
137 }
138 case 50: {
139 int length = input.readRawVarint32();
140 int limit = input.pushLimit(length);
141 if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
142 transitionLabel_ = newLongList();
143 mutable_bitField0_ |= 0x00000008;
144 }
145 while (input.getBytesUntilLimit() > 0) {
146 transitionLabel_.addLong(input.readInt64());
147 }
148 input.popLimit(limit);
149 break;
150 }
151 case 56: {
152 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
153 vars_ = newIntList();
154 mutable_bitField0_ |= 0x00000010;
155 }
156 vars_.addInt(input.readInt32());
157 break;
158 }
159 case 58: {
160 int length = input.readRawVarint32();
161 int limit = input.pushLimit(length);
162 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
163 vars_ = newIntList();
164 mutable_bitField0_ |= 0x00000010;
165 }
166 while (input.getBytesUntilLimit() > 0) {
167 vars_.addInt(input.readInt32());
168 }
169 input.popLimit(limit);
170 break;
171 }
172 default: {
173 if (!parseUnknownField(
174 input, unknownFields, extensionRegistry, tag)) {
175 done = true;
176 }
177 break;
178 }
179 }
180 }
181 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
182 throw e.setUnfinishedMessage(this);
183 } catch (java.io.IOException e) {
184 throw new com.google.protobuf.InvalidProtocolBufferException(
185 e).setUnfinishedMessage(this);
186 } finally {
187 if (((mutable_bitField0_ & 0x00000001) != 0)) {
188 finalStates_.makeImmutable(); // C
189 }
190 if (((mutable_bitField0_ & 0x00000002) != 0)) {
191 transitionTail_.makeImmutable(); // C
192 }
193 if (((mutable_bitField0_ & 0x00000004) != 0)) {
194 transitionHead_.makeImmutable(); // C
195 }
196 if (((mutable_bitField0_ & 0x00000008) != 0)) {
197 transitionLabel_.makeImmutable(); // C
198 }
199 if (((mutable_bitField0_ & 0x00000010) != 0)) {
200 vars_.makeImmutable(); // C
201 }
202 this.unknownFields = unknownFields.build();
203 makeExtensionsImmutable();
204 }
205 }
206 public static final com.google.protobuf.Descriptors.Descriptor
208 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
209 }
210
211 @java.lang.Override
212 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
214 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable
215 .ensureFieldAccessorsInitialized(
216 com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class);
217 }
218
219 public static final int STARTING_STATE_FIELD_NUMBER = 2;
220 private long startingState_;
231 @java.lang.Override
232 public long getStartingState() {
233 return startingState_;
234 }
235
236 public static final int FINAL_STATES_FIELD_NUMBER = 3;
237 private com.google.protobuf.Internal.LongList finalStates_;
242 @java.lang.Override
243 public java.util.List<java.lang.Long>
245 return finalStates_;
246 }
251 public int getFinalStatesCount() {
252 return finalStates_.size();
253 }
259 public long getFinalStates(int index) {
260 return finalStates_.getLong(index);
261 }
262 private int finalStatesMemoizedSerializedSize = -1;
263
264 public static final int TRANSITION_TAIL_FIELD_NUMBER = 4;
265 private com.google.protobuf.Internal.LongList transitionTail_;
276 @java.lang.Override
277 public java.util.List<java.lang.Long>
279 return transitionTail_;
280 }
292 return transitionTail_.size();
293 }
305 public long getTransitionTail(int index) {
306 return transitionTail_.getLong(index);
307 }
308 private int transitionTailMemoizedSerializedSize = -1;
309
310 public static final int TRANSITION_HEAD_FIELD_NUMBER = 5;
311 private com.google.protobuf.Internal.LongList transitionHead_;
316 @java.lang.Override
317 public java.util.List<java.lang.Long>
319 return transitionHead_;
320 }
326 return transitionHead_.size();
327 }
333 public long getTransitionHead(int index) {
334 return transitionHead_.getLong(index);
335 }
336 private int transitionHeadMemoizedSerializedSize = -1;
337
338 public static final int TRANSITION_LABEL_FIELD_NUMBER = 6;
339 private com.google.protobuf.Internal.LongList transitionLabel_;
344 @java.lang.Override
345 public java.util.List<java.lang.Long>
347 return transitionLabel_;
348 }
354 return transitionLabel_.size();
355 }
361 public long getTransitionLabel(int index) {
362 return transitionLabel_.getLong(index);
363 }
364 private int transitionLabelMemoizedSerializedSize = -1;
365
366 public static final int VARS_FIELD_NUMBER = 7;
367 private com.google.protobuf.Internal.IntList vars_;
377 @java.lang.Override
378 public java.util.List<java.lang.Integer>
380 return vars_;
381 }
391 public int getVarsCount() {
392 return vars_.size();
393 }
404 public int getVars(int index) {
405 return vars_.getInt(index);
406 }
407 private int varsMemoizedSerializedSize = -1;
408
409 private byte memoizedIsInitialized = -1;
410 @java.lang.Override
411 public final boolean isInitialized() {
412 byte isInitialized = memoizedIsInitialized;
413 if (isInitialized == 1) return true;
414 if (isInitialized == 0) return false;
415
416 memoizedIsInitialized = 1;
417 return true;
418 }
419
420 @java.lang.Override
421 public void writeTo(com.google.protobuf.CodedOutputStream output)
422 throws java.io.IOException {
424 if (startingState_ != 0L) {
425 output.writeInt64(2, startingState_);
426 }
427 if (getFinalStatesList().size() > 0) {
428 output.writeUInt32NoTag(26);
429 output.writeUInt32NoTag(finalStatesMemoizedSerializedSize);
430 }
431 for (int i = 0; i < finalStates_.size(); i++) {
432 output.writeInt64NoTag(finalStates_.getLong(i));
433 }
434 if (getTransitionTailList().size() > 0) {
435 output.writeUInt32NoTag(34);
436 output.writeUInt32NoTag(transitionTailMemoizedSerializedSize);
437 }
438 for (int i = 0; i < transitionTail_.size(); i++) {
439 output.writeInt64NoTag(transitionTail_.getLong(i));
440 }
441 if (getTransitionHeadList().size() > 0) {
442 output.writeUInt32NoTag(42);
443 output.writeUInt32NoTag(transitionHeadMemoizedSerializedSize);
444 }
445 for (int i = 0; i < transitionHead_.size(); i++) {
446 output.writeInt64NoTag(transitionHead_.getLong(i));
447 }
448 if (getTransitionLabelList().size() > 0) {
449 output.writeUInt32NoTag(50);
450 output.writeUInt32NoTag(transitionLabelMemoizedSerializedSize);
451 }
452 for (int i = 0; i < transitionLabel_.size(); i++) {
453 output.writeInt64NoTag(transitionLabel_.getLong(i));
454 }
455 if (getVarsList().size() > 0) {
456 output.writeUInt32NoTag(58);
457 output.writeUInt32NoTag(varsMemoizedSerializedSize);
458 }
459 for (int i = 0; i < vars_.size(); i++) {
460 output.writeInt32NoTag(vars_.getInt(i));
461 }
462 unknownFields.writeTo(output);
463 }
464
465 @java.lang.Override
466 public int getSerializedSize() {
467 int size = memoizedSize;
468 if (size != -1) return size;
469
470 size = 0;
471 if (startingState_ != 0L) {
472 size += com.google.protobuf.CodedOutputStream
473 .computeInt64Size(2, startingState_);
474 }
475 {
476 int dataSize = 0;
477 for (int i = 0; i < finalStates_.size(); i++) {
478 dataSize += com.google.protobuf.CodedOutputStream
479 .computeInt64SizeNoTag(finalStates_.getLong(i));
480 }
481 size += dataSize;
482 if (!getFinalStatesList().isEmpty()) {
483 size += 1;
484 size += com.google.protobuf.CodedOutputStream
485 .computeInt32SizeNoTag(dataSize);
486 }
487 finalStatesMemoizedSerializedSize = dataSize;
488 }
489 {
490 int dataSize = 0;
491 for (int i = 0; i < transitionTail_.size(); i++) {
492 dataSize += com.google.protobuf.CodedOutputStream
493 .computeInt64SizeNoTag(transitionTail_.getLong(i));
494 }
495 size += dataSize;
496 if (!getTransitionTailList().isEmpty()) {
497 size += 1;
498 size += com.google.protobuf.CodedOutputStream
499 .computeInt32SizeNoTag(dataSize);
500 }
501 transitionTailMemoizedSerializedSize = dataSize;
502 }
503 {
504 int dataSize = 0;
505 for (int i = 0; i < transitionHead_.size(); i++) {
506 dataSize += com.google.protobuf.CodedOutputStream
507 .computeInt64SizeNoTag(transitionHead_.getLong(i));
508 }
509 size += dataSize;
510 if (!getTransitionHeadList().isEmpty()) {
511 size += 1;
512 size += com.google.protobuf.CodedOutputStream
513 .computeInt32SizeNoTag(dataSize);
514 }
515 transitionHeadMemoizedSerializedSize = dataSize;
516 }
517 {
518 int dataSize = 0;
519 for (int i = 0; i < transitionLabel_.size(); i++) {
520 dataSize += com.google.protobuf.CodedOutputStream
521 .computeInt64SizeNoTag(transitionLabel_.getLong(i));
522 }
523 size += dataSize;
524 if (!getTransitionLabelList().isEmpty()) {
525 size += 1;
526 size += com.google.protobuf.CodedOutputStream
527 .computeInt32SizeNoTag(dataSize);
528 }
529 transitionLabelMemoizedSerializedSize = dataSize;
530 }
531 {
532 int dataSize = 0;
533 for (int i = 0; i < vars_.size(); i++) {
534 dataSize += com.google.protobuf.CodedOutputStream
535 .computeInt32SizeNoTag(vars_.getInt(i));
536 }
537 size += dataSize;
538 if (!getVarsList().isEmpty()) {
539 size += 1;
540 size += com.google.protobuf.CodedOutputStream
541 .computeInt32SizeNoTag(dataSize);
542 }
543 varsMemoizedSerializedSize = dataSize;
544 }
545 size += unknownFields.getSerializedSize();
546 memoizedSize = size;
547 return size;
548 }
549
550 @java.lang.Override
551 public boolean equals(final java.lang.Object obj) {
552 if (obj == this) {
553 return true;
554 }
555 if (!(obj instanceof com.google.ortools.sat.AutomatonConstraintProto)) {
556 return super.equals(obj);
557 }
558 com.google.ortools.sat.AutomatonConstraintProto other = (com.google.ortools.sat.AutomatonConstraintProto) obj;
559
560 if (getStartingState()
561 != other.getStartingState()) return false;
562 if (!getFinalStatesList()
563 .equals(other.getFinalStatesList())) return false;
565 .equals(other.getTransitionTailList())) return false;
567 .equals(other.getTransitionHeadList())) return false;
569 .equals(other.getTransitionLabelList())) return false;
570 if (!getVarsList()
571 .equals(other.getVarsList())) return false;
572 if (!unknownFields.equals(other.unknownFields)) return false;
573 return true;
574 }
575
576 @java.lang.Override
577 public int hashCode() {
578 if (memoizedHashCode != 0) {
579 return memoizedHashCode;
580 }
581 int hash = 41;
582 hash = (19 * hash) + getDescriptor().hashCode();
583 hash = (37 * hash) + STARTING_STATE_FIELD_NUMBER;
584 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
586 if (getFinalStatesCount() > 0) {
587 hash = (37 * hash) + FINAL_STATES_FIELD_NUMBER;
588 hash = (53 * hash) + getFinalStatesList().hashCode();
589 }
590 if (getTransitionTailCount() > 0) {
591 hash = (37 * hash) + TRANSITION_TAIL_FIELD_NUMBER;
592 hash = (53 * hash) + getTransitionTailList().hashCode();
593 }
594 if (getTransitionHeadCount() > 0) {
595 hash = (37 * hash) + TRANSITION_HEAD_FIELD_NUMBER;
596 hash = (53 * hash) + getTransitionHeadList().hashCode();
597 }
598 if (getTransitionLabelCount() > 0) {
599 hash = (37 * hash) + TRANSITION_LABEL_FIELD_NUMBER;
600 hash = (53 * hash) + getTransitionLabelList().hashCode();
601 }
602 if (getVarsCount() > 0) {
603 hash = (37 * hash) + VARS_FIELD_NUMBER;
604 hash = (53 * hash) + getVarsList().hashCode();
605 }
606 hash = (29 * hash) + unknownFields.hashCode();
607 memoizedHashCode = hash;
608 return hash;
609 }
610
611 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
612 java.nio.ByteBuffer data)
613 throws com.google.protobuf.InvalidProtocolBufferException {
614 return PARSER.parseFrom(data);
615 }
616 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
617 java.nio.ByteBuffer data,
618 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
619 throws com.google.protobuf.InvalidProtocolBufferException {
620 return PARSER.parseFrom(data, extensionRegistry);
621 }
622 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
623 com.google.protobuf.ByteString data)
624 throws com.google.protobuf.InvalidProtocolBufferException {
625 return PARSER.parseFrom(data);
626 }
627 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
628 com.google.protobuf.ByteString data,
629 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
630 throws com.google.protobuf.InvalidProtocolBufferException {
631 return PARSER.parseFrom(data, extensionRegistry);
632 }
633 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(byte[] data)
634 throws com.google.protobuf.InvalidProtocolBufferException {
635 return PARSER.parseFrom(data);
636 }
637 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
638 byte[] data,
639 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
640 throws com.google.protobuf.InvalidProtocolBufferException {
641 return PARSER.parseFrom(data, extensionRegistry);
642 }
643 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input)
644 throws java.io.IOException {
645 return com.google.protobuf.GeneratedMessageV3
646 .parseWithIOException(PARSER, input);
647 }
648 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
649 java.io.InputStream input,
650 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
651 throws java.io.IOException {
652 return com.google.protobuf.GeneratedMessageV3
653 .parseWithIOException(PARSER, input, extensionRegistry);
654 }
655 public static com.google.ortools.sat.AutomatonConstraintProto parseDelimitedFrom(java.io.InputStream input)
656 throws java.io.IOException {
657 return com.google.protobuf.GeneratedMessageV3
658 .parseDelimitedWithIOException(PARSER, input);
659 }
660 public static com.google.ortools.sat.AutomatonConstraintProto parseDelimitedFrom(
661 java.io.InputStream input,
662 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
663 throws java.io.IOException {
664 return com.google.protobuf.GeneratedMessageV3
665 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
666 }
667 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
668 com.google.protobuf.CodedInputStream input)
669 throws java.io.IOException {
670 return com.google.protobuf.GeneratedMessageV3
671 .parseWithIOException(PARSER, input);
672 }
673 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(
674 com.google.protobuf.CodedInputStream input,
675 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
676 throws java.io.IOException {
677 return com.google.protobuf.GeneratedMessageV3
678 .parseWithIOException(PARSER, input, extensionRegistry);
679 }
680
681 @java.lang.Override
682 public Builder newBuilderForType() { return newBuilder(); }
683 public static Builder newBuilder() {
684 return DEFAULT_INSTANCE.toBuilder();
685 }
686 public static Builder newBuilder(com.google.ortools.sat.AutomatonConstraintProto prototype) {
687 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
688 }
689 @java.lang.Override
691 return this == DEFAULT_INSTANCE
692 ? new Builder() : new Builder().mergeFrom(this);
693 }
694
695 @java.lang.Override
697 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
698 Builder builder = new Builder(parent);
699 return builder;
700 }
709 public static final class Builder extends
710 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
711 // @@protoc_insertion_point(builder_implements:operations_research.sat.AutomatonConstraintProto)
712 com.google.ortools.sat.AutomatonConstraintProtoOrBuilder {
713 public static final com.google.protobuf.Descriptors.Descriptor
715 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
716 }
717
718 @java.lang.Override
719 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
721 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable
722 .ensureFieldAccessorsInitialized(
723 com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class);
724 }
725
726 // Construct using com.google.ortools.sat.AutomatonConstraintProto.newBuilder()
727 private Builder() {
728 maybeForceBuilderInitialization();
729 }
730
731 private Builder(
732 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
733 super(parent);
734 maybeForceBuilderInitialization();
735 }
736 private void maybeForceBuilderInitialization() {
737 if (com.google.protobuf.GeneratedMessageV3
738 .alwaysUseFieldBuilders) {
739 }
740 }
741 @java.lang.Override
742 public Builder clear() {
743 super.clear();
744 startingState_ = 0L;
745
746 finalStates_ = emptyLongList();
747 bitField0_ = (bitField0_ & ~0x00000001);
748 transitionTail_ = emptyLongList();
749 bitField0_ = (bitField0_ & ~0x00000002);
750 transitionHead_ = emptyLongList();
751 bitField0_ = (bitField0_ & ~0x00000004);
752 transitionLabel_ = emptyLongList();
753 bitField0_ = (bitField0_ & ~0x00000008);
754 vars_ = emptyIntList();
755 bitField0_ = (bitField0_ & ~0x00000010);
756 return this;
757 }
758
759 @java.lang.Override
760 public com.google.protobuf.Descriptors.Descriptor
762 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
763 }
764
765 @java.lang.Override
766 public com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType() {
767 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
768 }
769
770 @java.lang.Override
771 public com.google.ortools.sat.AutomatonConstraintProto build() {
772 com.google.ortools.sat.AutomatonConstraintProto result = buildPartial();
773 if (!result.isInitialized()) {
774 throw newUninitializedMessageException(result);
775 }
776 return result;
777 }
778
779 @java.lang.Override
780 public com.google.ortools.sat.AutomatonConstraintProto buildPartial() {
781 com.google.ortools.sat.AutomatonConstraintProto result = new com.google.ortools.sat.AutomatonConstraintProto(this);
782 int from_bitField0_ = bitField0_;
783 result.startingState_ = startingState_;
784 if (((bitField0_ & 0x00000001) != 0)) {
785 finalStates_.makeImmutable();
786 bitField0_ = (bitField0_ & ~0x00000001);
787 }
788 result.finalStates_ = finalStates_;
789 if (((bitField0_ & 0x00000002) != 0)) {
790 transitionTail_.makeImmutable();
791 bitField0_ = (bitField0_ & ~0x00000002);
792 }
793 result.transitionTail_ = transitionTail_;
794 if (((bitField0_ & 0x00000004) != 0)) {
795 transitionHead_.makeImmutable();
796 bitField0_ = (bitField0_ & ~0x00000004);
797 }
798 result.transitionHead_ = transitionHead_;
799 if (((bitField0_ & 0x00000008) != 0)) {
800 transitionLabel_.makeImmutable();
801 bitField0_ = (bitField0_ & ~0x00000008);
802 }
803 result.transitionLabel_ = transitionLabel_;
804 if (((bitField0_ & 0x00000010) != 0)) {
805 vars_.makeImmutable();
806 bitField0_ = (bitField0_ & ~0x00000010);
807 }
808 result.vars_ = vars_;
809 onBuilt();
810 return result;
811 }
812
813 @java.lang.Override
814 public Builder clone() {
815 return super.clone();
816 }
817 @java.lang.Override
819 com.google.protobuf.Descriptors.FieldDescriptor field,
820 java.lang.Object value) {
821 return super.setField(field, value);
822 }
823 @java.lang.Override
825 com.google.protobuf.Descriptors.FieldDescriptor field) {
826 return super.clearField(field);
827 }
828 @java.lang.Override
830 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
831 return super.clearOneof(oneof);
832 }
833 @java.lang.Override
835 com.google.protobuf.Descriptors.FieldDescriptor field,
836 int index, java.lang.Object value) {
837 return super.setRepeatedField(field, index, value);
838 }
839 @java.lang.Override
841 com.google.protobuf.Descriptors.FieldDescriptor field,
842 java.lang.Object value) {
843 return super.addRepeatedField(field, value);
844 }
845 @java.lang.Override
846 public Builder mergeFrom(com.google.protobuf.Message other) {
847 if (other instanceof com.google.ortools.sat.AutomatonConstraintProto) {
848 return mergeFrom((com.google.ortools.sat.AutomatonConstraintProto)other);
849 } else {
850 super.mergeFrom(other);
851 return this;
852 }
853 }
854
855 public Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other) {
856 if (other == com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) return this;
857 if (other.getStartingState() != 0L) {
858 setStartingState(other.getStartingState());
859 }
860 if (!other.finalStates_.isEmpty()) {
861 if (finalStates_.isEmpty()) {
862 finalStates_ = other.finalStates_;
863 bitField0_ = (bitField0_ & ~0x00000001);
864 } else {
865 ensureFinalStatesIsMutable();
866 finalStates_.addAll(other.finalStates_);
867 }
868 onChanged();
869 }
870 if (!other.transitionTail_.isEmpty()) {
871 if (transitionTail_.isEmpty()) {
872 transitionTail_ = other.transitionTail_;
873 bitField0_ = (bitField0_ & ~0x00000002);
874 } else {
875 ensureTransitionTailIsMutable();
876 transitionTail_.addAll(other.transitionTail_);
877 }
878 onChanged();
879 }
880 if (!other.transitionHead_.isEmpty()) {
881 if (transitionHead_.isEmpty()) {
882 transitionHead_ = other.transitionHead_;
883 bitField0_ = (bitField0_ & ~0x00000004);
884 } else {
885 ensureTransitionHeadIsMutable();
886 transitionHead_.addAll(other.transitionHead_);
887 }
888 onChanged();
889 }
890 if (!other.transitionLabel_.isEmpty()) {
891 if (transitionLabel_.isEmpty()) {
892 transitionLabel_ = other.transitionLabel_;
893 bitField0_ = (bitField0_ & ~0x00000008);
894 } else {
895 ensureTransitionLabelIsMutable();
896 transitionLabel_.addAll(other.transitionLabel_);
897 }
898 onChanged();
899 }
900 if (!other.vars_.isEmpty()) {
901 if (vars_.isEmpty()) {
902 vars_ = other.vars_;
903 bitField0_ = (bitField0_ & ~0x00000010);
904 } else {
905 ensureVarsIsMutable();
906 vars_.addAll(other.vars_);
907 }
908 onChanged();
909 }
910 this.mergeUnknownFields(other.unknownFields);
911 onChanged();
912 return this;
913 }
914
915 @java.lang.Override
916 public final boolean isInitialized() {
917 return true;
918 }
919
920 @java.lang.Override
922 com.google.protobuf.CodedInputStream input,
923 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
924 throws java.io.IOException {
925 com.google.ortools.sat.AutomatonConstraintProto parsedMessage = null;
926 try {
927 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
928 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
929 parsedMessage = (com.google.ortools.sat.AutomatonConstraintProto) e.getUnfinishedMessage();
930 throw e.unwrapIOException();
931 } finally {
932 if (parsedMessage != null) {
933 mergeFrom(parsedMessage);
934 }
935 }
936 return this;
937 }
938 private int bitField0_;
939
940 private long startingState_ ;
951 @java.lang.Override
952 public long getStartingState() {
953 return startingState_;
954 }
966 public Builder setStartingState(long value) {
967
968 startingState_ = value;
969 onChanged();
970 return this;
971 }
983
984 startingState_ = 0L;
985 onChanged();
986 return this;
987 }
988
989 private com.google.protobuf.Internal.LongList finalStates_ = emptyLongList();
990 private void ensureFinalStatesIsMutable() {
991 if (!((bitField0_ & 0x00000001) != 0)) {
992 finalStates_ = mutableCopy(finalStates_);
993 bitField0_ |= 0x00000001;
994 }
995 }
1000 public java.util.List<java.lang.Long>
1002 return ((bitField0_ & 0x00000001) != 0) ?
1003 java.util.Collections.unmodifiableList(finalStates_) : finalStates_;
1004 }
1009 public int getFinalStatesCount() {
1010 return finalStates_.size();
1011 }
1017 public long getFinalStates(int index) {
1018 return finalStates_.getLong(index);
1019 }
1027 int index, long value) {
1028 ensureFinalStatesIsMutable();
1029 finalStates_.setLong(index, value);
1030 onChanged();
1031 return this;
1032 }
1038 public Builder addFinalStates(long value) {
1039 ensureFinalStatesIsMutable();
1040 finalStates_.addLong(value);
1041 onChanged();
1042 return this;
1043 }
1050 java.lang.Iterable<? extends java.lang.Long> values) {
1051 ensureFinalStatesIsMutable();
1052 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1053 values, finalStates_);
1054 onChanged();
1055 return this;
1056 }
1062 finalStates_ = emptyLongList();
1063 bitField0_ = (bitField0_ & ~0x00000001);
1064 onChanged();
1065 return this;
1066 }
1067
1068 private com.google.protobuf.Internal.LongList transitionTail_ = emptyLongList();
1069 private void ensureTransitionTailIsMutable() {
1070 if (!((bitField0_ & 0x00000002) != 0)) {
1071 transitionTail_ = mutableCopy(transitionTail_);
1072 bitField0_ |= 0x00000002;
1073 }
1074 }
1085 public java.util.List<java.lang.Long>
1087 return ((bitField0_ & 0x00000002) != 0) ?
1088 java.util.Collections.unmodifiableList(transitionTail_) : transitionTail_;
1089 }
1101 return transitionTail_.size();
1102 }
1114 public long getTransitionTail(int index) {
1115 return transitionTail_.getLong(index);
1116 }
1130 int index, long value) {
1131 ensureTransitionTailIsMutable();
1132 transitionTail_.setLong(index, value);
1133 onChanged();
1134 return this;
1135 }
1147 public Builder addTransitionTail(long value) {
1148 ensureTransitionTailIsMutable();
1149 transitionTail_.addLong(value);
1150 onChanged();
1151 return this;
1152 }
1165 java.lang.Iterable<? extends java.lang.Long> values) {
1166 ensureTransitionTailIsMutable();
1167 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1168 values, transitionTail_);
1169 onChanged();
1170 return this;
1171 }
1183 transitionTail_ = emptyLongList();
1184 bitField0_ = (bitField0_ & ~0x00000002);
1185 onChanged();
1186 return this;
1187 }
1188
1189 private com.google.protobuf.Internal.LongList transitionHead_ = emptyLongList();
1190 private void ensureTransitionHeadIsMutable() {
1191 if (!((bitField0_ & 0x00000004) != 0)) {
1192 transitionHead_ = mutableCopy(transitionHead_);
1193 bitField0_ |= 0x00000004;
1194 }
1195 }
1200 public java.util.List<java.lang.Long>
1202 return ((bitField0_ & 0x00000004) != 0) ?
1203 java.util.Collections.unmodifiableList(transitionHead_) : transitionHead_;
1204 }
1210 return transitionHead_.size();
1211 }
1217 public long getTransitionHead(int index) {
1218 return transitionHead_.getLong(index);
1219 }
1227 int index, long value) {
1228 ensureTransitionHeadIsMutable();
1229 transitionHead_.setLong(index, value);
1230 onChanged();
1231 return this;
1232 }
1238 public Builder addTransitionHead(long value) {
1239 ensureTransitionHeadIsMutable();
1240 transitionHead_.addLong(value);
1241 onChanged();
1242 return this;
1243 }
1250 java.lang.Iterable<? extends java.lang.Long> values) {
1251 ensureTransitionHeadIsMutable();
1252 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1253 values, transitionHead_);
1254 onChanged();
1255 return this;
1256 }
1262 transitionHead_ = emptyLongList();
1263 bitField0_ = (bitField0_ & ~0x00000004);
1264 onChanged();
1265 return this;
1266 }
1267
1268 private com.google.protobuf.Internal.LongList transitionLabel_ = emptyLongList();
1269 private void ensureTransitionLabelIsMutable() {
1270 if (!((bitField0_ & 0x00000008) != 0)) {
1271 transitionLabel_ = mutableCopy(transitionLabel_);
1272 bitField0_ |= 0x00000008;
1273 }
1274 }
1279 public java.util.List<java.lang.Long>
1281 return ((bitField0_ & 0x00000008) != 0) ?
1282 java.util.Collections.unmodifiableList(transitionLabel_) : transitionLabel_;
1283 }
1289 return transitionLabel_.size();
1290 }
1296 public long getTransitionLabel(int index) {
1297 return transitionLabel_.getLong(index);
1298 }
1306 int index, long value) {
1307 ensureTransitionLabelIsMutable();
1308 transitionLabel_.setLong(index, value);
1309 onChanged();
1310 return this;
1311 }
1317 public Builder addTransitionLabel(long value) {
1318 ensureTransitionLabelIsMutable();
1319 transitionLabel_.addLong(value);
1320 onChanged();
1321 return this;
1322 }
1329 java.lang.Iterable<? extends java.lang.Long> values) {
1330 ensureTransitionLabelIsMutable();
1331 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1332 values, transitionLabel_);
1333 onChanged();
1334 return this;
1335 }
1341 transitionLabel_ = emptyLongList();
1342 bitField0_ = (bitField0_ & ~0x00000008);
1343 onChanged();
1344 return this;
1345 }
1346
1347 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
1348 private void ensureVarsIsMutable() {
1349 if (!((bitField0_ & 0x00000010) != 0)) {
1350 vars_ = mutableCopy(vars_);
1351 bitField0_ |= 0x00000010;
1352 }
1353 }
1363 public java.util.List<java.lang.Integer>
1365 return ((bitField0_ & 0x00000010) != 0) ?
1366 java.util.Collections.unmodifiableList(vars_) : vars_;
1367 }
1377 public int getVarsCount() {
1378 return vars_.size();
1379 }
1390 public int getVars(int index) {
1391 return vars_.getInt(index);
1392 }
1405 int index, int value) {
1406 ensureVarsIsMutable();
1407 vars_.setInt(index, value);
1408 onChanged();
1409 return this;
1410 }
1421 public Builder addVars(int value) {
1422 ensureVarsIsMutable();
1423 vars_.addInt(value);
1424 onChanged();
1425 return this;
1426 }
1438 java.lang.Iterable<? extends java.lang.Integer> values) {
1439 ensureVarsIsMutable();
1440 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1441 values, vars_);
1442 onChanged();
1443 return this;
1444 }
1455 vars_ = emptyIntList();
1456 bitField0_ = (bitField0_ & ~0x00000010);
1457 onChanged();
1458 return this;
1459 }
1460 @java.lang.Override
1462 final com.google.protobuf.UnknownFieldSet unknownFields) {
1463 return super.setUnknownFields(unknownFields);
1464 }
1465
1466 @java.lang.Override
1468 final com.google.protobuf.UnknownFieldSet unknownFields) {
1469 return super.mergeUnknownFields(unknownFields);
1470 }
1471
1472
1473 // @@protoc_insertion_point(builder_scope:operations_research.sat.AutomatonConstraintProto)
1474 }
1475
1476 // @@protoc_insertion_point(class_scope:operations_research.sat.AutomatonConstraintProto)
1477 private static final com.google.ortools.sat.AutomatonConstraintProto DEFAULT_INSTANCE;
1478 static {
1479 DEFAULT_INSTANCE = new com.google.ortools.sat.AutomatonConstraintProto();
1480 }
1481
1482 public static com.google.ortools.sat.AutomatonConstraintProto getDefaultInstance() {
1483 return DEFAULT_INSTANCE;
1484 }
1485
1486 private static final com.google.protobuf.Parser<AutomatonConstraintProto>
1487 PARSER = new com.google.protobuf.AbstractParser<AutomatonConstraintProto>() {
1488 @java.lang.Override
1489 public AutomatonConstraintProto parsePartialFrom(
1490 com.google.protobuf.CodedInputStream input,
1491 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1492 throws com.google.protobuf.InvalidProtocolBufferException {
1493 return new AutomatonConstraintProto(input, extensionRegistry);
1494 }
1495 };
1496
1497 public static com.google.protobuf.Parser<AutomatonConstraintProto> parser() {
1498 return PARSER;
1499 }
1500
1501 @java.lang.Override
1502 public com.google.protobuf.Parser<AutomatonConstraintProto> getParserForType() {
1503 return PARSER;
1504 }
1505
1506 @java.lang.Override
1507 public com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType() {
1508 return DEFAULT_INSTANCE;
1509 }
1510
1511}
1512
Builder addTransitionLabel(long value)
repeated int64 transition_label = 6;
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addAllTransitionLabel(java.lang.Iterable<? extends java.lang.Long > values)
repeated int64 transition_label = 6;
long getTransitionHead(int index)
repeated int64 transition_head = 5;
com.google.ortools.sat.AutomatonConstraintProto build()
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
java.util.List< java.lang.Long > getFinalStatesList()
repeated int64 final_states = 3;
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addAllTransitionHead(java.lang.Iterable<? extends java.lang.Long > values)
repeated int64 transition_head = 5;
Builder clearTransitionLabel()
repeated int64 transition_label = 6;
Builder setTransitionHead(int index, long value)
repeated int64 transition_head = 5;
com.google.ortools.sat.AutomatonConstraintProto buildPartial()
java.util.List< java.lang.Long > getTransitionHeadList()
repeated int64 transition_head = 5;
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
int getTransitionLabelCount()
repeated int64 transition_label = 6;
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
int getTransitionHeadCount()
repeated int64 transition_head = 5;
long getFinalStates(int index)
repeated int64 final_states = 3;
Builder setFinalStates(int index, long value)
repeated int64 final_states = 3;
Builder addFinalStates(long value)
repeated int64 final_states = 3;
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder addAllVars(java.lang.Iterable<? extends java.lang.Integer > values)
long getTransitionLabel(int index)
repeated int64 transition_label = 6;
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder addTransitionHead(long value)
repeated int64 transition_head = 5;
Builder addAllTransitionTail(java.lang.Iterable<? extends java.lang.Long > values)
java.util.List< java.lang.Long > getTransitionLabelList()
repeated int64 transition_label = 6;
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder setTransitionLabel(int index, long value)
repeated int64 transition_label = 6;
Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other)
com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType()
Builder addAllFinalStates(java.lang.Iterable<? extends java.lang.Long > values)
repeated int64 final_states = 3;
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder clearTransitionHead()
repeated int64 transition_head = 5;
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input)
long getTransitionHead(int index)
repeated int64 transition_head = 5;
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto getDefaultInstance()
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
void writeTo(com.google.protobuf.CodedOutputStream output)
java.util.List< java.lang.Long > getFinalStatesList()
repeated int64 final_states = 3;
java.util.List< java.lang.Long > getTransitionHeadList()
repeated int64 transition_head = 5;
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.nio.ByteBuffer data)
int getTransitionLabelCount()
repeated int64 transition_label = 6;
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
int getTransitionHeadCount()
repeated int64 transition_head = 5;
long getFinalStates(int index)
repeated int64 final_states = 3;
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
com.google.protobuf.Parser< AutomatonConstraintProto > getParserForType()
static com.google.protobuf.Parser< AutomatonConstraintProto > parser()
static com.google.ortools.sat.AutomatonConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseDelimitedFrom(java.io.InputStream input)
long getTransitionLabel(int index)
repeated int64 transition_label = 6;
final com.google.protobuf.UnknownFieldSet getUnknownFields()
static Builder newBuilder(com.google.ortools.sat.AutomatonConstraintProto prototype)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Long > getTransitionLabelList()
repeated int64 transition_label = 6;
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(byte[] data)
int getFinalStatesCount()
repeated int64 final_states = 3;
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
java.lang.Object newInstance(UnusedPrivateParameter unused)
java.util.List< java.lang.Long > getTransitionTailList()
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)