Google OR-Tools v9.11
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: 4.26.1
5package com.google.ortools.sat;
6
15public final class AutomatonConstraintProto extends
16 com.google.protobuf.GeneratedMessage implements
17 // @@protoc_insertion_point(message_implements:operations_research.sat.AutomatonConstraintProto)
19private static final long serialVersionUID = 0L;
20 static {
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
23 /* major= */ 4,
24 /* minor= */ 26,
25 /* patch= */ 1,
26 /* suffix= */ "",
27 AutomatonConstraintProto.class.getName());
28 }
29 // Use AutomatonConstraintProto.newBuilder() to construct.
30 private AutomatonConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
31 super(builder);
32 }
33 private AutomatonConstraintProto() {
34 finalStates_ = emptyLongList();
35 transitionTail_ = emptyLongList();
36 transitionHead_ = emptyLongList();
37 transitionLabel_ = emptyLongList();
38 vars_ = emptyIntList();
39 }
40
41 public static final com.google.protobuf.Descriptors.Descriptor
43 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
44 }
45
46 @java.lang.Override
47 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
49 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable
50 .ensureFieldAccessorsInitialized(
51 com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class);
52 }
53
54 public static final int STARTING_STATE_FIELD_NUMBER = 2;
55 private long startingState_ = 0L;
66 @java.lang.Override
67 public long getStartingState() {
68 return startingState_;
69 }
70
71 public static final int FINAL_STATES_FIELD_NUMBER = 3;
72 @SuppressWarnings("serial")
73 private com.google.protobuf.Internal.LongList finalStates_ =
74 emptyLongList();
79 @java.lang.Override
80 public java.util.List<java.lang.Long>
82 return finalStates_;
83 }
88 public int getFinalStatesCount() {
89 return finalStates_.size();
90 }
96 public long getFinalStates(int index) {
97 return finalStates_.getLong(index);
98 }
99 private int finalStatesMemoizedSerializedSize = -1;
100
101 public static final int TRANSITION_TAIL_FIELD_NUMBER = 4;
102 @SuppressWarnings("serial")
103 private com.google.protobuf.Internal.LongList transitionTail_ =
104 emptyLongList();
115 @java.lang.Override
116 public java.util.List<java.lang.Long>
118 return transitionTail_;
119 }
131 return transitionTail_.size();
132 }
144 public long getTransitionTail(int index) {
145 return transitionTail_.getLong(index);
146 }
147 private int transitionTailMemoizedSerializedSize = -1;
148
149 public static final int TRANSITION_HEAD_FIELD_NUMBER = 5;
150 @SuppressWarnings("serial")
151 private com.google.protobuf.Internal.LongList transitionHead_ =
152 emptyLongList();
157 @java.lang.Override
158 public java.util.List<java.lang.Long>
160 return transitionHead_;
161 }
167 return transitionHead_.size();
168 }
174 public long getTransitionHead(int index) {
175 return transitionHead_.getLong(index);
176 }
177 private int transitionHeadMemoizedSerializedSize = -1;
178
179 public static final int TRANSITION_LABEL_FIELD_NUMBER = 6;
180 @SuppressWarnings("serial")
181 private com.google.protobuf.Internal.LongList transitionLabel_ =
182 emptyLongList();
187 @java.lang.Override
188 public java.util.List<java.lang.Long>
190 return transitionLabel_;
191 }
197 return transitionLabel_.size();
198 }
204 public long getTransitionLabel(int index) {
205 return transitionLabel_.getLong(index);
206 }
207 private int transitionLabelMemoizedSerializedSize = -1;
208
209 public static final int VARS_FIELD_NUMBER = 7;
210 @SuppressWarnings("serial")
211 private com.google.protobuf.Internal.IntList vars_ =
212 emptyIntList();
222 @java.lang.Override
223 public java.util.List<java.lang.Integer>
225 return vars_;
226 }
236 public int getVarsCount() {
237 return vars_.size();
238 }
249 public int getVars(int index) {
250 return vars_.getInt(index);
251 }
252 private int varsMemoizedSerializedSize = -1;
253
254 private byte memoizedIsInitialized = -1;
255 @java.lang.Override
256 public final boolean isInitialized() {
257 byte isInitialized = memoizedIsInitialized;
258 if (isInitialized == 1) return true;
259 if (isInitialized == 0) return false;
260
261 memoizedIsInitialized = 1;
262 return true;
263 }
264
265 @java.lang.Override
266 public void writeTo(com.google.protobuf.CodedOutputStream output)
267 throws java.io.IOException {
269 if (startingState_ != 0L) {
270 output.writeInt64(2, startingState_);
271 }
272 if (getFinalStatesList().size() > 0) {
273 output.writeUInt32NoTag(26);
274 output.writeUInt32NoTag(finalStatesMemoizedSerializedSize);
275 }
276 for (int i = 0; i < finalStates_.size(); i++) {
277 output.writeInt64NoTag(finalStates_.getLong(i));
278 }
279 if (getTransitionTailList().size() > 0) {
280 output.writeUInt32NoTag(34);
281 output.writeUInt32NoTag(transitionTailMemoizedSerializedSize);
282 }
283 for (int i = 0; i < transitionTail_.size(); i++) {
284 output.writeInt64NoTag(transitionTail_.getLong(i));
285 }
286 if (getTransitionHeadList().size() > 0) {
287 output.writeUInt32NoTag(42);
288 output.writeUInt32NoTag(transitionHeadMemoizedSerializedSize);
289 }
290 for (int i = 0; i < transitionHead_.size(); i++) {
291 output.writeInt64NoTag(transitionHead_.getLong(i));
292 }
293 if (getTransitionLabelList().size() > 0) {
294 output.writeUInt32NoTag(50);
295 output.writeUInt32NoTag(transitionLabelMemoizedSerializedSize);
296 }
297 for (int i = 0; i < transitionLabel_.size(); i++) {
298 output.writeInt64NoTag(transitionLabel_.getLong(i));
299 }
300 if (getVarsList().size() > 0) {
301 output.writeUInt32NoTag(58);
302 output.writeUInt32NoTag(varsMemoizedSerializedSize);
303 }
304 for (int i = 0; i < vars_.size(); i++) {
305 output.writeInt32NoTag(vars_.getInt(i));
306 }
307 getUnknownFields().writeTo(output);
308 }
309
310 @java.lang.Override
311 public int getSerializedSize() {
312 int size = memoizedSize;
313 if (size != -1) return size;
314
315 size = 0;
316 if (startingState_ != 0L) {
317 size += com.google.protobuf.CodedOutputStream
318 .computeInt64Size(2, startingState_);
319 }
320 {
321 int dataSize = 0;
322 for (int i = 0; i < finalStates_.size(); i++) {
323 dataSize += com.google.protobuf.CodedOutputStream
324 .computeInt64SizeNoTag(finalStates_.getLong(i));
325 }
326 size += dataSize;
327 if (!getFinalStatesList().isEmpty()) {
328 size += 1;
329 size += com.google.protobuf.CodedOutputStream
330 .computeInt32SizeNoTag(dataSize);
331 }
332 finalStatesMemoizedSerializedSize = dataSize;
333 }
334 {
335 int dataSize = 0;
336 for (int i = 0; i < transitionTail_.size(); i++) {
337 dataSize += com.google.protobuf.CodedOutputStream
338 .computeInt64SizeNoTag(transitionTail_.getLong(i));
339 }
340 size += dataSize;
341 if (!getTransitionTailList().isEmpty()) {
342 size += 1;
343 size += com.google.protobuf.CodedOutputStream
344 .computeInt32SizeNoTag(dataSize);
345 }
346 transitionTailMemoizedSerializedSize = dataSize;
347 }
348 {
349 int dataSize = 0;
350 for (int i = 0; i < transitionHead_.size(); i++) {
351 dataSize += com.google.protobuf.CodedOutputStream
352 .computeInt64SizeNoTag(transitionHead_.getLong(i));
353 }
354 size += dataSize;
355 if (!getTransitionHeadList().isEmpty()) {
356 size += 1;
357 size += com.google.protobuf.CodedOutputStream
358 .computeInt32SizeNoTag(dataSize);
359 }
360 transitionHeadMemoizedSerializedSize = dataSize;
361 }
362 {
363 int dataSize = 0;
364 for (int i = 0; i < transitionLabel_.size(); i++) {
365 dataSize += com.google.protobuf.CodedOutputStream
366 .computeInt64SizeNoTag(transitionLabel_.getLong(i));
367 }
368 size += dataSize;
369 if (!getTransitionLabelList().isEmpty()) {
370 size += 1;
371 size += com.google.protobuf.CodedOutputStream
372 .computeInt32SizeNoTag(dataSize);
373 }
374 transitionLabelMemoizedSerializedSize = dataSize;
375 }
376 {
377 int dataSize = 0;
378 for (int i = 0; i < vars_.size(); i++) {
379 dataSize += com.google.protobuf.CodedOutputStream
380 .computeInt32SizeNoTag(vars_.getInt(i));
381 }
382 size += dataSize;
383 if (!getVarsList().isEmpty()) {
384 size += 1;
385 size += com.google.protobuf.CodedOutputStream
386 .computeInt32SizeNoTag(dataSize);
387 }
388 varsMemoizedSerializedSize = dataSize;
389 }
390 size += getUnknownFields().getSerializedSize();
391 memoizedSize = size;
392 return size;
393 }
394
395 @java.lang.Override
396 public boolean equals(final java.lang.Object obj) {
397 if (obj == this) {
398 return true;
399 }
400 if (!(obj instanceof com.google.ortools.sat.AutomatonConstraintProto)) {
401 return super.equals(obj);
402 }
403 com.google.ortools.sat.AutomatonConstraintProto other = (com.google.ortools.sat.AutomatonConstraintProto) obj;
404
405 if (getStartingState()
406 != other.getStartingState()) return false;
407 if (!getFinalStatesList()
408 .equals(other.getFinalStatesList())) return false;
410 .equals(other.getTransitionTailList())) return false;
412 .equals(other.getTransitionHeadList())) return false;
414 .equals(other.getTransitionLabelList())) return false;
415 if (!getVarsList()
416 .equals(other.getVarsList())) return false;
417 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
418 return true;
419 }
420
421 @java.lang.Override
422 public int hashCode() {
423 if (memoizedHashCode != 0) {
424 return memoizedHashCode;
425 }
426 int hash = 41;
427 hash = (19 * hash) + getDescriptor().hashCode();
428 hash = (37 * hash) + STARTING_STATE_FIELD_NUMBER;
429 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
431 if (getFinalStatesCount() > 0) {
432 hash = (37 * hash) + FINAL_STATES_FIELD_NUMBER;
433 hash = (53 * hash) + getFinalStatesList().hashCode();
434 }
435 if (getTransitionTailCount() > 0) {
436 hash = (37 * hash) + TRANSITION_TAIL_FIELD_NUMBER;
437 hash = (53 * hash) + getTransitionTailList().hashCode();
438 }
439 if (getTransitionHeadCount() > 0) {
440 hash = (37 * hash) + TRANSITION_HEAD_FIELD_NUMBER;
441 hash = (53 * hash) + getTransitionHeadList().hashCode();
442 }
443 if (getTransitionLabelCount() > 0) {
444 hash = (37 * hash) + TRANSITION_LABEL_FIELD_NUMBER;
445 hash = (53 * hash) + getTransitionLabelList().hashCode();
446 }
447 if (getVarsCount() > 0) {
448 hash = (37 * hash) + VARS_FIELD_NUMBER;
449 hash = (53 * hash) + getVarsList().hashCode();
450 }
451 hash = (29 * hash) + getUnknownFields().hashCode();
452 memoizedHashCode = hash;
453 return hash;
454 }
455
457 java.nio.ByteBuffer data)
458 throws com.google.protobuf.InvalidProtocolBufferException {
459 return PARSER.parseFrom(data);
460 }
462 java.nio.ByteBuffer data,
463 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
464 throws com.google.protobuf.InvalidProtocolBufferException {
465 return PARSER.parseFrom(data, extensionRegistry);
466 }
468 com.google.protobuf.ByteString data)
469 throws com.google.protobuf.InvalidProtocolBufferException {
470 return PARSER.parseFrom(data);
471 }
473 com.google.protobuf.ByteString data,
474 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
475 throws com.google.protobuf.InvalidProtocolBufferException {
476 return PARSER.parseFrom(data, extensionRegistry);
477 }
479 throws com.google.protobuf.InvalidProtocolBufferException {
480 return PARSER.parseFrom(data);
481 }
483 byte[] data,
484 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
485 throws com.google.protobuf.InvalidProtocolBufferException {
486 return PARSER.parseFrom(data, extensionRegistry);
487 }
488 public static com.google.ortools.sat.AutomatonConstraintProto parseFrom(java.io.InputStream input)
489 throws java.io.IOException {
490 return com.google.protobuf.GeneratedMessage
491 .parseWithIOException(PARSER, input);
492 }
494 java.io.InputStream input,
495 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
496 throws java.io.IOException {
497 return com.google.protobuf.GeneratedMessage
498 .parseWithIOException(PARSER, input, extensionRegistry);
499 }
500
502 throws java.io.IOException {
503 return com.google.protobuf.GeneratedMessage
504 .parseDelimitedWithIOException(PARSER, input);
505 }
506
508 java.io.InputStream input,
509 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
510 throws java.io.IOException {
511 return com.google.protobuf.GeneratedMessage
512 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
513 }
515 com.google.protobuf.CodedInputStream input)
516 throws java.io.IOException {
517 return com.google.protobuf.GeneratedMessage
518 .parseWithIOException(PARSER, input);
519 }
521 com.google.protobuf.CodedInputStream input,
522 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
523 throws java.io.IOException {
524 return com.google.protobuf.GeneratedMessage
525 .parseWithIOException(PARSER, input, extensionRegistry);
526 }
527
528 @java.lang.Override
529 public Builder newBuilderForType() { return newBuilder(); }
530 public static Builder newBuilder() {
531 return DEFAULT_INSTANCE.toBuilder();
532 }
533 public static Builder newBuilder(com.google.ortools.sat.AutomatonConstraintProto prototype) {
534 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
535 }
536 @java.lang.Override
538 return this == DEFAULT_INSTANCE
539 ? new Builder() : new Builder().mergeFrom(this);
540 }
541
542 @java.lang.Override
544 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
545 Builder builder = new Builder(parent);
546 return builder;
547 }
556 public static final class Builder extends
557 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
558 // @@protoc_insertion_point(builder_implements:operations_research.sat.AutomatonConstraintProto)
559 com.google.ortools.sat.AutomatonConstraintProtoOrBuilder {
560 public static final com.google.protobuf.Descriptors.Descriptor
562 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
563 }
564
565 @java.lang.Override
566 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
568 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_fieldAccessorTable
569 .ensureFieldAccessorsInitialized(
570 com.google.ortools.sat.AutomatonConstraintProto.class, com.google.ortools.sat.AutomatonConstraintProto.Builder.class);
571 }
572
573 // Construct using com.google.ortools.sat.AutomatonConstraintProto.newBuilder()
574 private Builder() {
575
576 }
577
578 private Builder(
579 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
580 super(parent);
581
582 }
583 @java.lang.Override
584 public Builder clear() {
585 super.clear();
586 bitField0_ = 0;
587 startingState_ = 0L;
588 finalStates_ = emptyLongList();
589 transitionTail_ = emptyLongList();
590 transitionHead_ = emptyLongList();
591 transitionLabel_ = emptyLongList();
592 vars_ = emptyIntList();
593 return this;
594 }
595
596 @java.lang.Override
597 public com.google.protobuf.Descriptors.Descriptor
599 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
600 }
601
602 @java.lang.Override
604 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
605 }
606
607 @java.lang.Override
610 if (!result.isInitialized()) {
611 throw newUninitializedMessageException(result);
612 }
613 return result;
614 }
615
616 @java.lang.Override
618 com.google.ortools.sat.AutomatonConstraintProto result = new com.google.ortools.sat.AutomatonConstraintProto(this);
619 if (bitField0_ != 0) { buildPartial0(result); }
620 onBuilt();
621 return result;
622 }
623
624 private void buildPartial0(com.google.ortools.sat.AutomatonConstraintProto result) {
625 int from_bitField0_ = bitField0_;
626 if (((from_bitField0_ & 0x00000001) != 0)) {
627 result.startingState_ = startingState_;
628 }
629 if (((from_bitField0_ & 0x00000002) != 0)) {
630 finalStates_.makeImmutable();
631 result.finalStates_ = finalStates_;
632 }
633 if (((from_bitField0_ & 0x00000004) != 0)) {
634 transitionTail_.makeImmutable();
635 result.transitionTail_ = transitionTail_;
636 }
637 if (((from_bitField0_ & 0x00000008) != 0)) {
638 transitionHead_.makeImmutable();
639 result.transitionHead_ = transitionHead_;
640 }
641 if (((from_bitField0_ & 0x00000010) != 0)) {
642 transitionLabel_.makeImmutable();
643 result.transitionLabel_ = transitionLabel_;
644 }
645 if (((from_bitField0_ & 0x00000020) != 0)) {
646 vars_.makeImmutable();
647 result.vars_ = vars_;
648 }
649 }
650
651 @java.lang.Override
652 public Builder mergeFrom(com.google.protobuf.Message other) {
653 if (other instanceof com.google.ortools.sat.AutomatonConstraintProto) {
654 return mergeFrom((com.google.ortools.sat.AutomatonConstraintProto)other);
655 } else {
656 super.mergeFrom(other);
657 return this;
658 }
659 }
660
661 public Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other) {
662 if (other == com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) return this;
663 if (other.getStartingState() != 0L) {
664 setStartingState(other.getStartingState());
665 }
666 if (!other.finalStates_.isEmpty()) {
667 if (finalStates_.isEmpty()) {
668 finalStates_ = other.finalStates_;
669 finalStates_.makeImmutable();
670 bitField0_ |= 0x00000002;
671 } else {
672 ensureFinalStatesIsMutable();
673 finalStates_.addAll(other.finalStates_);
674 }
675 onChanged();
676 }
677 if (!other.transitionTail_.isEmpty()) {
678 if (transitionTail_.isEmpty()) {
679 transitionTail_ = other.transitionTail_;
680 transitionTail_.makeImmutable();
681 bitField0_ |= 0x00000004;
682 } else {
683 ensureTransitionTailIsMutable();
684 transitionTail_.addAll(other.transitionTail_);
685 }
686 onChanged();
687 }
688 if (!other.transitionHead_.isEmpty()) {
689 if (transitionHead_.isEmpty()) {
690 transitionHead_ = other.transitionHead_;
691 transitionHead_.makeImmutable();
692 bitField0_ |= 0x00000008;
693 } else {
694 ensureTransitionHeadIsMutable();
695 transitionHead_.addAll(other.transitionHead_);
696 }
697 onChanged();
698 }
699 if (!other.transitionLabel_.isEmpty()) {
700 if (transitionLabel_.isEmpty()) {
701 transitionLabel_ = other.transitionLabel_;
702 transitionLabel_.makeImmutable();
703 bitField0_ |= 0x00000010;
704 } else {
705 ensureTransitionLabelIsMutable();
706 transitionLabel_.addAll(other.transitionLabel_);
707 }
708 onChanged();
709 }
710 if (!other.vars_.isEmpty()) {
711 if (vars_.isEmpty()) {
712 vars_ = other.vars_;
713 vars_.makeImmutable();
714 bitField0_ |= 0x00000020;
715 } else {
716 ensureVarsIsMutable();
717 vars_.addAll(other.vars_);
718 }
719 onChanged();
720 }
721 this.mergeUnknownFields(other.getUnknownFields());
722 onChanged();
723 return this;
724 }
725
726 @java.lang.Override
727 public final boolean isInitialized() {
728 return true;
729 }
730
731 @java.lang.Override
733 com.google.protobuf.CodedInputStream input,
734 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
735 throws java.io.IOException {
736 if (extensionRegistry == null) {
737 throw new java.lang.NullPointerException();
738 }
739 try {
740 boolean done = false;
741 while (!done) {
742 int tag = input.readTag();
743 switch (tag) {
744 case 0:
745 done = true;
746 break;
747 case 16: {
748 startingState_ = input.readInt64();
749 bitField0_ |= 0x00000001;
750 break;
751 } // case 16
752 case 24: {
753 long v = input.readInt64();
754 ensureFinalStatesIsMutable();
755 finalStates_.addLong(v);
756 break;
757 } // case 24
758 case 26: {
759 int length = input.readRawVarint32();
760 int limit = input.pushLimit(length);
761 ensureFinalStatesIsMutable();
762 while (input.getBytesUntilLimit() > 0) {
763 finalStates_.addLong(input.readInt64());
764 }
765 input.popLimit(limit);
766 break;
767 } // case 26
768 case 32: {
769 long v = input.readInt64();
770 ensureTransitionTailIsMutable();
771 transitionTail_.addLong(v);
772 break;
773 } // case 32
774 case 34: {
775 int length = input.readRawVarint32();
776 int limit = input.pushLimit(length);
777 ensureTransitionTailIsMutable();
778 while (input.getBytesUntilLimit() > 0) {
779 transitionTail_.addLong(input.readInt64());
780 }
781 input.popLimit(limit);
782 break;
783 } // case 34
784 case 40: {
785 long v = input.readInt64();
786 ensureTransitionHeadIsMutable();
787 transitionHead_.addLong(v);
788 break;
789 } // case 40
790 case 42: {
791 int length = input.readRawVarint32();
792 int limit = input.pushLimit(length);
793 ensureTransitionHeadIsMutable();
794 while (input.getBytesUntilLimit() > 0) {
795 transitionHead_.addLong(input.readInt64());
796 }
797 input.popLimit(limit);
798 break;
799 } // case 42
800 case 48: {
801 long v = input.readInt64();
802 ensureTransitionLabelIsMutable();
803 transitionLabel_.addLong(v);
804 break;
805 } // case 48
806 case 50: {
807 int length = input.readRawVarint32();
808 int limit = input.pushLimit(length);
809 ensureTransitionLabelIsMutable();
810 while (input.getBytesUntilLimit() > 0) {
811 transitionLabel_.addLong(input.readInt64());
812 }
813 input.popLimit(limit);
814 break;
815 } // case 50
816 case 56: {
817 int v = input.readInt32();
818 ensureVarsIsMutable();
819 vars_.addInt(v);
820 break;
821 } // case 56
822 case 58: {
823 int length = input.readRawVarint32();
824 int limit = input.pushLimit(length);
825 ensureVarsIsMutable();
826 while (input.getBytesUntilLimit() > 0) {
827 vars_.addInt(input.readInt32());
828 }
829 input.popLimit(limit);
830 break;
831 } // case 58
832 default: {
833 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
834 done = true; // was an endgroup tag
835 }
836 break;
837 } // default:
838 } // switch (tag)
839 } // while (!done)
840 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
841 throw e.unwrapIOException();
842 } finally {
843 onChanged();
844 } // finally
845 return this;
846 }
847 private int bitField0_;
848
849 private long startingState_ ;
860 @java.lang.Override
861 public long getStartingState() {
862 return startingState_;
863 }
875 public Builder setStartingState(long value) {
876
877 startingState_ = value;
878 bitField0_ |= 0x00000001;
879 onChanged();
880 return this;
881 }
893 bitField0_ = (bitField0_ & ~0x00000001);
894 startingState_ = 0L;
895 onChanged();
896 return this;
897 }
898
899 private com.google.protobuf.Internal.LongList finalStates_ = emptyLongList();
900 private void ensureFinalStatesIsMutable() {
901 if (!finalStates_.isModifiable()) {
902 finalStates_ = makeMutableCopy(finalStates_);
903 }
904 bitField0_ |= 0x00000002;
905 }
910 public java.util.List<java.lang.Long>
912 finalStates_.makeImmutable();
913 return finalStates_;
914 }
919 public int getFinalStatesCount() {
920 return finalStates_.size();
921 }
927 public long getFinalStates(int index) {
928 return finalStates_.getLong(index);
929 }
937 int index, long value) {
938
939 ensureFinalStatesIsMutable();
940 finalStates_.setLong(index, value);
941 bitField0_ |= 0x00000002;
942 onChanged();
943 return this;
944 }
950 public Builder addFinalStates(long value) {
951
952 ensureFinalStatesIsMutable();
953 finalStates_.addLong(value);
954 bitField0_ |= 0x00000002;
955 onChanged();
956 return this;
957 }
964 java.lang.Iterable<? extends java.lang.Long> values) {
965 ensureFinalStatesIsMutable();
966 com.google.protobuf.AbstractMessageLite.Builder.addAll(
967 values, finalStates_);
968 bitField0_ |= 0x00000002;
969 onChanged();
970 return this;
971 }
977 finalStates_ = emptyLongList();
978 bitField0_ = (bitField0_ & ~0x00000002);
979 onChanged();
980 return this;
981 }
982
983 private com.google.protobuf.Internal.LongList transitionTail_ = emptyLongList();
984 private void ensureTransitionTailIsMutable() {
985 if (!transitionTail_.isModifiable()) {
986 transitionTail_ = makeMutableCopy(transitionTail_);
987 }
988 bitField0_ |= 0x00000004;
989 }
1000 public java.util.List<java.lang.Long>
1002 transitionTail_.makeImmutable();
1003 return transitionTail_;
1004 }
1016 return transitionTail_.size();
1017 }
1029 public long getTransitionTail(int index) {
1030 return transitionTail_.getLong(index);
1031 }
1045 int index, long value) {
1046
1047 ensureTransitionTailIsMutable();
1048 transitionTail_.setLong(index, value);
1049 bitField0_ |= 0x00000004;
1050 onChanged();
1051 return this;
1052 }
1064 public Builder addTransitionTail(long value) {
1065
1066 ensureTransitionTailIsMutable();
1067 transitionTail_.addLong(value);
1068 bitField0_ |= 0x00000004;
1069 onChanged();
1070 return this;
1071 }
1084 java.lang.Iterable<? extends java.lang.Long> values) {
1085 ensureTransitionTailIsMutable();
1086 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1087 values, transitionTail_);
1088 bitField0_ |= 0x00000004;
1089 onChanged();
1090 return this;
1091 }
1103 transitionTail_ = emptyLongList();
1104 bitField0_ = (bitField0_ & ~0x00000004);
1105 onChanged();
1106 return this;
1107 }
1108
1109 private com.google.protobuf.Internal.LongList transitionHead_ = emptyLongList();
1110 private void ensureTransitionHeadIsMutable() {
1111 if (!transitionHead_.isModifiable()) {
1112 transitionHead_ = makeMutableCopy(transitionHead_);
1113 }
1114 bitField0_ |= 0x00000008;
1115 }
1120 public java.util.List<java.lang.Long>
1122 transitionHead_.makeImmutable();
1123 return transitionHead_;
1124 }
1130 return transitionHead_.size();
1131 }
1137 public long getTransitionHead(int index) {
1138 return transitionHead_.getLong(index);
1139 }
1147 int index, long value) {
1148
1149 ensureTransitionHeadIsMutable();
1150 transitionHead_.setLong(index, value);
1151 bitField0_ |= 0x00000008;
1152 onChanged();
1153 return this;
1154 }
1160 public Builder addTransitionHead(long value) {
1161
1162 ensureTransitionHeadIsMutable();
1163 transitionHead_.addLong(value);
1164 bitField0_ |= 0x00000008;
1165 onChanged();
1166 return this;
1167 }
1174 java.lang.Iterable<? extends java.lang.Long> values) {
1175 ensureTransitionHeadIsMutable();
1176 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1177 values, transitionHead_);
1178 bitField0_ |= 0x00000008;
1179 onChanged();
1180 return this;
1181 }
1187 transitionHead_ = emptyLongList();
1188 bitField0_ = (bitField0_ & ~0x00000008);
1189 onChanged();
1190 return this;
1191 }
1192
1193 private com.google.protobuf.Internal.LongList transitionLabel_ = emptyLongList();
1194 private void ensureTransitionLabelIsMutable() {
1195 if (!transitionLabel_.isModifiable()) {
1196 transitionLabel_ = makeMutableCopy(transitionLabel_);
1197 }
1198 bitField0_ |= 0x00000010;
1199 }
1204 public java.util.List<java.lang.Long>
1206 transitionLabel_.makeImmutable();
1207 return transitionLabel_;
1208 }
1214 return transitionLabel_.size();
1215 }
1221 public long getTransitionLabel(int index) {
1222 return transitionLabel_.getLong(index);
1223 }
1231 int index, long value) {
1232
1233 ensureTransitionLabelIsMutable();
1234 transitionLabel_.setLong(index, value);
1235 bitField0_ |= 0x00000010;
1236 onChanged();
1237 return this;
1238 }
1244 public Builder addTransitionLabel(long value) {
1245
1246 ensureTransitionLabelIsMutable();
1247 transitionLabel_.addLong(value);
1248 bitField0_ |= 0x00000010;
1249 onChanged();
1250 return this;
1251 }
1258 java.lang.Iterable<? extends java.lang.Long> values) {
1259 ensureTransitionLabelIsMutable();
1260 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1261 values, transitionLabel_);
1262 bitField0_ |= 0x00000010;
1263 onChanged();
1264 return this;
1265 }
1271 transitionLabel_ = emptyLongList();
1272 bitField0_ = (bitField0_ & ~0x00000010);
1273 onChanged();
1274 return this;
1275 }
1276
1277 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
1278 private void ensureVarsIsMutable() {
1279 if (!vars_.isModifiable()) {
1280 vars_ = makeMutableCopy(vars_);
1281 }
1282 bitField0_ |= 0x00000020;
1283 }
1293 public java.util.List<java.lang.Integer>
1295 vars_.makeImmutable();
1296 return vars_;
1297 }
1307 public int getVarsCount() {
1308 return vars_.size();
1309 }
1320 public int getVars(int index) {
1321 return vars_.getInt(index);
1322 }
1335 int index, int value) {
1336
1337 ensureVarsIsMutable();
1338 vars_.setInt(index, value);
1339 bitField0_ |= 0x00000020;
1340 onChanged();
1341 return this;
1342 }
1353 public Builder addVars(int value) {
1354
1355 ensureVarsIsMutable();
1356 vars_.addInt(value);
1357 bitField0_ |= 0x00000020;
1358 onChanged();
1359 return this;
1360 }
1372 java.lang.Iterable<? extends java.lang.Integer> values) {
1373 ensureVarsIsMutable();
1374 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1375 values, vars_);
1376 bitField0_ |= 0x00000020;
1377 onChanged();
1378 return this;
1379 }
1390 vars_ = emptyIntList();
1391 bitField0_ = (bitField0_ & ~0x00000020);
1392 onChanged();
1393 return this;
1394 }
1395
1396 // @@protoc_insertion_point(builder_scope:operations_research.sat.AutomatonConstraintProto)
1397 }
1398
1399 // @@protoc_insertion_point(class_scope:operations_research.sat.AutomatonConstraintProto)
1400 private static final com.google.ortools.sat.AutomatonConstraintProto DEFAULT_INSTANCE;
1401 static {
1402 DEFAULT_INSTANCE = new com.google.ortools.sat.AutomatonConstraintProto();
1403 }
1404
1406 return DEFAULT_INSTANCE;
1407 }
1408
1409 private static final com.google.protobuf.Parser<AutomatonConstraintProto>
1410 PARSER = new com.google.protobuf.AbstractParser<AutomatonConstraintProto>() {
1411 @java.lang.Override
1412 public AutomatonConstraintProto parsePartialFrom(
1413 com.google.protobuf.CodedInputStream input,
1414 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1415 throws com.google.protobuf.InvalidProtocolBufferException {
1416 Builder builder = newBuilder();
1417 try {
1418 builder.mergeFrom(input, extensionRegistry);
1419 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1420 throw e.setUnfinishedMessage(builder.buildPartial());
1421 } catch (com.google.protobuf.UninitializedMessageException e) {
1422 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1423 } catch (java.io.IOException e) {
1424 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1425 .setUnfinishedMessage(builder.buildPartial());
1426 }
1427 return builder.buildPartial();
1428 }
1429 };
1430
1431 public static com.google.protobuf.Parser<AutomatonConstraintProto> parser() {
1432 return PARSER;
1433 }
1434
1435 @java.lang.Override
1436 public com.google.protobuf.Parser<AutomatonConstraintProto> getParserForType() {
1437 return PARSER;
1438 }
1439
1440 @java.lang.Override
1444
1445}
1446
Builder addAllVars(java.lang.Iterable<? extends java.lang.Integer > values)
Builder mergeFrom(com.google.ortools.sat.AutomatonConstraintProto other)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
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)
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)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
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)
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.GeneratedMessage.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)
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()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)