5package com.google.ortools.sat;
23 com.google.protobuf.GeneratedMessageV3 implements
26private static final long serialVersionUID = 0L;
32 tails_ = emptyIntList();
33 heads_ = emptyIntList();
34 literals_ = emptyIntList();
38 @SuppressWarnings({
"unused"})
40 UnusedPrivateParameter unused) {
44 public static final com.google.protobuf.Descriptors.Descriptor
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
50 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
52 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
53 .ensureFieldAccessorsInitialized(
54 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
58 @SuppressWarnings(
"serial")
59 private com.google.protobuf.Internal.IntList tails_ =
66 public java.util.List<java.lang.Integer>
83 return tails_.getInt(index);
85 private int tailsMemoizedSerializedSize = -1;
88 @SuppressWarnings(
"serial")
89 private com.google.protobuf.Internal.IntList heads_ =
96 public java.util.List<java.lang.Integer>
105 return heads_.size();
113 return heads_.getInt(index);
115 private int headsMemoizedSerializedSize = -1;
118 @SuppressWarnings(
"serial")
119 private com.google.protobuf.Internal.IntList literals_ =
126 public java.util.List<java.lang.Integer>
135 return literals_.size();
143 return literals_.getInt(index);
145 private int literalsMemoizedSerializedSize = -1;
147 private byte memoizedIsInitialized = -1;
154 memoizedIsInitialized = 1;
159 public void writeTo(com.google.protobuf.CodedOutputStream output)
160 throws java.io.IOException {
163 output.writeUInt32NoTag(26);
164 output.writeUInt32NoTag(tailsMemoizedSerializedSize);
166 for (
int i = 0; i < tails_.size(); i++) {
167 output.writeInt32NoTag(tails_.getInt(i));
170 output.writeUInt32NoTag(34);
171 output.writeUInt32NoTag(headsMemoizedSerializedSize);
173 for (
int i = 0; i < heads_.size(); i++) {
174 output.writeInt32NoTag(heads_.getInt(i));
177 output.writeUInt32NoTag(42);
178 output.writeUInt32NoTag(literalsMemoizedSerializedSize);
180 for (
int i = 0; i < literals_.size(); i++) {
181 output.writeInt32NoTag(literals_.getInt(i));
183 getUnknownFields().writeTo(output);
188 int size = memoizedSize;
189 if (size != -1)
return size;
194 for (
int i = 0; i < tails_.size(); i++) {
195 dataSize += com.google.protobuf.CodedOutputStream
196 .computeInt32SizeNoTag(tails_.getInt(i));
201 size += com.google.protobuf.CodedOutputStream
202 .computeInt32SizeNoTag(dataSize);
204 tailsMemoizedSerializedSize = dataSize;
208 for (
int i = 0; i < heads_.size(); i++) {
209 dataSize += com.google.protobuf.CodedOutputStream
210 .computeInt32SizeNoTag(heads_.getInt(i));
215 size += com.google.protobuf.CodedOutputStream
216 .computeInt32SizeNoTag(dataSize);
218 headsMemoizedSerializedSize = dataSize;
222 for (
int i = 0; i < literals_.size(); i++) {
223 dataSize += com.google.protobuf.CodedOutputStream
224 .computeInt32SizeNoTag(literals_.getInt(i));
229 size += com.google.protobuf.CodedOutputStream
230 .computeInt32SizeNoTag(dataSize);
232 literalsMemoizedSerializedSize = dataSize;
234 size += getUnknownFields().getSerializedSize();
240 public boolean equals(
final java.lang.Object obj) {
244 if (!(obj instanceof com.google.ortools.sat.CircuitConstraintProto)) {
245 return super.equals(obj);
255 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
261 if (memoizedHashCode != 0) {
262 return memoizedHashCode;
278 hash = (29 * hash) + getUnknownFields().hashCode();
279 memoizedHashCode = hash;
284 java.nio.ByteBuffer data)
285 throws com.google.protobuf.InvalidProtocolBufferException {
286 return PARSER.parseFrom(data);
289 java.nio.ByteBuffer data,
290 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
291 throws com.google.protobuf.InvalidProtocolBufferException {
292 return PARSER.parseFrom(data, extensionRegistry);
295 com.google.protobuf.ByteString data)
296 throws com.google.protobuf.InvalidProtocolBufferException {
297 return PARSER.parseFrom(data);
300 com.google.protobuf.ByteString data,
301 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
302 throws com.google.protobuf.InvalidProtocolBufferException {
303 return PARSER.parseFrom(data, extensionRegistry);
306 throws com.google.protobuf.InvalidProtocolBufferException {
307 return PARSER.parseFrom(data);
311 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
312 throws com.google.protobuf.InvalidProtocolBufferException {
313 return PARSER.parseFrom(data, extensionRegistry);
316 throws java.io.IOException {
317 return com.google.protobuf.GeneratedMessageV3
318 .parseWithIOException(PARSER, input);
321 java.io.InputStream input,
322 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
323 throws java.io.IOException {
324 return com.google.protobuf.GeneratedMessageV3
325 .parseWithIOException(PARSER, input, extensionRegistry);
329 throws java.io.IOException {
330 return com.google.protobuf.GeneratedMessageV3
331 .parseDelimitedWithIOException(PARSER, input);
335 java.io.InputStream input,
336 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
337 throws java.io.IOException {
338 return com.google.protobuf.GeneratedMessageV3
339 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
342 com.google.protobuf.CodedInputStream input)
343 throws java.io.IOException {
344 return com.google.protobuf.GeneratedMessageV3
345 .parseWithIOException(PARSER, input);
348 com.google.protobuf.CodedInputStream input,
349 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
350 throws java.io.IOException {
351 return com.google.protobuf.GeneratedMessageV3
352 .parseWithIOException(PARSER, input, extensionRegistry);
365 return this == DEFAULT_INSTANCE
371 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
391 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
394 public static final com.google.protobuf.Descriptors.Descriptor
396 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
400 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
402 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
403 .ensureFieldAccessorsInitialized(
404 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
413 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
421 tails_ = emptyIntList();
422 heads_ = emptyIntList();
423 literals_ = emptyIntList();
428 public com.google.protobuf.Descriptors.Descriptor
430 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
435 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
442 throw newUninitializedMessageException(result);
450 if (bitField0_ != 0) { buildPartial0(result); }
455 private void buildPartial0(com.google.ortools.sat.CircuitConstraintProto result) {
456 int from_bitField0_ = bitField0_;
457 if (((from_bitField0_ & 0x00000001) != 0)) {
458 tails_.makeImmutable();
459 result.tails_ = tails_;
461 if (((from_bitField0_ & 0x00000002) != 0)) {
462 heads_.makeImmutable();
463 result.heads_ = heads_;
465 if (((from_bitField0_ & 0x00000004) != 0)) {
466 literals_.makeImmutable();
467 result.literals_ = literals_;
473 return super.
clone();
477 com.google.protobuf.Descriptors.FieldDescriptor field,
478 java.lang.Object value) {
479 return super.
setField(field, value);
483 com.google.protobuf.Descriptors.FieldDescriptor field) {
488 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
493 com.google.protobuf.Descriptors.FieldDescriptor field,
494 int index, java.lang.Object value) {
499 com.google.protobuf.Descriptors.FieldDescriptor field,
500 java.lang.Object value) {
505 if (other instanceof com.google.ortools.sat.CircuitConstraintProto) {
506 return mergeFrom((com.google.ortools.sat.CircuitConstraintProto)other);
508 super.mergeFrom(other);
514 if (other == com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance())
return this;
515 if (!other.tails_.isEmpty()) {
516 if (tails_.isEmpty()) {
517 tails_ = other.tails_;
518 tails_.makeImmutable();
519 bitField0_ |= 0x00000001;
521 ensureTailsIsMutable();
522 tails_.addAll(other.tails_);
526 if (!other.heads_.isEmpty()) {
527 if (heads_.isEmpty()) {
528 heads_ = other.heads_;
529 heads_.makeImmutable();
530 bitField0_ |= 0x00000002;
532 ensureHeadsIsMutable();
533 heads_.addAll(other.heads_);
537 if (!other.literals_.isEmpty()) {
538 if (literals_.isEmpty()) {
539 literals_ = other.literals_;
540 literals_.makeImmutable();
541 bitField0_ |= 0x00000004;
543 ensureLiteralsIsMutable();
544 literals_.addAll(other.literals_);
560 com.google.protobuf.CodedInputStream input,
561 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562 throws java.io.IOException {
563 if (extensionRegistry ==
null) {
564 throw new java.lang.NullPointerException();
567 boolean done =
false;
569 int tag = input.readTag();
575 int v = input.readInt32();
576 ensureTailsIsMutable();
581 int length = input.readRawVarint32();
582 int limit = input.pushLimit(length);
583 ensureTailsIsMutable();
584 while (input.getBytesUntilLimit() > 0) {
585 tails_.addInt(input.readInt32());
587 input.popLimit(limit);
591 int v = input.readInt32();
592 ensureHeadsIsMutable();
597 int length = input.readRawVarint32();
598 int limit = input.pushLimit(length);
599 ensureHeadsIsMutable();
600 while (input.getBytesUntilLimit() > 0) {
601 heads_.addInt(input.readInt32());
603 input.popLimit(limit);
607 int v = input.readInt32();
608 ensureLiteralsIsMutable();
613 int length = input.readRawVarint32();
614 int limit = input.pushLimit(length);
615 ensureLiteralsIsMutable();
616 while (input.getBytesUntilLimit() > 0) {
617 literals_.addInt(input.readInt32());
619 input.popLimit(limit);
623 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
630 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
631 throw e.unwrapIOException();
637 private int bitField0_;
639 private com.google.protobuf.Internal.IntList tails_ = emptyIntList();
640 private void ensureTailsIsMutable() {
641 if (!tails_.isModifiable()) {
642 tails_ = makeMutableCopy(tails_);
644 bitField0_ |= 0x00000001;
650 public java.util.List<java.lang.Integer>
652 tails_.makeImmutable();
660 return tails_.size();
668 return tails_.getInt(index);
677 int index,
int value) {
679 ensureTailsIsMutable();
680 tails_.setInt(index, value);
681 bitField0_ |= 0x00000001;
692 ensureTailsIsMutable();
693 tails_.addInt(value);
694 bitField0_ |= 0x00000001;
704 java.lang.Iterable<? extends java.lang.Integer> values) {
705 ensureTailsIsMutable();
706 com.google.protobuf.AbstractMessageLite.Builder.addAll(
708 bitField0_ |= 0x00000001;
717 tails_ = emptyIntList();
718 bitField0_ = (bitField0_ & ~0x00000001);
723 private com.google.protobuf.Internal.IntList heads_ = emptyIntList();
724 private void ensureHeadsIsMutable() {
725 if (!heads_.isModifiable()) {
726 heads_ = makeMutableCopy(heads_);
728 bitField0_ |= 0x00000002;
734 public java.util.List<java.lang.Integer>
736 heads_.makeImmutable();
744 return heads_.size();
752 return heads_.getInt(index);
761 int index,
int value) {
763 ensureHeadsIsMutable();
764 heads_.setInt(index, value);
765 bitField0_ |= 0x00000002;
776 ensureHeadsIsMutable();
777 heads_.addInt(value);
778 bitField0_ |= 0x00000002;
788 java.lang.Iterable<? extends java.lang.Integer> values) {
789 ensureHeadsIsMutable();
790 com.google.protobuf.AbstractMessageLite.Builder.addAll(
792 bitField0_ |= 0x00000002;
801 heads_ = emptyIntList();
802 bitField0_ = (bitField0_ & ~0x00000002);
807 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
808 private void ensureLiteralsIsMutable() {
809 if (!literals_.isModifiable()) {
810 literals_ = makeMutableCopy(literals_);
812 bitField0_ |= 0x00000004;
818 public java.util.List<java.lang.Integer>
820 literals_.makeImmutable();
828 return literals_.size();
836 return literals_.getInt(index);
845 int index,
int value) {
847 ensureLiteralsIsMutable();
848 literals_.setInt(index, value);
849 bitField0_ |= 0x00000004;
860 ensureLiteralsIsMutable();
861 literals_.addInt(value);
862 bitField0_ |= 0x00000004;
872 java.lang.Iterable<? extends java.lang.Integer> values) {
873 ensureLiteralsIsMutable();
874 com.google.protobuf.AbstractMessageLite.Builder.addAll(
876 bitField0_ |= 0x00000004;
885 literals_ = emptyIntList();
886 bitField0_ = (bitField0_ & ~0x00000004);
892 final com.google.protobuf.UnknownFieldSet unknownFields) {
898 final com.google.protobuf.UnknownFieldSet unknownFields) {
909 DEFAULT_INSTANCE =
new com.google.ortools.sat.CircuitConstraintProto();
913 return DEFAULT_INSTANCE;
920 com.google.protobuf.CodedInputStream input,
921 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
922 throws com.google.protobuf.InvalidProtocolBufferException {
925 builder.mergeFrom(input, extensionRegistry);
926 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
927 throw e.setUnfinishedMessage(builder.buildPartial());
928 }
catch (com.google.protobuf.UninitializedMessageException e) {
929 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
930 }
catch (java.io.IOException e) {
931 throw new com.google.protobuf.InvalidProtocolBufferException(e)
932 .setUnfinishedMessage(builder.buildPartial());
934 return builder.buildPartial();
949 return DEFAULT_INSTANCE;