6package com.google.ortools.sat;
23@com.google.protobuf.Generated
24public final class CircuitConstraintProto
extends
25 com.google.protobuf.GeneratedMessage implements
28private static final long serialVersionUID = 0L;
30 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
31 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
36 CircuitConstraintProto.class.getName());
39 private CircuitConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
42 private CircuitConstraintProto() {
43 tails_ = emptyIntList();
44 heads_ = emptyIntList();
45 literals_ = emptyIntList();
48 public static final com.google.protobuf.Descriptors.Descriptor
50 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
54 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
56 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
57 .ensureFieldAccessorsInitialized(
58 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
62 @SuppressWarnings(
"serial")
63 private com.google.protobuf.Internal.IntList tails_ =
70 public java.
util.List<java.lang.Integer>
87 return tails_.getInt(index);
89 private int tailsMemoizedSerializedSize = -1;
92 @SuppressWarnings(
"serial")
93 private com.google.protobuf.Internal.IntList heads_ =
100 public java.
util.List<java.lang.Integer>
109 return heads_.size();
117 return heads_.getInt(index);
119 private int headsMemoizedSerializedSize = -1;
122 @SuppressWarnings(
"serial")
123 private com.google.protobuf.Internal.IntList literals_ =
130 public java.
util.List<java.lang.Integer>
139 return literals_.size();
147 return literals_.getInt(index);
149 private int literalsMemoizedSerializedSize = -1;
151 private byte memoizedIsInitialized = -1;
158 memoizedIsInitialized = 1;
163 public void writeTo(com.google.protobuf.CodedOutputStream output)
164 throws java.io.IOException {
167 output.writeUInt32NoTag(26);
168 output.writeUInt32NoTag(tailsMemoizedSerializedSize);
170 for (
int i = 0; i < tails_.size(); i++) {
171 output.writeInt32NoTag(tails_.getInt(i));
174 output.writeUInt32NoTag(34);
175 output.writeUInt32NoTag(headsMemoizedSerializedSize);
177 for (
int i = 0; i < heads_.size(); i++) {
178 output.writeInt32NoTag(heads_.getInt(i));
181 output.writeUInt32NoTag(42);
182 output.writeUInt32NoTag(literalsMemoizedSerializedSize);
184 for (
int i = 0; i < literals_.size(); i++) {
185 output.writeInt32NoTag(literals_.getInt(i));
187 getUnknownFields().writeTo(output);
192 int size = memoizedSize;
193 if (size != -1)
return size;
198 for (
int i = 0; i < tails_.size(); i++) {
199 dataSize += com.google.protobuf.CodedOutputStream
200 .computeInt32SizeNoTag(tails_.getInt(i));
205 size += com.google.protobuf.CodedOutputStream
206 .computeInt32SizeNoTag(dataSize);
208 tailsMemoizedSerializedSize = dataSize;
212 for (
int i = 0; i < heads_.size(); i++) {
213 dataSize += com.google.protobuf.CodedOutputStream
214 .computeInt32SizeNoTag(heads_.getInt(i));
219 size += com.google.protobuf.CodedOutputStream
220 .computeInt32SizeNoTag(dataSize);
222 headsMemoizedSerializedSize = dataSize;
226 for (
int i = 0; i < literals_.size(); i++) {
227 dataSize += com.google.protobuf.CodedOutputStream
228 .computeInt32SizeNoTag(literals_.getInt(i));
233 size += com.google.protobuf.CodedOutputStream
234 .computeInt32SizeNoTag(dataSize);
236 literalsMemoizedSerializedSize = dataSize;
238 size += getUnknownFields().getSerializedSize();
244 public boolean equals(
final java.lang.Object obj) {
248 if (!(obj instanceof com.google.ortools.sat.CircuitConstraintProto)) {
249 return super.equals(obj);
259 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
265 if (memoizedHashCode != 0) {
266 return memoizedHashCode;
282 hash = (29 * hash) + getUnknownFields().hashCode();
283 memoizedHashCode = hash;
288 java.nio.ByteBuffer data)
289 throws com.google.protobuf.InvalidProtocolBufferException {
290 return PARSER.parseFrom(data);
293 java.nio.ByteBuffer data,
294 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
295 throws com.google.protobuf.InvalidProtocolBufferException {
296 return PARSER.parseFrom(data, extensionRegistry);
299 com.google.protobuf.ByteString data)
300 throws com.google.protobuf.InvalidProtocolBufferException {
301 return PARSER.parseFrom(data);
304 com.google.protobuf.ByteString data,
305 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
306 throws com.google.protobuf.InvalidProtocolBufferException {
307 return PARSER.parseFrom(data, extensionRegistry);
310 throws com.google.protobuf.InvalidProtocolBufferException {
311 return PARSER.parseFrom(data);
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws com.google.protobuf.InvalidProtocolBufferException {
317 return PARSER.parseFrom(data, extensionRegistry);
320 throws java.io.IOException {
321 return com.google.protobuf.GeneratedMessage
322 .parseWithIOException(PARSER, input);
325 java.io.InputStream input,
326 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
327 throws java.io.IOException {
328 return com.google.protobuf.GeneratedMessage
329 .parseWithIOException(PARSER, input, extensionRegistry);
333 throws java.io.IOException {
334 return com.google.protobuf.GeneratedMessage
335 .parseDelimitedWithIOException(PARSER, input);
339 java.io.InputStream input,
340 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
341 throws java.io.IOException {
342 return com.google.protobuf.GeneratedMessage
343 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
346 com.google.protobuf.CodedInputStream input)
347 throws java.io.IOException {
348 return com.google.protobuf.GeneratedMessage
349 .parseWithIOException(PARSER, input);
352 com.google.protobuf.CodedInputStream input,
353 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
354 throws java.io.IOException {
355 return com.google.protobuf.GeneratedMessage
356 .parseWithIOException(PARSER, input, extensionRegistry);
362 return DEFAULT_INSTANCE.toBuilder();
365 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
369 return this == DEFAULT_INSTANCE
375 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
394 public static final class Builder
extends
395 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
398 public static final com.google.protobuf.Descriptors.Descriptor
400 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
404 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
406 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
407 .ensureFieldAccessorsInitialized(
408 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
417 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
425 tails_ = emptyIntList();
426 heads_ = emptyIntList();
427 literals_ = emptyIntList();
432 public com.google.protobuf.Descriptors.Descriptor
434 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
439 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
446 throw newUninitializedMessageException(result);
454 if (bitField0_ != 0) { buildPartial0(result); }
459 private void buildPartial0(com.google.ortools.sat.CircuitConstraintProto result) {
460 int from_bitField0_ = bitField0_;
461 if (((from_bitField0_ & 0x00000001) != 0)) {
462 tails_.makeImmutable();
463 result.tails_ = tails_;
465 if (((from_bitField0_ & 0x00000002) != 0)) {
466 heads_.makeImmutable();
467 result.heads_ = heads_;
469 if (((from_bitField0_ & 0x00000004) != 0)) {
470 literals_.makeImmutable();
471 result.literals_ = literals_;
476 public Builder
mergeFrom(com.google.protobuf.Message other) {
477 if (other instanceof com.google.ortools.sat.CircuitConstraintProto) {
478 return mergeFrom((com.google.ortools.sat.CircuitConstraintProto)other);
480 super.mergeFrom(other);
485 public Builder
mergeFrom(com.google.ortools.sat.CircuitConstraintProto other) {
486 if (other == com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance())
return this;
487 if (!other.tails_.isEmpty()) {
488 if (tails_.isEmpty()) {
489 tails_ = other.tails_;
490 tails_.makeImmutable();
491 bitField0_ |= 0x00000001;
493 ensureTailsIsMutable();
494 tails_.addAll(other.tails_);
498 if (!other.heads_.isEmpty()) {
499 if (heads_.isEmpty()) {
500 heads_ = other.heads_;
501 heads_.makeImmutable();
502 bitField0_ |= 0x00000002;
504 ensureHeadsIsMutable();
505 heads_.addAll(other.heads_);
509 if (!other.literals_.isEmpty()) {
510 if (literals_.isEmpty()) {
511 literals_ = other.literals_;
512 literals_.makeImmutable();
513 bitField0_ |= 0x00000004;
515 ensureLiteralsIsMutable();
516 literals_.addAll(other.literals_);
520 this.mergeUnknownFields(other.getUnknownFields());
532 com.google.protobuf.CodedInputStream input,
533 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
534 throws java.io.IOException {
535 if (extensionRegistry ==
null) {
536 throw new java.lang.NullPointerException();
539 boolean done =
false;
541 int tag = input.readTag();
547 int v = input.readInt32();
548 ensureTailsIsMutable();
553 int length = input.readRawVarint32();
554 int limit = input.pushLimit(length);
555 ensureTailsIsMutable();
556 while (input.getBytesUntilLimit() > 0) {
557 tails_.addInt(input.readInt32());
559 input.popLimit(limit);
563 int v = input.readInt32();
564 ensureHeadsIsMutable();
569 int length = input.readRawVarint32();
570 int limit = input.pushLimit(length);
571 ensureHeadsIsMutable();
572 while (input.getBytesUntilLimit() > 0) {
573 heads_.addInt(input.readInt32());
575 input.popLimit(limit);
579 int v = input.readInt32();
580 ensureLiteralsIsMutable();
585 int length = input.readRawVarint32();
586 int limit = input.pushLimit(length);
587 ensureLiteralsIsMutable();
588 while (input.getBytesUntilLimit() > 0) {
589 literals_.addInt(input.readInt32());
591 input.popLimit(limit);
595 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
602 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
603 throw e.unwrapIOException();
609 private int bitField0_;
611 private com.google.protobuf.Internal.IntList tails_ = emptyIntList();
612 private void ensureTailsIsMutable() {
613 if (!tails_.isModifiable()) {
614 tails_ = makeMutableCopy(tails_);
616 bitField0_ |= 0x00000001;
622 public java.util.List<java.lang.Integer>
624 tails_.makeImmutable();
632 return tails_.size();
640 return tails_.getInt(index);
649 int index,
int value) {
651 ensureTailsIsMutable();
652 tails_.setInt(index, value);
653 bitField0_ |= 0x00000001;
664 ensureTailsIsMutable();
665 tails_.addInt(value);
666 bitField0_ |= 0x00000001;
676 java.lang.Iterable<? extends java.lang.Integer> values) {
677 ensureTailsIsMutable();
678 com.google.protobuf.AbstractMessageLite.Builder.addAll(
680 bitField0_ |= 0x00000001;
689 tails_ = emptyIntList();
690 bitField0_ = (bitField0_ & ~0x00000001);
695 private com.google.protobuf.Internal.IntList heads_ = emptyIntList();
696 private void ensureHeadsIsMutable() {
697 if (!heads_.isModifiable()) {
698 heads_ = makeMutableCopy(heads_);
700 bitField0_ |= 0x00000002;
706 public java.util.List<java.lang.Integer>
708 heads_.makeImmutable();
716 return heads_.size();
724 return heads_.getInt(index);
733 int index,
int value) {
735 ensureHeadsIsMutable();
736 heads_.setInt(index, value);
737 bitField0_ |= 0x00000002;
748 ensureHeadsIsMutable();
749 heads_.addInt(value);
750 bitField0_ |= 0x00000002;
760 java.lang.Iterable<? extends java.lang.Integer> values) {
761 ensureHeadsIsMutable();
762 com.google.protobuf.AbstractMessageLite.Builder.addAll(
764 bitField0_ |= 0x00000002;
773 heads_ = emptyIntList();
774 bitField0_ = (bitField0_ & ~0x00000002);
779 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
780 private void ensureLiteralsIsMutable() {
781 if (!literals_.isModifiable()) {
782 literals_ = makeMutableCopy(literals_);
784 bitField0_ |= 0x00000004;
790 public java.util.List<java.lang.Integer>
792 literals_.makeImmutable();
800 return literals_.size();
808 return literals_.getInt(index);
817 int index,
int value) {
819 ensureLiteralsIsMutable();
820 literals_.setInt(index, value);
821 bitField0_ |= 0x00000004;
832 ensureLiteralsIsMutable();
833 literals_.addInt(value);
834 bitField0_ |= 0x00000004;
844 java.lang.Iterable<? extends java.lang.Integer> values) {
845 ensureLiteralsIsMutable();
846 com.google.protobuf.AbstractMessageLite.Builder.addAll(
848 bitField0_ |= 0x00000004;
857 literals_ = emptyIntList();
858 bitField0_ = (bitField0_ & ~0x00000004);
869 DEFAULT_INSTANCE =
new com.google.ortools.sat.CircuitConstraintProto();
873 return DEFAULT_INSTANCE;
880 com.google.protobuf.CodedInputStream input,
881 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
882 throws com.google.protobuf.InvalidProtocolBufferException {
885 builder.mergeFrom(input, extensionRegistry);
886 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
887 throw e.setUnfinishedMessage(builder.buildPartial());
888 }
catch (com.google.protobuf.UninitializedMessageException e) {
889 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
890 }
catch (java.io.IOException e) {
891 throw new com.google.protobuf.InvalidProtocolBufferException(e)
892 .setUnfinishedMessage(builder.buildPartial());
894 return builder.buildPartial();
898 public static com.google.protobuf.Parser<CircuitConstraintProto>
parser() {
909 return DEFAULT_INSTANCE;