5package com.google.ortools.sat;
23 com.google.protobuf.GeneratedMessage implements
26private static final long serialVersionUID = 0L;
28 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
29 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
41 tails_ = emptyIntList();
42 heads_ = emptyIntList();
43 literals_ = emptyIntList();
46 public static final com.google.protobuf.Descriptors.Descriptor
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
52 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
54 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
55 .ensureFieldAccessorsInitialized(
56 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
60 @SuppressWarnings(
"serial")
61 private com.google.protobuf.Internal.IntList tails_ =
68 public java.util.List<java.lang.Integer>
85 return tails_.getInt(index);
87 private int tailsMemoizedSerializedSize = -1;
90 @SuppressWarnings(
"serial")
91 private com.google.protobuf.Internal.IntList heads_ =
98 public java.util.List<java.lang.Integer>
107 return heads_.size();
115 return heads_.getInt(index);
117 private int headsMemoizedSerializedSize = -1;
120 @SuppressWarnings(
"serial")
121 private com.google.protobuf.Internal.IntList literals_ =
128 public java.util.List<java.lang.Integer>
137 return literals_.size();
145 return literals_.getInt(index);
147 private int literalsMemoizedSerializedSize = -1;
149 private byte memoizedIsInitialized = -1;
156 memoizedIsInitialized = 1;
161 public void writeTo(com.google.protobuf.CodedOutputStream output)
162 throws java.io.IOException {
165 output.writeUInt32NoTag(26);
166 output.writeUInt32NoTag(tailsMemoizedSerializedSize);
168 for (
int i = 0; i < tails_.size(); i++) {
169 output.writeInt32NoTag(tails_.getInt(i));
172 output.writeUInt32NoTag(34);
173 output.writeUInt32NoTag(headsMemoizedSerializedSize);
175 for (
int i = 0; i < heads_.size(); i++) {
176 output.writeInt32NoTag(heads_.getInt(i));
179 output.writeUInt32NoTag(42);
180 output.writeUInt32NoTag(literalsMemoizedSerializedSize);
182 for (
int i = 0; i < literals_.size(); i++) {
183 output.writeInt32NoTag(literals_.getInt(i));
185 getUnknownFields().writeTo(output);
190 int size = memoizedSize;
191 if (size != -1)
return size;
196 for (
int i = 0; i < tails_.size(); i++) {
197 dataSize += com.google.protobuf.CodedOutputStream
198 .computeInt32SizeNoTag(tails_.getInt(i));
203 size += com.google.protobuf.CodedOutputStream
204 .computeInt32SizeNoTag(dataSize);
206 tailsMemoizedSerializedSize = dataSize;
210 for (
int i = 0; i < heads_.size(); i++) {
211 dataSize += com.google.protobuf.CodedOutputStream
212 .computeInt32SizeNoTag(heads_.getInt(i));
217 size += com.google.protobuf.CodedOutputStream
218 .computeInt32SizeNoTag(dataSize);
220 headsMemoizedSerializedSize = dataSize;
224 for (
int i = 0; i < literals_.size(); i++) {
225 dataSize += com.google.protobuf.CodedOutputStream
226 .computeInt32SizeNoTag(literals_.getInt(i));
231 size += com.google.protobuf.CodedOutputStream
232 .computeInt32SizeNoTag(dataSize);
234 literalsMemoizedSerializedSize = dataSize;
236 size += getUnknownFields().getSerializedSize();
242 public boolean equals(
final java.lang.Object obj) {
246 if (!(obj instanceof com.google.ortools.sat.CircuitConstraintProto)) {
247 return super.equals(obj);
257 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
263 if (memoizedHashCode != 0) {
264 return memoizedHashCode;
280 hash = (29 * hash) + getUnknownFields().hashCode();
281 memoizedHashCode = hash;
286 java.nio.ByteBuffer data)
287 throws com.google.protobuf.InvalidProtocolBufferException {
288 return PARSER.parseFrom(data);
291 java.nio.ByteBuffer data,
292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293 throws com.google.protobuf.InvalidProtocolBufferException {
294 return PARSER.parseFrom(data, extensionRegistry);
297 com.google.protobuf.ByteString data)
298 throws com.google.protobuf.InvalidProtocolBufferException {
299 return PARSER.parseFrom(data);
302 com.google.protobuf.ByteString data,
303 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304 throws com.google.protobuf.InvalidProtocolBufferException {
305 return PARSER.parseFrom(data, extensionRegistry);
308 throws com.google.protobuf.InvalidProtocolBufferException {
309 return PARSER.parseFrom(data);
313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314 throws com.google.protobuf.InvalidProtocolBufferException {
315 return PARSER.parseFrom(data, extensionRegistry);
318 throws java.io.IOException {
319 return com.google.protobuf.GeneratedMessage
320 .parseWithIOException(PARSER, input);
323 java.io.InputStream input,
324 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
325 throws java.io.IOException {
326 return com.google.protobuf.GeneratedMessage
327 .parseWithIOException(PARSER, input, extensionRegistry);
331 throws java.io.IOException {
332 return com.google.protobuf.GeneratedMessage
333 .parseDelimitedWithIOException(PARSER, input);
337 java.io.InputStream input,
338 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
339 throws java.io.IOException {
340 return com.google.protobuf.GeneratedMessage
341 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
344 com.google.protobuf.CodedInputStream input)
345 throws java.io.IOException {
346 return com.google.protobuf.GeneratedMessage
347 .parseWithIOException(PARSER, input);
350 com.google.protobuf.CodedInputStream input,
351 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
352 throws java.io.IOException {
353 return com.google.protobuf.GeneratedMessage
354 .parseWithIOException(PARSER, input, extensionRegistry);
367 return this == DEFAULT_INSTANCE
373 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
393 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
396 public static final com.google.protobuf.Descriptors.Descriptor
398 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
402 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
404 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
405 .ensureFieldAccessorsInitialized(
406 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
415 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
423 tails_ = emptyIntList();
424 heads_ = emptyIntList();
425 literals_ = emptyIntList();
430 public com.google.protobuf.Descriptors.Descriptor
432 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
437 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
444 throw newUninitializedMessageException(result);
452 if (bitField0_ != 0) { buildPartial0(result); }
457 private void buildPartial0(com.google.ortools.sat.CircuitConstraintProto result) {
458 int from_bitField0_ = bitField0_;
459 if (((from_bitField0_ & 0x00000001) != 0)) {
460 tails_.makeImmutable();
461 result.tails_ = tails_;
463 if (((from_bitField0_ & 0x00000002) != 0)) {
464 heads_.makeImmutable();
465 result.heads_ = heads_;
467 if (((from_bitField0_ & 0x00000004) != 0)) {
468 literals_.makeImmutable();
469 result.literals_ = literals_;
475 if (other instanceof com.google.ortools.sat.CircuitConstraintProto) {
476 return mergeFrom((com.google.ortools.sat.CircuitConstraintProto)other);
478 super.mergeFrom(other);
484 if (other == com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance())
return this;
485 if (!other.tails_.isEmpty()) {
486 if (tails_.isEmpty()) {
487 tails_ = other.tails_;
488 tails_.makeImmutable();
489 bitField0_ |= 0x00000001;
491 ensureTailsIsMutable();
492 tails_.addAll(other.tails_);
496 if (!other.heads_.isEmpty()) {
497 if (heads_.isEmpty()) {
498 heads_ = other.heads_;
499 heads_.makeImmutable();
500 bitField0_ |= 0x00000002;
502 ensureHeadsIsMutable();
503 heads_.addAll(other.heads_);
507 if (!other.literals_.isEmpty()) {
508 if (literals_.isEmpty()) {
509 literals_ = other.literals_;
510 literals_.makeImmutable();
511 bitField0_ |= 0x00000004;
513 ensureLiteralsIsMutable();
514 literals_.addAll(other.literals_);
518 this.mergeUnknownFields(other.getUnknownFields());
530 com.google.protobuf.CodedInputStream input,
531 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
532 throws java.io.IOException {
533 if (extensionRegistry ==
null) {
534 throw new java.lang.NullPointerException();
537 boolean done =
false;
539 int tag = input.readTag();
545 int v = input.readInt32();
546 ensureTailsIsMutable();
551 int length = input.readRawVarint32();
552 int limit = input.pushLimit(length);
553 ensureTailsIsMutable();
554 while (input.getBytesUntilLimit() > 0) {
555 tails_.addInt(input.readInt32());
557 input.popLimit(limit);
561 int v = input.readInt32();
562 ensureHeadsIsMutable();
567 int length = input.readRawVarint32();
568 int limit = input.pushLimit(length);
569 ensureHeadsIsMutable();
570 while (input.getBytesUntilLimit() > 0) {
571 heads_.addInt(input.readInt32());
573 input.popLimit(limit);
577 int v = input.readInt32();
578 ensureLiteralsIsMutable();
583 int length = input.readRawVarint32();
584 int limit = input.pushLimit(length);
585 ensureLiteralsIsMutable();
586 while (input.getBytesUntilLimit() > 0) {
587 literals_.addInt(input.readInt32());
589 input.popLimit(limit);
593 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
600 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
601 throw e.unwrapIOException();
607 private int bitField0_;
609 private com.google.protobuf.Internal.IntList tails_ = emptyIntList();
610 private void ensureTailsIsMutable() {
611 if (!tails_.isModifiable()) {
612 tails_ = makeMutableCopy(tails_);
614 bitField0_ |= 0x00000001;
620 public java.util.List<java.lang.Integer>
622 tails_.makeImmutable();
630 return tails_.size();
638 return tails_.getInt(index);
647 int index,
int value) {
649 ensureTailsIsMutable();
650 tails_.setInt(index, value);
651 bitField0_ |= 0x00000001;
662 ensureTailsIsMutable();
663 tails_.addInt(value);
664 bitField0_ |= 0x00000001;
674 java.lang.Iterable<? extends java.lang.Integer> values) {
675 ensureTailsIsMutable();
676 com.google.protobuf.AbstractMessageLite.Builder.addAll(
678 bitField0_ |= 0x00000001;
687 tails_ = emptyIntList();
688 bitField0_ = (bitField0_ & ~0x00000001);
693 private com.google.protobuf.Internal.IntList heads_ = emptyIntList();
694 private void ensureHeadsIsMutable() {
695 if (!heads_.isModifiable()) {
696 heads_ = makeMutableCopy(heads_);
698 bitField0_ |= 0x00000002;
704 public java.util.List<java.lang.Integer>
706 heads_.makeImmutable();
714 return heads_.size();
722 return heads_.getInt(index);
731 int index,
int value) {
733 ensureHeadsIsMutable();
734 heads_.setInt(index, value);
735 bitField0_ |= 0x00000002;
746 ensureHeadsIsMutable();
747 heads_.addInt(value);
748 bitField0_ |= 0x00000002;
758 java.lang.Iterable<? extends java.lang.Integer> values) {
759 ensureHeadsIsMutable();
760 com.google.protobuf.AbstractMessageLite.Builder.addAll(
762 bitField0_ |= 0x00000002;
771 heads_ = emptyIntList();
772 bitField0_ = (bitField0_ & ~0x00000002);
777 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
778 private void ensureLiteralsIsMutable() {
779 if (!literals_.isModifiable()) {
780 literals_ = makeMutableCopy(literals_);
782 bitField0_ |= 0x00000004;
788 public java.util.List<java.lang.Integer>
790 literals_.makeImmutable();
798 return literals_.size();
806 return literals_.getInt(index);
815 int index,
int value) {
817 ensureLiteralsIsMutable();
818 literals_.setInt(index, value);
819 bitField0_ |= 0x00000004;
830 ensureLiteralsIsMutable();
831 literals_.addInt(value);
832 bitField0_ |= 0x00000004;
842 java.lang.Iterable<? extends java.lang.Integer> values) {
843 ensureLiteralsIsMutable();
844 com.google.protobuf.AbstractMessageLite.Builder.addAll(
846 bitField0_ |= 0x00000004;
855 literals_ = emptyIntList();
856 bitField0_ = (bitField0_ & ~0x00000004);
867 DEFAULT_INSTANCE =
new com.google.ortools.sat.CircuitConstraintProto();
871 return DEFAULT_INSTANCE;
878 com.google.protobuf.CodedInputStream input,
879 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
880 throws com.google.protobuf.InvalidProtocolBufferException {
883 builder.mergeFrom(input, extensionRegistry);
884 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
885 throw e.setUnfinishedMessage(builder.buildPartial());
886 }
catch (com.google.protobuf.UninitializedMessageException e) {
887 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
888 }
catch (java.io.IOException e) {
889 throw new com.google.protobuf.InvalidProtocolBufferException(e)
890 .setUnfinishedMessage(builder.buildPartial());
892 return builder.buildPartial();
907 return DEFAULT_INSTANCE;