6package com.google.ortools.sat;
23public final class CircuitConstraintProto
extends
24 com.google.protobuf.GeneratedMessage implements
27private static final long serialVersionUID = 0L;
29 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
30 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35 CircuitConstraintProto.class.getName());
38 private CircuitConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
41 private CircuitConstraintProto() {
42 tails_ = emptyIntList();
43 heads_ = emptyIntList();
44 literals_ = emptyIntList();
47 public static final com.google.protobuf.Descriptors.Descriptor
49 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
53 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
55 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
56 .ensureFieldAccessorsInitialized(
57 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
61 @SuppressWarnings(
"serial")
62 private com.google.protobuf.Internal.IntList tails_ =
69 public java.
util.List<java.lang.Integer>
86 return tails_.getInt(index);
88 private int tailsMemoizedSerializedSize = -1;
91 @SuppressWarnings(
"serial")
92 private com.google.protobuf.Internal.IntList heads_ =
99 public java.
util.List<java.lang.Integer>
108 return heads_.size();
116 return heads_.getInt(index);
118 private int headsMemoizedSerializedSize = -1;
121 @SuppressWarnings(
"serial")
122 private com.google.protobuf.Internal.IntList literals_ =
129 public java.
util.List<java.lang.Integer>
138 return literals_.size();
146 return literals_.getInt(index);
148 private int literalsMemoizedSerializedSize = -1;
150 private byte memoizedIsInitialized = -1;
157 memoizedIsInitialized = 1;
162 public void writeTo(com.google.protobuf.CodedOutputStream output)
163 throws java.io.IOException {
166 output.writeUInt32NoTag(26);
167 output.writeUInt32NoTag(tailsMemoizedSerializedSize);
169 for (
int i = 0; i < tails_.size(); i++) {
170 output.writeInt32NoTag(tails_.getInt(i));
173 output.writeUInt32NoTag(34);
174 output.writeUInt32NoTag(headsMemoizedSerializedSize);
176 for (
int i = 0; i < heads_.size(); i++) {
177 output.writeInt32NoTag(heads_.getInt(i));
180 output.writeUInt32NoTag(42);
181 output.writeUInt32NoTag(literalsMemoizedSerializedSize);
183 for (
int i = 0; i < literals_.size(); i++) {
184 output.writeInt32NoTag(literals_.getInt(i));
186 getUnknownFields().writeTo(output);
191 int size = memoizedSize;
192 if (size != -1)
return size;
197 for (
int i = 0; i < tails_.size(); i++) {
198 dataSize += com.google.protobuf.CodedOutputStream
199 .computeInt32SizeNoTag(tails_.getInt(i));
204 size += com.google.protobuf.CodedOutputStream
205 .computeInt32SizeNoTag(dataSize);
207 tailsMemoizedSerializedSize = dataSize;
211 for (
int i = 0; i < heads_.size(); i++) {
212 dataSize += com.google.protobuf.CodedOutputStream
213 .computeInt32SizeNoTag(heads_.getInt(i));
218 size += com.google.protobuf.CodedOutputStream
219 .computeInt32SizeNoTag(dataSize);
221 headsMemoizedSerializedSize = dataSize;
225 for (
int i = 0; i < literals_.size(); i++) {
226 dataSize += com.google.protobuf.CodedOutputStream
227 .computeInt32SizeNoTag(literals_.getInt(i));
232 size += com.google.protobuf.CodedOutputStream
233 .computeInt32SizeNoTag(dataSize);
235 literalsMemoizedSerializedSize = dataSize;
237 size += getUnknownFields().getSerializedSize();
243 public boolean equals(
final java.lang.Object obj) {
247 if (!(obj instanceof com.google.ortools.sat.CircuitConstraintProto)) {
248 return super.equals(obj);
258 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
264 if (memoizedHashCode != 0) {
265 return memoizedHashCode;
281 hash = (29 * hash) + getUnknownFields().hashCode();
282 memoizedHashCode = hash;
287 java.nio.ByteBuffer data)
288 throws com.google.protobuf.InvalidProtocolBufferException {
289 return PARSER.parseFrom(data);
292 java.nio.ByteBuffer data,
293 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294 throws com.google.protobuf.InvalidProtocolBufferException {
295 return PARSER.parseFrom(data, extensionRegistry);
298 com.google.protobuf.ByteString data)
299 throws com.google.protobuf.InvalidProtocolBufferException {
300 return PARSER.parseFrom(data);
303 com.google.protobuf.ByteString data,
304 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305 throws com.google.protobuf.InvalidProtocolBufferException {
306 return PARSER.parseFrom(data, extensionRegistry);
309 throws com.google.protobuf.InvalidProtocolBufferException {
310 return PARSER.parseFrom(data);
314 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
315 throws com.google.protobuf.InvalidProtocolBufferException {
316 return PARSER.parseFrom(data, extensionRegistry);
319 throws java.io.IOException {
320 return com.google.protobuf.GeneratedMessage
321 .parseWithIOException(PARSER, input);
324 java.io.InputStream input,
325 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
326 throws java.io.IOException {
327 return com.google.protobuf.GeneratedMessage
328 .parseWithIOException(PARSER, input, extensionRegistry);
332 throws java.io.IOException {
333 return com.google.protobuf.GeneratedMessage
334 .parseDelimitedWithIOException(PARSER, input);
338 java.io.InputStream input,
339 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
340 throws java.io.IOException {
341 return com.google.protobuf.GeneratedMessage
342 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
345 com.google.protobuf.CodedInputStream input)
346 throws java.io.IOException {
347 return com.google.protobuf.GeneratedMessage
348 .parseWithIOException(PARSER, input);
351 com.google.protobuf.CodedInputStream input,
352 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
353 throws java.io.IOException {
354 return com.google.protobuf.GeneratedMessage
355 .parseWithIOException(PARSER, input, extensionRegistry);
361 return DEFAULT_INSTANCE.toBuilder();
364 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
368 return this == DEFAULT_INSTANCE
374 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
393 public static final class Builder
extends
394 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
397 public static final com.google.protobuf.Descriptors.Descriptor
399 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
403 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
405 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_fieldAccessorTable
406 .ensureFieldAccessorsInitialized(
407 com.google.ortools.sat.CircuitConstraintProto.class, com.google.ortools.sat.CircuitConstraintProto.Builder.class);
416 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
424 tails_ = emptyIntList();
425 heads_ = emptyIntList();
426 literals_ = emptyIntList();
431 public com.google.protobuf.Descriptors.Descriptor
433 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CircuitConstraintProto_descriptor;
438 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
445 throw newUninitializedMessageException(result);
453 if (bitField0_ != 0) { buildPartial0(result); }
458 private void buildPartial0(com.google.ortools.sat.CircuitConstraintProto result) {
459 int from_bitField0_ = bitField0_;
460 if (((from_bitField0_ & 0x00000001) != 0)) {
461 tails_.makeImmutable();
462 result.tails_ = tails_;
464 if (((from_bitField0_ & 0x00000002) != 0)) {
465 heads_.makeImmutable();
466 result.heads_ = heads_;
468 if (((from_bitField0_ & 0x00000004) != 0)) {
469 literals_.makeImmutable();
470 result.literals_ = literals_;
475 public Builder
mergeFrom(com.google.protobuf.Message other) {
476 if (other instanceof com.google.ortools.sat.CircuitConstraintProto) {
477 return mergeFrom((com.google.ortools.sat.CircuitConstraintProto)other);
479 super.mergeFrom(other);
484 public Builder
mergeFrom(com.google.ortools.sat.CircuitConstraintProto other) {
485 if (other == com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance())
return this;
486 if (!other.tails_.isEmpty()) {
487 if (tails_.isEmpty()) {
488 tails_ = other.tails_;
489 tails_.makeImmutable();
490 bitField0_ |= 0x00000001;
492 ensureTailsIsMutable();
493 tails_.addAll(other.tails_);
497 if (!other.heads_.isEmpty()) {
498 if (heads_.isEmpty()) {
499 heads_ = other.heads_;
500 heads_.makeImmutable();
501 bitField0_ |= 0x00000002;
503 ensureHeadsIsMutable();
504 heads_.addAll(other.heads_);
508 if (!other.literals_.isEmpty()) {
509 if (literals_.isEmpty()) {
510 literals_ = other.literals_;
511 literals_.makeImmutable();
512 bitField0_ |= 0x00000004;
514 ensureLiteralsIsMutable();
515 literals_.addAll(other.literals_);
519 this.mergeUnknownFields(other.getUnknownFields());
531 com.google.protobuf.CodedInputStream input,
532 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
533 throws java.io.IOException {
534 if (extensionRegistry ==
null) {
535 throw new java.lang.NullPointerException();
538 boolean done =
false;
540 int tag = input.readTag();
546 int v = input.readInt32();
547 ensureTailsIsMutable();
552 int length = input.readRawVarint32();
553 int limit = input.pushLimit(length);
554 ensureTailsIsMutable();
555 while (input.getBytesUntilLimit() > 0) {
556 tails_.addInt(input.readInt32());
558 input.popLimit(limit);
562 int v = input.readInt32();
563 ensureHeadsIsMutable();
568 int length = input.readRawVarint32();
569 int limit = input.pushLimit(length);
570 ensureHeadsIsMutable();
571 while (input.getBytesUntilLimit() > 0) {
572 heads_.addInt(input.readInt32());
574 input.popLimit(limit);
578 int v = input.readInt32();
579 ensureLiteralsIsMutable();
584 int length = input.readRawVarint32();
585 int limit = input.pushLimit(length);
586 ensureLiteralsIsMutable();
587 while (input.getBytesUntilLimit() > 0) {
588 literals_.addInt(input.readInt32());
590 input.popLimit(limit);
594 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
601 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
602 throw e.unwrapIOException();
608 private int bitField0_;
610 private com.google.protobuf.Internal.IntList tails_ = emptyIntList();
611 private void ensureTailsIsMutable() {
612 if (!tails_.isModifiable()) {
613 tails_ = makeMutableCopy(tails_);
615 bitField0_ |= 0x00000001;
621 public java.util.List<java.lang.Integer>
623 tails_.makeImmutable();
631 return tails_.size();
639 return tails_.getInt(index);
648 int index,
int value) {
650 ensureTailsIsMutable();
651 tails_.setInt(index, value);
652 bitField0_ |= 0x00000001;
663 ensureTailsIsMutable();
664 tails_.addInt(value);
665 bitField0_ |= 0x00000001;
675 java.lang.Iterable<? extends java.lang.Integer> values) {
676 ensureTailsIsMutable();
677 com.google.protobuf.AbstractMessageLite.Builder.addAll(
679 bitField0_ |= 0x00000001;
688 tails_ = emptyIntList();
689 bitField0_ = (bitField0_ & ~0x00000001);
694 private com.google.protobuf.Internal.IntList heads_ = emptyIntList();
695 private void ensureHeadsIsMutable() {
696 if (!heads_.isModifiable()) {
697 heads_ = makeMutableCopy(heads_);
699 bitField0_ |= 0x00000002;
705 public java.util.List<java.lang.Integer>
707 heads_.makeImmutable();
715 return heads_.size();
723 return heads_.getInt(index);
732 int index,
int value) {
734 ensureHeadsIsMutable();
735 heads_.setInt(index, value);
736 bitField0_ |= 0x00000002;
747 ensureHeadsIsMutable();
748 heads_.addInt(value);
749 bitField0_ |= 0x00000002;
759 java.lang.Iterable<? extends java.lang.Integer> values) {
760 ensureHeadsIsMutable();
761 com.google.protobuf.AbstractMessageLite.Builder.addAll(
763 bitField0_ |= 0x00000002;
772 heads_ = emptyIntList();
773 bitField0_ = (bitField0_ & ~0x00000002);
778 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
779 private void ensureLiteralsIsMutable() {
780 if (!literals_.isModifiable()) {
781 literals_ = makeMutableCopy(literals_);
783 bitField0_ |= 0x00000004;
789 public java.util.List<java.lang.Integer>
791 literals_.makeImmutable();
799 return literals_.size();
807 return literals_.getInt(index);
816 int index,
int value) {
818 ensureLiteralsIsMutable();
819 literals_.setInt(index, value);
820 bitField0_ |= 0x00000004;
831 ensureLiteralsIsMutable();
832 literals_.addInt(value);
833 bitField0_ |= 0x00000004;
843 java.lang.Iterable<? extends java.lang.Integer> values) {
844 ensureLiteralsIsMutable();
845 com.google.protobuf.AbstractMessageLite.Builder.addAll(
847 bitField0_ |= 0x00000004;
856 literals_ = emptyIntList();
857 bitField0_ = (bitField0_ & ~0x00000004);
868 DEFAULT_INSTANCE =
new com.google.ortools.sat.CircuitConstraintProto();
872 return DEFAULT_INSTANCE;
879 com.google.protobuf.CodedInputStream input,
880 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
881 throws com.google.protobuf.InvalidProtocolBufferException {
884 builder.mergeFrom(input, extensionRegistry);
885 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
886 throw e.setUnfinishedMessage(builder.buildPartial());
887 }
catch (com.google.protobuf.UninitializedMessageException e) {
888 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
889 }
catch (java.io.IOException e) {
890 throw new com.google.protobuf.InvalidProtocolBufferException(e)
891 .setUnfinishedMessage(builder.buildPartial());
893 return builder.buildPartial();
897 public static com.google.protobuf.Parser<CircuitConstraintProto>
parser() {
908 return DEFAULT_INSTANCE;