5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
34 finalStates_ = emptyLongList();
35 transitionTail_ = emptyLongList();
36 transitionHead_ = emptyLongList();
37 transitionLabel_ = emptyLongList();
38 vars_ = emptyIntList();
41 public static final com.google.protobuf.Descriptors.Descriptor
43 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
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);
55 private long startingState_ = 0L;
68 return startingState_;
72 @SuppressWarnings(
"serial")
73 private com.google.protobuf.Internal.LongList finalStates_ =
80 public java.util.List<java.lang.Long>
89 return finalStates_.size();
97 return finalStates_.getLong(index);
99 private int finalStatesMemoizedSerializedSize = -1;
102 @SuppressWarnings(
"serial")
103 private com.google.protobuf.Internal.LongList transitionTail_ =
116 public java.util.List<java.lang.Long>
118 return transitionTail_;
131 return transitionTail_.size();
145 return transitionTail_.getLong(index);
147 private int transitionTailMemoizedSerializedSize = -1;
150 @SuppressWarnings(
"serial")
151 private com.google.protobuf.Internal.LongList transitionHead_ =
158 public java.util.List<java.lang.Long>
160 return transitionHead_;
167 return transitionHead_.size();
175 return transitionHead_.getLong(index);
177 private int transitionHeadMemoizedSerializedSize = -1;
180 @SuppressWarnings(
"serial")
181 private com.google.protobuf.Internal.LongList transitionLabel_ =
188 public java.util.List<java.lang.Long>
190 return transitionLabel_;
197 return transitionLabel_.size();
205 return transitionLabel_.getLong(index);
207 private int transitionLabelMemoizedSerializedSize = -1;
210 @SuppressWarnings(
"serial")
211 private com.google.protobuf.Internal.IntList vars_ =
223 public java.util.List<java.lang.Integer>
250 return vars_.getInt(index);
252 private int varsMemoizedSerializedSize = -1;
254 private byte memoizedIsInitialized = -1;
261 memoizedIsInitialized = 1;
266 public void writeTo(com.google.protobuf.CodedOutputStream output)
267 throws java.io.IOException {
269 if (startingState_ != 0L) {
270 output.writeInt64(2, startingState_);
273 output.writeUInt32NoTag(26);
274 output.writeUInt32NoTag(finalStatesMemoizedSerializedSize);
276 for (
int i = 0; i < finalStates_.size(); i++) {
277 output.writeInt64NoTag(finalStates_.getLong(i));
280 output.writeUInt32NoTag(34);
281 output.writeUInt32NoTag(transitionTailMemoizedSerializedSize);
283 for (
int i = 0; i < transitionTail_.size(); i++) {
284 output.writeInt64NoTag(transitionTail_.getLong(i));
287 output.writeUInt32NoTag(42);
288 output.writeUInt32NoTag(transitionHeadMemoizedSerializedSize);
290 for (
int i = 0; i < transitionHead_.size(); i++) {
291 output.writeInt64NoTag(transitionHead_.getLong(i));
294 output.writeUInt32NoTag(50);
295 output.writeUInt32NoTag(transitionLabelMemoizedSerializedSize);
297 for (
int i = 0; i < transitionLabel_.size(); i++) {
298 output.writeInt64NoTag(transitionLabel_.getLong(i));
301 output.writeUInt32NoTag(58);
302 output.writeUInt32NoTag(varsMemoizedSerializedSize);
304 for (
int i = 0; i < vars_.size(); i++) {
305 output.writeInt32NoTag(vars_.getInt(i));
307 getUnknownFields().writeTo(output);
312 int size = memoizedSize;
313 if (size != -1)
return size;
316 if (startingState_ != 0L) {
317 size += com.google.protobuf.CodedOutputStream
318 .computeInt64Size(2, startingState_);
322 for (
int i = 0; i < finalStates_.size(); i++) {
323 dataSize += com.google.protobuf.CodedOutputStream
324 .computeInt64SizeNoTag(finalStates_.getLong(i));
329 size += com.google.protobuf.CodedOutputStream
330 .computeInt32SizeNoTag(dataSize);
332 finalStatesMemoizedSerializedSize = dataSize;
336 for (
int i = 0; i < transitionTail_.size(); i++) {
337 dataSize += com.google.protobuf.CodedOutputStream
338 .computeInt64SizeNoTag(transitionTail_.getLong(i));
343 size += com.google.protobuf.CodedOutputStream
344 .computeInt32SizeNoTag(dataSize);
346 transitionTailMemoizedSerializedSize = dataSize;
350 for (
int i = 0; i < transitionHead_.size(); i++) {
351 dataSize += com.google.protobuf.CodedOutputStream
352 .computeInt64SizeNoTag(transitionHead_.getLong(i));
357 size += com.google.protobuf.CodedOutputStream
358 .computeInt32SizeNoTag(dataSize);
360 transitionHeadMemoizedSerializedSize = dataSize;
364 for (
int i = 0; i < transitionLabel_.size(); i++) {
365 dataSize += com.google.protobuf.CodedOutputStream
366 .computeInt64SizeNoTag(transitionLabel_.getLong(i));
371 size += com.google.protobuf.CodedOutputStream
372 .computeInt32SizeNoTag(dataSize);
374 transitionLabelMemoizedSerializedSize = dataSize;
378 for (
int i = 0; i < vars_.size(); i++) {
379 dataSize += com.google.protobuf.CodedOutputStream
380 .computeInt32SizeNoTag(vars_.getInt(i));
385 size += com.google.protobuf.CodedOutputStream
386 .computeInt32SizeNoTag(dataSize);
388 varsMemoizedSerializedSize = dataSize;
390 size += getUnknownFields().getSerializedSize();
396 public boolean equals(
final java.lang.Object obj) {
400 if (!(obj instanceof com.google.ortools.sat.AutomatonConstraintProto)) {
401 return super.equals(obj);
417 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
423 if (memoizedHashCode != 0) {
424 return memoizedHashCode;
429 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
451 hash = (29 * hash) + getUnknownFields().hashCode();
452 memoizedHashCode = hash;
457 java.nio.ByteBuffer data)
458 throws com.google.protobuf.InvalidProtocolBufferException {
459 return PARSER.parseFrom(data);
462 java.nio.ByteBuffer data,
463 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
464 throws com.google.protobuf.InvalidProtocolBufferException {
465 return PARSER.parseFrom(data, extensionRegistry);
468 com.google.protobuf.ByteString data)
469 throws com.google.protobuf.InvalidProtocolBufferException {
470 return PARSER.parseFrom(data);
473 com.google.protobuf.ByteString data,
474 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
475 throws com.google.protobuf.InvalidProtocolBufferException {
476 return PARSER.parseFrom(data, extensionRegistry);
479 throws com.google.protobuf.InvalidProtocolBufferException {
480 return PARSER.parseFrom(data);
484 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
485 throws com.google.protobuf.InvalidProtocolBufferException {
486 return PARSER.parseFrom(data, extensionRegistry);
489 throws java.io.IOException {
490 return com.google.protobuf.GeneratedMessage
491 .parseWithIOException(PARSER, input);
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);
502 throws java.io.IOException {
503 return com.google.protobuf.GeneratedMessage
504 .parseDelimitedWithIOException(PARSER, input);
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);
515 com.google.protobuf.CodedInputStream input)
516 throws java.io.IOException {
517 return com.google.protobuf.GeneratedMessage
518 .parseWithIOException(PARSER, input);
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);
538 return this == DEFAULT_INSTANCE
544 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
557 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
560 public static final com.google.protobuf.Descriptors.Descriptor
562 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
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);
579 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
588 finalStates_ = emptyLongList();
589 transitionTail_ = emptyLongList();
590 transitionHead_ = emptyLongList();
591 transitionLabel_ = emptyLongList();
592 vars_ = emptyIntList();
597 public com.google.protobuf.Descriptors.Descriptor
599 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AutomatonConstraintProto_descriptor;
604 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
611 throw newUninitializedMessageException(result);
619 if (bitField0_ != 0) { buildPartial0(result); }
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_;
629 if (((from_bitField0_ & 0x00000002) != 0)) {
630 finalStates_.makeImmutable();
631 result.finalStates_ = finalStates_;
633 if (((from_bitField0_ & 0x00000004) != 0)) {
634 transitionTail_.makeImmutable();
635 result.transitionTail_ = transitionTail_;
637 if (((from_bitField0_ & 0x00000008) != 0)) {
638 transitionHead_.makeImmutable();
639 result.transitionHead_ = transitionHead_;
641 if (((from_bitField0_ & 0x00000010) != 0)) {
642 transitionLabel_.makeImmutable();
643 result.transitionLabel_ = transitionLabel_;
645 if (((from_bitField0_ & 0x00000020) != 0)) {
646 vars_.makeImmutable();
647 result.vars_ = vars_;
653 if (other instanceof com.google.ortools.sat.AutomatonConstraintProto) {
654 return mergeFrom((com.google.ortools.sat.AutomatonConstraintProto)other);
656 super.mergeFrom(other);
662 if (other == com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance())
return this;
663 if (other.getStartingState() != 0L) {
666 if (!other.finalStates_.isEmpty()) {
667 if (finalStates_.isEmpty()) {
668 finalStates_ = other.finalStates_;
669 finalStates_.makeImmutable();
670 bitField0_ |= 0x00000002;
672 ensureFinalStatesIsMutable();
673 finalStates_.addAll(other.finalStates_);
677 if (!other.transitionTail_.isEmpty()) {
678 if (transitionTail_.isEmpty()) {
679 transitionTail_ = other.transitionTail_;
680 transitionTail_.makeImmutable();
681 bitField0_ |= 0x00000004;
683 ensureTransitionTailIsMutable();
684 transitionTail_.addAll(other.transitionTail_);
688 if (!other.transitionHead_.isEmpty()) {
689 if (transitionHead_.isEmpty()) {
690 transitionHead_ = other.transitionHead_;
691 transitionHead_.makeImmutable();
692 bitField0_ |= 0x00000008;
694 ensureTransitionHeadIsMutable();
695 transitionHead_.addAll(other.transitionHead_);
699 if (!other.transitionLabel_.isEmpty()) {
700 if (transitionLabel_.isEmpty()) {
701 transitionLabel_ = other.transitionLabel_;
702 transitionLabel_.makeImmutable();
703 bitField0_ |= 0x00000010;
705 ensureTransitionLabelIsMutable();
706 transitionLabel_.addAll(other.transitionLabel_);
710 if (!other.vars_.isEmpty()) {
711 if (vars_.isEmpty()) {
713 vars_.makeImmutable();
714 bitField0_ |= 0x00000020;
716 ensureVarsIsMutable();
717 vars_.addAll(other.vars_);
721 this.mergeUnknownFields(other.getUnknownFields());
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();
740 boolean done =
false;
742 int tag = input.readTag();
748 startingState_ = input.readInt64();
749 bitField0_ |= 0x00000001;
753 long v = input.readInt64();
754 ensureFinalStatesIsMutable();
755 finalStates_.addLong(v);
759 int length = input.readRawVarint32();
760 int limit = input.pushLimit(length);
761 ensureFinalStatesIsMutable();
762 while (input.getBytesUntilLimit() > 0) {
763 finalStates_.addLong(input.readInt64());
765 input.popLimit(limit);
769 long v = input.readInt64();
770 ensureTransitionTailIsMutable();
771 transitionTail_.addLong(v);
775 int length = input.readRawVarint32();
776 int limit = input.pushLimit(length);
777 ensureTransitionTailIsMutable();
778 while (input.getBytesUntilLimit() > 0) {
779 transitionTail_.addLong(input.readInt64());
781 input.popLimit(limit);
785 long v = input.readInt64();
786 ensureTransitionHeadIsMutable();
787 transitionHead_.addLong(v);
791 int length = input.readRawVarint32();
792 int limit = input.pushLimit(length);
793 ensureTransitionHeadIsMutable();
794 while (input.getBytesUntilLimit() > 0) {
795 transitionHead_.addLong(input.readInt64());
797 input.popLimit(limit);
801 long v = input.readInt64();
802 ensureTransitionLabelIsMutable();
803 transitionLabel_.addLong(v);
807 int length = input.readRawVarint32();
808 int limit = input.pushLimit(length);
809 ensureTransitionLabelIsMutable();
810 while (input.getBytesUntilLimit() > 0) {
811 transitionLabel_.addLong(input.readInt64());
813 input.popLimit(limit);
817 int v = input.readInt32();
818 ensureVarsIsMutable();
823 int length = input.readRawVarint32();
824 int limit = input.pushLimit(length);
825 ensureVarsIsMutable();
826 while (input.getBytesUntilLimit() > 0) {
827 vars_.addInt(input.readInt32());
829 input.popLimit(limit);
833 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
840 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
841 throw e.unwrapIOException();
847 private int bitField0_;
849 private long startingState_ ;
862 return startingState_;
877 startingState_ = value;
878 bitField0_ |= 0x00000001;
893 bitField0_ = (bitField0_ & ~0x00000001);
899 private com.google.protobuf.Internal.LongList finalStates_ = emptyLongList();
900 private void ensureFinalStatesIsMutable() {
901 if (!finalStates_.isModifiable()) {
902 finalStates_ = makeMutableCopy(finalStates_);
904 bitField0_ |= 0x00000002;
910 public java.util.List<java.lang.Long>
912 finalStates_.makeImmutable();
920 return finalStates_.size();
928 return finalStates_.getLong(index);
937 int index,
long value) {
939 ensureFinalStatesIsMutable();
940 finalStates_.setLong(index, value);
941 bitField0_ |= 0x00000002;
952 ensureFinalStatesIsMutable();
953 finalStates_.addLong(value);
954 bitField0_ |= 0x00000002;
964 java.lang.Iterable<? extends java.lang.Long> values) {
965 ensureFinalStatesIsMutable();
966 com.google.protobuf.AbstractMessageLite.Builder.addAll(
967 values, finalStates_);
968 bitField0_ |= 0x00000002;
977 finalStates_ = emptyLongList();
978 bitField0_ = (bitField0_ & ~0x00000002);
983 private com.google.protobuf.Internal.LongList transitionTail_ = emptyLongList();
984 private void ensureTransitionTailIsMutable() {
985 if (!transitionTail_.isModifiable()) {
986 transitionTail_ = makeMutableCopy(transitionTail_);
988 bitField0_ |= 0x00000004;
1000 public java.util.List<java.lang.Long>
1002 transitionTail_.makeImmutable();
1003 return transitionTail_;
1016 return transitionTail_.size();
1030 return transitionTail_.getLong(index);
1045 int index,
long value) {
1047 ensureTransitionTailIsMutable();
1048 transitionTail_.setLong(index, value);
1049 bitField0_ |= 0x00000004;
1066 ensureTransitionTailIsMutable();
1067 transitionTail_.addLong(value);
1068 bitField0_ |= 0x00000004;
1084 java.lang.Iterable<? extends java.lang.Long> values) {
1085 ensureTransitionTailIsMutable();
1086 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1087 values, transitionTail_);
1088 bitField0_ |= 0x00000004;
1103 transitionTail_ = emptyLongList();
1104 bitField0_ = (bitField0_ & ~0x00000004);
1109 private com.google.protobuf.Internal.LongList transitionHead_ = emptyLongList();
1110 private void ensureTransitionHeadIsMutable() {
1111 if (!transitionHead_.isModifiable()) {
1112 transitionHead_ = makeMutableCopy(transitionHead_);
1114 bitField0_ |= 0x00000008;
1120 public java.util.List<java.lang.Long>
1122 transitionHead_.makeImmutable();
1123 return transitionHead_;
1130 return transitionHead_.size();
1138 return transitionHead_.getLong(index);
1147 int index,
long value) {
1149 ensureTransitionHeadIsMutable();
1150 transitionHead_.setLong(index, value);
1151 bitField0_ |= 0x00000008;
1162 ensureTransitionHeadIsMutable();
1163 transitionHead_.addLong(value);
1164 bitField0_ |= 0x00000008;
1174 java.lang.Iterable<? extends java.lang.Long> values) {
1175 ensureTransitionHeadIsMutable();
1176 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1177 values, transitionHead_);
1178 bitField0_ |= 0x00000008;
1187 transitionHead_ = emptyLongList();
1188 bitField0_ = (bitField0_ & ~0x00000008);
1193 private com.google.protobuf.Internal.LongList transitionLabel_ = emptyLongList();
1194 private void ensureTransitionLabelIsMutable() {
1195 if (!transitionLabel_.isModifiable()) {
1196 transitionLabel_ = makeMutableCopy(transitionLabel_);
1198 bitField0_ |= 0x00000010;
1204 public java.util.List<java.lang.Long>
1206 transitionLabel_.makeImmutable();
1207 return transitionLabel_;
1214 return transitionLabel_.size();
1222 return transitionLabel_.getLong(index);
1231 int index,
long value) {
1233 ensureTransitionLabelIsMutable();
1234 transitionLabel_.setLong(index, value);
1235 bitField0_ |= 0x00000010;
1246 ensureTransitionLabelIsMutable();
1247 transitionLabel_.addLong(value);
1248 bitField0_ |= 0x00000010;
1258 java.lang.Iterable<? extends java.lang.Long> values) {
1259 ensureTransitionLabelIsMutable();
1260 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1261 values, transitionLabel_);
1262 bitField0_ |= 0x00000010;
1271 transitionLabel_ = emptyLongList();
1272 bitField0_ = (bitField0_ & ~0x00000010);
1277 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
1278 private void ensureVarsIsMutable() {
1279 if (!vars_.isModifiable()) {
1280 vars_ = makeMutableCopy(vars_);
1282 bitField0_ |= 0x00000020;
1293 public java.util.List<java.lang.Integer>
1295 vars_.makeImmutable();
1308 return vars_.size();
1321 return vars_.getInt(index);
1335 int index,
int value) {
1337 ensureVarsIsMutable();
1338 vars_.setInt(index, value);
1339 bitField0_ |= 0x00000020;
1355 ensureVarsIsMutable();
1356 vars_.addInt(value);
1357 bitField0_ |= 0x00000020;
1372 java.lang.Iterable<? extends java.lang.Integer> values) {
1373 ensureVarsIsMutable();
1374 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1376 bitField0_ |= 0x00000020;
1390 vars_ = emptyIntList();
1391 bitField0_ = (bitField0_ & ~0x00000020);
1402 DEFAULT_INSTANCE =
new com.google.ortools.sat.AutomatonConstraintProto();
1406 return DEFAULT_INSTANCE;
1413 com.google.protobuf.CodedInputStream input,
1414 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1415 throws com.google.protobuf.InvalidProtocolBufferException {
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());
1427 return builder.buildPartial();
1442 return DEFAULT_INSTANCE;