Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
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
4// Protobuf Java Version: 3.25.3
5package com.google.ortools.sat;
6
15public final class AutomatonConstraintProto extends
16 com.google.protobuf.GeneratedMessageV3 implements
17 // @@protoc_insertion_point(message_implements:operations_research.sat.AutomatonConstraintProto)
19private static final long serialVersionUID = 0L;
20 // Use AutomatonConstraintProto.newBuilder() to construct.
21 private AutomatonConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
22 super(builder);
23 }
24 private AutomatonConstraintProto() {
25 finalStates_ = emptyLongList();
26 transitionTail_ = emptyLongList();
27 transitionHead_ = emptyLongList();
28 transitionLabel_ = emptyLongList();
29 vars_ = emptyIntList();
30 }
31
32 @java.lang.Override
33 @SuppressWarnings({"unused"})
34 protected java.lang.Object newInstance(
35 UnusedPrivateParameter unused) {
36 return new AutomatonConstraintProto();
37 }
38
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
42 }
43
44 @java.lang.Override
45 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class);
50 }
51
52 public static final int STARTING_STATE_FIELD_NUMBER = 2;
53 private long startingState_ = 0L;
64 @java.lang.Override
65 public long getStartingState() {
66 return startingState_;
67 }
68
69 public static final int FINAL_STATES_FIELD_NUMBER = 3;
70 @SuppressWarnings("serial")
71 private com.google.protobuf.Internal.LongList finalStates_ =
72 emptyLongList();
77 @java.lang.Override
78 public java.util.List<java.lang.Long>
80 return finalStates_;
81 }
86 public int getFinalStatesCount() {
87 return finalStates_.size();
88 }
94 public long getFinalStates(int index) {
95 return finalStates_.getLong(index);
96 }
97 private int finalStatesMemoizedSerializedSize = -1;
98
99 public static final int TRANSITION_TAIL_FIELD_NUMBER = 4;
100 @SuppressWarnings("serial")
101 private com.google.protobuf.Internal.LongList transitionTail_ =
102 emptyLongList();
113 @java.lang.Override
114 public java.util.List<java.lang.Long>
116 return transitionTail_;
117 }
129 return transitionTail_.size();
130 }
142 public long getTransitionTail(int index) {
143 return transitionTail_.getLong(index);
144 }
145 private int transitionTailMemoizedSerializedSize = -1;
146
147 public static final int TRANSITION_HEAD_FIELD_NUMBER = 5;
148 @SuppressWarnings("serial")
149 private com.google.protobuf.Internal.LongList transitionHead_ =
150 emptyLongList();
155 @java.lang.Override
156 public java.util.List<java.lang.Long>
158 return transitionHead_;
159 }
165 return transitionHead_.size();
166 }
172 public long getTransitionHead(int index) {
173 return transitionHead_.getLong(index);
174 }
175 private int transitionHeadMemoizedSerializedSize = -1;
176
177 public static final int TRANSITION_LABEL_FIELD_NUMBER = 6;
178 @SuppressWarnings("serial")
179 private com.google.protobuf.Internal.LongList transitionLabel_ =
180 emptyLongList();
185 @java.lang.Override
186 public java.util.List<java.lang.Long>
188 return transitionLabel_;
189 }
195 return transitionLabel_.size();
196 }
202 public long getTransitionLabel(int index) {
203 return transitionLabel_.getLong(index);
204 }
205 private int transitionLabelMemoizedSerializedSize = -1;
206
207 public static final int VARS_FIELD_NUMBER = 7;
208 @SuppressWarnings("serial")
209 private com.google.protobuf.Internal.IntList vars_ =
210 emptyIntList();
220 @java.lang.Override
221 public java.util.List<java.lang.Integer>
223 return vars_;
224 }
234 public int getVarsCount() {
235 return vars_.size();
236 }
247 public int getVars(int index) {
248 return vars_.getInt(index);
249 }
250 private int varsMemoizedSerializedSize = -1;
251
252 private byte memoizedIsInitialized = -1;
253 @java.lang.Override
254 public final boolean isInitialized() {
255 byte isInitialized = memoizedIsInitialized;
256 if (isInitialized == 1) return true;
257 if (isInitialized == 0) return false;
258
259 memoizedIsInitialized = 1;
260 return true;
261 }
262
263 @java.lang.Override
264 public void writeTo(com.google.protobuf.CodedOutputStream output)
265 throws java.io.IOException {
267 if (startingState_ != 0L) {
268 output.writeInt64(2, startingState_);
269 }
270 if (getFinalStatesList().size() > 0) {
271 output.writeUInt32NoTag(26);
272 output.writeUInt32NoTag(finalStatesMemoizedSerializedSize);
273 }
274 for (int i = 0; i < finalStates_.size(); i++) {
275 output.writeInt64NoTag(finalStates_.getLong(i));
276 }
277 if (getTransitionTailList().size() > 0) {
278 output.writeUInt32NoTag(34);
279 output.writeUInt32NoTag(transitionTailMemoizedSerializedSize);
280 }
281 for (int i = 0; i < transitionTail_.size(); i++) {
282 output.writeInt64NoTag(transitionTail_.getLong(i));
283 }
284 if (getTransitionHeadList().size() > 0) {
285 output.writeUInt32NoTag(42);
286 output.writeUInt32NoTag(transitionHeadMemoizedSerializedSize);
287 }
288 for (int i = 0; i < transitionHead_.size(); i++) {
289 output.writeInt64NoTag(transitionHead_.getLong(i));
290 }
291 if (getTransitionLabelList().size() > 0) {
292 output.writeUInt32NoTag(50);
293 output.writeUInt32NoTag(transitionLabelMemoizedSerializedSize);
294 }
295 for (int i = 0; i < transitionLabel_.size(); i++) {
296 output.writeInt64NoTag(transitionLabel_.getLong(i));
297 }
298 if (getVarsList().size() > 0) {
299 output.writeUInt32NoTag(58);
300 output.writeUInt32NoTag(varsMemoizedSerializedSize);
301 }
302 for (int i = 0; i < vars_.size(); i++) {
303 output.writeInt32NoTag(vars_.getInt(i));
304 }
305 getUnknownFields().writeTo(output);
306 }
307
308 @java.lang.Override
309 public int getSerializedSize() {
310 int size = memoizedSize;
311 if (size != -1) return size;
312
313 size = 0;
314 if (startingState_ != 0L) {
315 size += com.google.protobuf.CodedOutputStream
316 .computeInt64Size(2, startingState_);
317 }
318 {
319 int dataSize = 0;
320 for (int i = 0; i < finalStates_.size(); i++) {
321 dataSize += com.google.protobuf.CodedOutputStream
322 .computeInt64SizeNoTag(finalStates_.getLong(i));
323 }
324 size += dataSize;
325 if (!getFinalStatesList().isEmpty()) {
326 size += 1;
327 size += com.google.protobuf.CodedOutputStream
328 .computeInt32SizeNoTag(dataSize);
329 }
330 finalStatesMemoizedSerializedSize = dataSize;
331 }
332 {
333 int dataSize = 0;
334 for (int i = 0; i < transitionTail_.size(); i++) {
335 dataSize += com.google.protobuf.CodedOutputStream
336 .computeInt64SizeNoTag(transitionTail_.getLong(i));
337 }
338 size += dataSize;
339 if (!getTransitionTailList().isEmpty()) {
340 size += 1;
341 size += com.google.protobuf.CodedOutputStream
342 .computeInt32SizeNoTag(dataSize);
343 }
344 transitionTailMemoizedSerializedSize = dataSize;
345 }
346 {
347 int dataSize = 0;
348 for (int i = 0; i < transitionHead_.size(); i++) {
349 dataSize += com.google.protobuf.CodedOutputStream
350 .computeInt64SizeNoTag(transitionHead_.getLong(i));
351 }
352 size += dataSize;
353 if (!getTransitionHeadList().isEmpty()) {
354 size += 1;
355 size += com.google.protobuf.CodedOutputStream
356 .computeInt32SizeNoTag(dataSize);
357 }
358 transitionHeadMemoizedSerializedSize = dataSize;
359 }
360 {
361 int dataSize = 0;
362 for (int i = 0; i < transitionLabel_.size(); i++) {
363 dataSize += com.google.protobuf.CodedOutputStream
364 .computeInt64SizeNoTag(transitionLabel_.getLong(i));
365 }
366 size += dataSize;
367 if (!getTransitionLabelList().isEmpty()) {
368 size += 1;
369 size += com.google.protobuf.CodedOutputStream
370 .computeInt32SizeNoTag(dataSize);
371 }
372 transitionLabelMemoizedSerializedSize = dataSize;
373 }
374 {
375 int dataSize = 0;
376 for (int i = 0; i < vars_.size(); i++) {
377 dataSize += com.google.protobuf.CodedOutputStream
378 .computeInt32SizeNoTag(vars_.getInt(i));
379 }
380 size += dataSize;
381 if (!getVarsList().isEmpty()) {
382 size += 1;
383 size += com.google.protobuf.CodedOutputStream
384 .computeInt32SizeNoTag(dataSize);
385 }
386 varsMemoizedSerializedSize = dataSize;
387 }
388 size += getUnknownFields().getSerializedSize();
389 memoizedSize = size;
390 return size;
391 }
392
393 @java.lang.Override
394 public boolean equals(final java.lang.Object obj) {
395 if (obj == this) {
396 return true;
397 }
398 if (!(obj instanceof com.google.ortools.sat.AutomatonConstraintProto)) {
399 return super.equals(obj);
400 }
401 com.google.ortools.sat.AutomatonConstraintProto other = (com.google.ortools.sat.AutomatonConstraintProto) obj;
402
403 if (getStartingState()
404 != other.getStartingState()) return false;
405 if (!getFinalStatesList()
406 .equals(other.getFinalStatesList())) return false;
408 .equals(other.getTransitionTailList())) return false;
410 .equals(other.getTransitionHeadList())) return false;
412 .equals(other.getTransitionLabelList())) return false;
413 if (!getVarsList()
414 .equals(other.getVarsList())) return false;
415 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
416 return true;
417 }
418
419 @java.lang.Override
420 public int hashCode() {
421 if (memoizedHashCode != 0) {
422 return memoizedHashCode;
423 }
424 int hash = 41;
425 hash = (19 * hash) + getDescriptor().hashCode();
426 hash = (37 * hash) + STARTING_STATE_FIELD_NUMBER;
427 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
429 if (getFinalStatesCount() > 0) {
430 hash = (37 * hash) + FINAL_STATES_FIELD_NUMBER;
431 hash = (53 * hash) + getFinalStatesList().hashCode();
432 }
433 if (getTransitionTailCount() > 0) {
434 hash = (37 * hash) + TRANSITION_TAIL_FIELD_NUMBER;
435 hash = (53 * hash) + getTransitionTailList().hashCode();
436 }
437 if (getTransitionHeadCount() > 0) {
438 hash = (37 * hash) + TRANSITION_HEAD_FIELD_NUMBER;
439 hash = (53 * hash) + getTransitionHeadList().hashCode();
440 }
441 if (getTransitionLabelCount() > 0) {
442 hash = (37 * hash) + TRANSITION_LABEL_FIELD_NUMBER;
443 hash = (53 * hash) + getTransitionLabelList().hashCode();
444 }
445 if (getVarsCount() > 0) {
446 hash = (37 * hash) + VARS_FIELD_NUMBER;
447 hash = (53 * hash) + getVarsList().hashCode();
448 }
449 hash = (29 * hash) + getUnknownFields().hashCode();
450 memoizedHashCode = hash;
451 return hash;
452 }
453
455 java.nio.ByteBuffer data)
456 throws com.google.protobuf.InvalidProtocolBufferException {
457 return PARSER.parseFrom(data);
458 }
460 java.nio.ByteBuffer data,
461 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
462 throws com.google.protobuf.InvalidProtocolBufferException {
463 return PARSER.parseFrom(data, extensionRegistry);
464 }
466 com.google.protobuf.ByteString data)
467 throws com.google.protobuf.InvalidProtocolBufferException {
468 return PARSER.parseFrom(data);
469 }
471 com.google.protobuf.ByteString data,
472 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
473 throws com.google.protobuf.InvalidProtocolBufferException {
474 return PARSER.parseFrom(data, extensionRegistry);
475 }
477 throws com.google.protobuf.InvalidProtocolBufferException {
478 return PARSER.parseFrom(data);
479 }
481 byte[] data,
482 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
483 throws com.google.protobuf.InvalidProtocolBufferException {
484 return PARSER.parseFrom(data, extensionRegistry);
485 }
486 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input)
487 throws java.io.IOException {
488 return com.google.protobuf.GeneratedMessageV3
489 .parseWithIOException(PARSER, input);
490 }
492 java.io.InputStream input,
493 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
494 throws java.io.IOException {
495 return com.google.protobuf.GeneratedMessageV3
496 .parseWithIOException(PARSER, input, extensionRegistry);
497 }
498
500 throws java.io.IOException {
501 return com.google.protobuf.GeneratedMessageV3
502 .parseDelimitedWithIOException(PARSER, input);
503 }
504
506 java.io.InputStream input,
507 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
508 throws java.io.IOException {
509 return com.google.protobuf.GeneratedMessageV3
510 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
511 }
513 com.google.protobuf.CodedInputStream input)
514 throws java.io.IOException {
515 return com.google.protobuf.GeneratedMessageV3
516 .parseWithIOException(PARSER, input);
517 }
519 com.google.protobuf.CodedInputStream input,
520 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
521 throws java.io.IOException {
522 return com.google.protobuf.GeneratedMessageV3
523 .parseWithIOException(PARSER, input, extensionRegistry);
524 }
525
526 @java.lang.Override
527 public Builder newBuilderForType() { return newBuilder(); }
528 public static Builder newBuilder() {
529 return DEFAULT_INSTANCE.toBuilder();
530 }
531 public static Builder newBuilder(com.google.ortools.sat.AutomatonConstraintProto prototype) {
532 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
533 }
534 @java.lang.Override
536 return this == DEFAULT_INSTANCE
537 ? new Builder() : new Builder().mergeFrom(this);
538 }
539
540 @java.lang.Override
542 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
543 Builder builder = new Builder(parent);
544 return builder;
545 }
554 public static final class Builder extends
555 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
556 // @@protoc_insertion_point(builder_implements:operations_research.sat.AutomatonConstraintProto)
557 com.google.ortools.sat.AutomatonConstraintProtoOrBuilder {
558 public static final com.google.protobuf.Descriptors.Descriptor
560 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
561 }
562
563 @java.lang.Override
564 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
566 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable
567 .ensureFieldAccessorsInitialized(
568 com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class);
569 }
570
571 // Construct using com.google.ortools.sat.AutomatonConstraintProto.newBuilder()
572 private Builder() {
573
574 }
575
576 private Builder(
577 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
578 super(parent);
579
580 }
581 @java.lang.Override
582 public Builder clear() {
583 super.clear();
584 bitField0_ = 0;
585 startingState_ = 0L;
586 finalStates_ = emptyLongList();
587 transitionTail_ = emptyLongList();
588 transitionHead_ = emptyLongList();
589 transitionLabel_ = emptyLongList();
590 vars_ = emptyIntList();
591 return this;
592 }
593
594 @java.lang.Override
595 public com.google.protobuf.Descriptors.Descriptor
597 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
598 }
599
600 @java.lang.Override
602 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
603 }
604
605 @java.lang.Override
608 if (!result.isInitialized()) {
609 throw newUninitializedMessageException(result);
610 }
611 return result;
612 }
613
614 @java.lang.Override
616 com.google.ortools.sat.AutomatonConstraintProto result = new com.google.ortools.sat.AutomatonConstraintProto(this);
617 if (bitField0_ != 0) { buildPartial0(result); }
618 onBuilt();
619 return result;
620 }
621
622 private void buildPartial0(com.google.ortools.sat.AutomatonConstraintProto result) {
623 int from_bitField0_ = bitField0_;
624 if (((from_bitField0_ & 0x00000001) != 0)) {
625 result.startingState_ = startingState_;
626 }
627 if (((from_bitField0_ & 0x00000002) != 0)) {
628 finalStates_.makeImmutable();
629 result.finalStates_ = finalStates_;
630 }
631 if (((from_bitField0_ & 0x00000004) != 0)) {
632 transitionTail_.makeImmutable();
633 result.transitionTail_ = transitionTail_;
634 }
635 if (((from_bitField0_ & 0x00000008) != 0)) {
636 transitionHead_.makeImmutable();
637 result.transitionHead_ = transitionHead_;
638 }
639 if (((from_bitField0_ & 0x00000010) != 0)) {
640 transitionLabel_.makeImmutable();
641 result.transitionLabel_ = transitionLabel_;
642 }
643 if (((from_bitField0_ & 0x00000020) != 0)) {
644 vars_.makeImmutable();
645 result.vars_ = vars_;
646 }
647 }
648
649 @java.lang.Override
650 public Builder clone() {
651 return super.clone();
652 }
653 @java.lang.Override
655 com.google.protobuf.Descriptors.FieldDescriptor field,
656 java.lang.Object value) {
657 return super.setField(field, value);
658 }
659 @java.lang.Override
661 com.google.protobuf.Descriptors.FieldDescriptor field) {
662 return super.clearField(field);
663 }
664 @java.lang.Override
666 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
667 return super.clearOneof(oneof);
668 }
669 @java.lang.Override
671 com.google.protobuf.Descriptors.FieldDescriptor field,
672 int index, java.lang.Object value) {
673 return super.setRepeatedField(field, index, value);
674 }
675 @java.lang.Override
677 com.google.protobuf.Descriptors.FieldDescriptor field,
678 java.lang.Object value) {
679 return super.addRepeatedField(field, value);
680 }
681 @java.lang.Override
682 public Builder mergeFrom(com.google.protobuf.Message other) {
683 if (other instanceof com.google.ortools.sat.AutomatonConstraintProto) {
684 return mergeFrom((com.google.ortools.sat.AutomatonConstraintProto)other);
685 } else {
686 super.mergeFrom(other);
687 return this;
688 }
689 }
690
691 public Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other) {
692 if (other == com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) return this;
693 if (other.getStartingState() != 0L) {
694 setStartingState(other.getStartingState());
695 }
696 if (!other.finalStates_.isEmpty()) {
697 if (finalStates_.isEmpty()) {
698 finalStates_ = other.finalStates_;
699 finalStates_.makeImmutable();
700 bitField0_ |= 0x00000002;
701 } else {
702 ensureFinalStatesIsMutable();
703 finalStates_.addAll(other.finalStates_);
704 }
705 onChanged();
706 }
707 if (!other.transitionTail_.isEmpty()) {
708 if (transitionTail_.isEmpty()) {
709 transitionTail_ = other.transitionTail_;
710 transitionTail_.makeImmutable();
711 bitField0_ |= 0x00000004;
712 } else {
713 ensureTransitionTailIsMutable();
714 transitionTail_.addAll(other.transitionTail_);
715 }
716 onChanged();
717 }
718 if (!other.transitionHead_.isEmpty()) {
719 if (transitionHead_.isEmpty()) {
720 transitionHead_ = other.transitionHead_;
721 transitionHead_.makeImmutable();
722 bitField0_ |= 0x00000008;
723 } else {
724 ensureTransitionHeadIsMutable();
725 transitionHead_.addAll(other.transitionHead_);
726 }
727 onChanged();
728 }
729 if (!other.transitionLabel_.isEmpty()) {
730 if (transitionLabel_.isEmpty()) {
731 transitionLabel_ = other.transitionLabel_;
732 transitionLabel_.makeImmutable();
733 bitField0_ |= 0x00000010;
734 } else {
735 ensureTransitionLabelIsMutable();
736 transitionLabel_.addAll(other.transitionLabel_);
737 }
738 onChanged();
739 }
740 if (!other.vars_.isEmpty()) {
741 if (vars_.isEmpty()) {
742 vars_ = other.vars_;
743 vars_.makeImmutable();
744 bitField0_ |= 0x00000020;
745 } else {
746 ensureVarsIsMutable();
747 vars_.addAll(other.vars_);
748 }
749 onChanged();
750 }
751 this.mergeUnknownFields(other.getUnknownFields());
752 onChanged();
753 return this;
754 }
755
756 @java.lang.Override
757 public final boolean isInitialized() {
758 return true;
759 }
760
761 @java.lang.Override
763 com.google.protobuf.CodedInputStream input,
764 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
765 throws java.io.IOException {
766 if (extensionRegistry == null) {
767 throw new java.lang.NullPointerException();
768 }
769 try {
770 boolean done = false;
771 while (!done) {
772 int tag = input.readTag();
773 switch (tag) {
774 case 0:
775 done = true;
776 break;
777 case 16: {
778 startingState_ = input.readInt64();
779 bitField0_ |= 0x00000001;
780 break;
781 } // case 16
782 case 24: {
783 long v = input.readInt64();
784 ensureFinalStatesIsMutable();
785 finalStates_.addLong(v);
786 break;
787 } // case 24
788 case 26: {
789 int length = input.readRawVarint32();
790 int limit = input.pushLimit(length);
791 ensureFinalStatesIsMutable();
792 while (input.getBytesUntilLimit() > 0) {
793 finalStates_.addLong(input.readInt64());
794 }
795 input.popLimit(limit);
796 break;
797 } // case 26
798 case 32: {
799 long v = input.readInt64();
800 ensureTransitionTailIsMutable();
801 transitionTail_.addLong(v);
802 break;
803 } // case 32
804 case 34: {
805 int length = input.readRawVarint32();
806 int limit = input.pushLimit(length);
807 ensureTransitionTailIsMutable();
808 while (input.getBytesUntilLimit() > 0) {
809 transitionTail_.addLong(input.readInt64());
810 }
811 input.popLimit(limit);
812 break;
813 } // case 34
814 case 40: {
815 long v = input.readInt64();
816 ensureTransitionHeadIsMutable();
817 transitionHead_.addLong(v);
818 break;
819 } // case 40
820 case 42: {
821 int length = input.readRawVarint32();
822 int limit = input.pushLimit(length);
823 ensureTransitionHeadIsMutable();
824 while (input.getBytesUntilLimit() > 0) {
825 transitionHead_.addLong(input.readInt64());
826 }
827 input.popLimit(limit);
828 break;
829 } // case 42
830 case 48: {
831 long v = input.readInt64();
832 ensureTransitionLabelIsMutable();
833 transitionLabel_.addLong(v);
834 break;
835 } // case 48
836 case 50: {
837 int length = input.readRawVarint32();
838 int limit = input.pushLimit(length);
839 ensureTransitionLabelIsMutable();
840 while (input.getBytesUntilLimit() > 0) {
841 transitionLabel_.addLong(input.readInt64());
842 }
843 input.popLimit(limit);
844 break;
845 } // case 50
846 case 56: {
847 int v = input.readInt32();
848 ensureVarsIsMutable();
849 vars_.addInt(v);
850 break;
851 } // case 56
852 case 58: {
853 int length = input.readRawVarint32();
854 int limit = input.pushLimit(length);
855 ensureVarsIsMutable();
856 while (input.getBytesUntilLimit() > 0) {
857 vars_.addInt(input.readInt32());
858 }
859 input.popLimit(limit);
860 break;
861 } // case 58
862 default: {
863 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
864 done = true; // was an endgroup tag
865 }
866 break;
867 } // default:
868 } // switch (tag)
869 } // while (!done)
870 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
871 throw e.unwrapIOException();
872 } finally {
873 onChanged();
874 } // finally
875 return this;
876 }
877 private int bitField0_;
878
879 private long startingState_ ;
890 @java.lang.Override
891 public long getStartingState() {
892 return startingState_;
893 }
905 public Builder setStartingState(long value) {
906
907 startingState_ = value;
908 bitField0_ |= 0x00000001;
909 onChanged();
910 return this;
911 }
923 bitField0_ = (bitField0_ & ~0x00000001);
924 startingState_ = 0L;
925 onChanged();
926 return this;
927 }
928
929 private com.google.protobuf.Internal.LongList finalStates_ = emptyLongList();
930 private void ensureFinalStatesIsMutable() {
931 if (!finalStates_.isModifiable()) {
932 finalStates_ = makeMutableCopy(finalStates_);
933 }
934 bitField0_ |= 0x00000002;
935 }
940 public java.util.List<java.lang.Long>
942 finalStates_.makeImmutable();
943 return finalStates_;
944 }
949 public int getFinalStatesCount() {
950 return finalStates_.size();
951 }
957 public long getFinalStates(int index) {
958 return finalStates_.getLong(index);
959 }
967 int index, long value) {
968
969 ensureFinalStatesIsMutable();
970 finalStates_.setLong(index, value);
971 bitField0_ |= 0x00000002;
972 onChanged();
973 return this;
974 }
980 public Builder addFinalStates(long value) {
981
982 ensureFinalStatesIsMutable();
983 finalStates_.addLong(value);
984 bitField0_ |= 0x00000002;
985 onChanged();
986 return this;
987 }
994 java.lang.Iterable<? extends java.lang.Long> values) {
995 ensureFinalStatesIsMutable();
996 com.google.protobuf.AbstractMessageLite.Builder.addAll(
997 values, finalStates_);
998 bitField0_ |= 0x00000002;
999 onChanged();
1000 return this;
1001 }
1007 finalStates_ = emptyLongList();
1008 bitField0_ = (bitField0_ & ~0x00000002);
1009 onChanged();
1010 return this;
1011 }
1012
1013 private com.google.protobuf.Internal.LongList transitionTail_ = emptyLongList();
1014 private void ensureTransitionTailIsMutable() {
1015 if (!transitionTail_.isModifiable()) {
1016 transitionTail_ = makeMutableCopy(transitionTail_);
1017 }
1018 bitField0_ |= 0x00000004;
1019 }
1030 public java.util.List<java.lang.Long>
1032 transitionTail_.makeImmutable();
1033 return transitionTail_;
1034 }
1046 return transitionTail_.size();
1047 }
1059 public long getTransitionTail(int index) {
1060 return transitionTail_.getLong(index);
1061 }
1075 int index, long value) {
1076
1077 ensureTransitionTailIsMutable();
1078 transitionTail_.setLong(index, value);
1079 bitField0_ |= 0x00000004;
1080 onChanged();
1081 return this;
1082 }
1094 public Builder addTransitionTail(long value) {
1095
1096 ensureTransitionTailIsMutable();
1097 transitionTail_.addLong(value);
1098 bitField0_ |= 0x00000004;
1099 onChanged();
1100 return this;
1101 }
1114 java.lang.Iterable<? extends java.lang.Long> values) {
1115 ensureTransitionTailIsMutable();
1116 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1117 values, transitionTail_);
1118 bitField0_ |= 0x00000004;
1119 onChanged();
1120 return this;
1121 }
1133 transitionTail_ = emptyLongList();
1134 bitField0_ = (bitField0_ & ~0x00000004);
1135 onChanged();
1136 return this;
1137 }
1138
1139 private com.google.protobuf.Internal.LongList transitionHead_ = emptyLongList();
1140 private void ensureTransitionHeadIsMutable() {
1141 if (!transitionHead_.isModifiable()) {
1142 transitionHead_ = makeMutableCopy(transitionHead_);
1143 }
1144 bitField0_ |= 0x00000008;
1145 }
1150 public java.util.List<java.lang.Long>
1152 transitionHead_.makeImmutable();
1153 return transitionHead_;
1154 }
1160 return transitionHead_.size();
1161 }
1167 public long getTransitionHead(int index) {
1168 return transitionHead_.getLong(index);
1169 }
1177 int index, long value) {
1178
1179 ensureTransitionHeadIsMutable();
1180 transitionHead_.setLong(index, value);
1181 bitField0_ |= 0x00000008;
1182 onChanged();
1183 return this;
1184 }
1190 public Builder addTransitionHead(long value) {
1191
1192 ensureTransitionHeadIsMutable();
1193 transitionHead_.addLong(value);
1194 bitField0_ |= 0x00000008;
1195 onChanged();
1196 return this;
1197 }
1204 java.lang.Iterable<? extends java.lang.Long> values) {
1205 ensureTransitionHeadIsMutable();
1206 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1207 values, transitionHead_);
1208 bitField0_ |= 0x00000008;
1209 onChanged();
1210 return this;
1211 }
1217 transitionHead_ = emptyLongList();
1218 bitField0_ = (bitField0_ & ~0x00000008);
1219 onChanged();
1220 return this;
1221 }
1222
1223 private com.google.protobuf.Internal.LongList transitionLabel_ = emptyLongList();
1224 private void ensureTransitionLabelIsMutable() {
1225 if (!transitionLabel_.isModifiable()) {
1226 transitionLabel_ = makeMutableCopy(transitionLabel_);
1227 }
1228 bitField0_ |= 0x00000010;
1229 }
1234 public java.util.List<java.lang.Long>
1236 transitionLabel_.makeImmutable();
1237 return transitionLabel_;
1238 }
1244 return transitionLabel_.size();
1245 }
1251 public long getTransitionLabel(int index) {
1252 return transitionLabel_.getLong(index);
1253 }
1261 int index, long value) {
1262
1263 ensureTransitionLabelIsMutable();
1264 transitionLabel_.setLong(index, value);
1265 bitField0_ |= 0x00000010;
1266 onChanged();
1267 return this;
1268 }
1274 public Builder addTransitionLabel(long value) {
1275
1276 ensureTransitionLabelIsMutable();
1277 transitionLabel_.addLong(value);
1278 bitField0_ |= 0x00000010;
1279 onChanged();
1280 return this;
1281 }
1288 java.lang.Iterable<? extends java.lang.Long> values) {
1289 ensureTransitionLabelIsMutable();
1290 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1291 values, transitionLabel_);
1292 bitField0_ |= 0x00000010;
1293 onChanged();
1294 return this;
1295 }
1301 transitionLabel_ = emptyLongList();
1302 bitField0_ = (bitField0_ & ~0x00000010);
1303 onChanged();
1304 return this;
1305 }
1306
1307 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
1308 private void ensureVarsIsMutable() {
1309 if (!vars_.isModifiable()) {
1310 vars_ = makeMutableCopy(vars_);
1311 }
1312 bitField0_ |= 0x00000020;
1313 }
1323 public java.util.List<java.lang.Integer>
1325 vars_.makeImmutable();
1326 return vars_;
1327 }
1337 public int getVarsCount() {
1338 return vars_.size();
1339 }
1350 public int getVars(int index) {
1351 return vars_.getInt(index);
1352 }
1365 int index, int value) {
1366
1367 ensureVarsIsMutable();
1368 vars_.setInt(index, value);
1369 bitField0_ |= 0x00000020;
1370 onChanged();
1371 return this;
1372 }
1383 public Builder addVars(int value) {
1384
1385 ensureVarsIsMutable();
1386 vars_.addInt(value);
1387 bitField0_ |= 0x00000020;
1388 onChanged();
1389 return this;
1390 }
1402 java.lang.Iterable<? extends java.lang.Integer> values) {
1403 ensureVarsIsMutable();
1404 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1405 values, vars_);
1406 bitField0_ |= 0x00000020;
1407 onChanged();
1408 return this;
1409 }
1420 vars_ = emptyIntList();
1421 bitField0_ = (bitField0_ & ~0x00000020);
1422 onChanged();
1423 return this;
1424 }
1425 @java.lang.Override
1427 final com.google.protobuf.UnknownFieldSet unknownFields) {
1428 return super.setUnknownFields(unknownFields);
1429 }
1430
1431 @java.lang.Override
1433 final com.google.protobuf.UnknownFieldSet unknownFields) {
1434 return super.mergeUnknownFields(unknownFields);
1435 }
1436
1437
1438 // @@protoc_insertion_point(builder_scope:operations_research.sat.AutomatonConstraintProto)
1439 }
1440
1441 // @@protoc_insertion_point(class_scope:operations_research.sat.AutomatonConstraintProto)
1442 private static final com.google.ortools.sat.AutomatonConstraintProto DEFAULT_INSTANCE;
1443 static {
1444 DEFAULT_INSTANCE = new com.google.ortools.sat.AutomatonConstraintProto();
1445 }
1446
1448 return DEFAULT_INSTANCE;
1449 }
1450
1451 private static final com.google.protobuf.Parser<AutomatonConstraintProto>
1452 PARSER = new com.google.protobuf.AbstractParser<AutomatonConstraintProto>() {
1453 @java.lang.Override
1454 public AutomatonConstraintProto parsePartialFrom(
1455 com.google.protobuf.CodedInputStream input,
1456 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1457 throws com.google.protobuf.InvalidProtocolBufferException {
1458 Builder builder = newBuilder();
1459 try {
1460 builder.mergeFrom(input, extensionRegistry);
1461 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1462 throw e.setUnfinishedMessage(builder.buildPartial());
1463 } catch (com.google.protobuf.UninitializedMessageException e) {
1464 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1465 } catch (java.io.IOException e) {
1466 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1467 .setUnfinishedMessage(builder.buildPartial());
1468 }
1469 return builder.buildPartial();
1470 }
1471 };
1472
1473 public static com.google.protobuf.Parser<AutomatonConstraintProto> parser() {
1474 return PARSER;
1475 }
1476
1477 @java.lang.Override
1478 public com.google.protobuf.Parser<AutomatonConstraintProto> getParserForType() {
1479 return PARSER;
1480 }
1481
1482 @java.lang.Override
1486
1487}
1488
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addAllVars(java.lang.Iterable<? extends java.lang.Integer > values)
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addAllTransitionLabel(java.lang.Iterable<? extends java.lang.Long > values)
com.google.ortools.sat.AutomatonConstraintProto build()
com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType()
Builder addAllTransitionHead(java.lang.Iterable<? extends java.lang.Long > values)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.AutomatonConstraintProto buildPartial()
Builder addAllTransitionTail(java.lang.Iterable<? extends java.lang.Long > values)
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder addAllFinalStates(java.lang.Iterable<? extends java.lang.Long > values)
static com.google.ortools.sat.AutomatonConstraintProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
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, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< AutomatonConstraintProto > parser()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static Builder newBuilder(com.google.ortools.sat.AutomatonConstraintProto prototype)
com.google.ortools.sat.AutomatonConstraintProto getDefaultInstanceForType()
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(com.google.protobuf.ByteString data)
java.lang.Object newInstance(UnusedPrivateParameter unused)
static com.google.ortools.sat.AutomatonConstraintProto parseFrom(byte[] data)
com.google.protobuf.Parser< AutomatonConstraintProto > getParserForType()
static com.google.ortools.sat.AutomatonConstraintProto getDefaultInstance()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()