5package com.google.ortools.sat;
17 com.google.protobuf.GeneratedMessageV3 implements
20private static final long serialVersionUID = 0L;
26 vars_ = emptyIntList();
27 values_ = emptyLongList();
31 @SuppressWarnings({
"unused"})
33 UnusedPrivateParameter unused) {
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_descriptor;
43 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
45 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.sat.TableConstraintProto.class, com.google.ortools.sat.TableConstraintProto.Builder.class);
51 @SuppressWarnings(
"serial")
52 private com.google.protobuf.Internal.IntList vars_ =
59 public java.util.List<java.lang.Integer>
76 return vars_.getInt(index);
78 private int varsMemoizedSerializedSize = -1;
81 @SuppressWarnings(
"serial")
82 private com.google.protobuf.Internal.LongList values_ =
89 public java.util.List<java.lang.Long>
98 return values_.size();
106 return values_.getLong(index);
108 private int valuesMemoizedSerializedSize = -1;
111 private boolean negated_ =
false;
126 private byte memoizedIsInitialized = -1;
133 memoizedIsInitialized = 1;
138 public void writeTo(com.google.protobuf.CodedOutputStream output)
139 throws java.io.IOException {
142 output.writeUInt32NoTag(10);
143 output.writeUInt32NoTag(varsMemoizedSerializedSize);
145 for (
int i = 0; i < vars_.size(); i++) {
146 output.writeInt32NoTag(vars_.getInt(i));
149 output.writeUInt32NoTag(18);
150 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
152 for (
int i = 0; i < values_.size(); i++) {
153 output.writeInt64NoTag(values_.getLong(i));
155 if (negated_ !=
false) {
156 output.writeBool(3, negated_);
158 getUnknownFields().writeTo(output);
163 int size = memoizedSize;
164 if (size != -1)
return size;
169 for (
int i = 0; i < vars_.size(); i++) {
170 dataSize += com.google.protobuf.CodedOutputStream
171 .computeInt32SizeNoTag(vars_.getInt(i));
176 size += com.google.protobuf.CodedOutputStream
177 .computeInt32SizeNoTag(dataSize);
179 varsMemoizedSerializedSize = dataSize;
183 for (
int i = 0; i < values_.size(); i++) {
184 dataSize += com.google.protobuf.CodedOutputStream
185 .computeInt64SizeNoTag(values_.getLong(i));
190 size += com.google.protobuf.CodedOutputStream
191 .computeInt32SizeNoTag(dataSize);
193 valuesMemoizedSerializedSize = dataSize;
195 if (negated_ !=
false) {
196 size += com.google.protobuf.CodedOutputStream
197 .computeBoolSize(3, negated_);
199 size += getUnknownFields().getSerializedSize();
205 public boolean equals(
final java.lang.Object obj) {
209 if (!(obj instanceof com.google.ortools.sat.TableConstraintProto)) {
210 return super.equals(obj);
220 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
226 if (memoizedHashCode != 0) {
227 return memoizedHashCode;
240 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
242 hash = (29 * hash) + getUnknownFields().hashCode();
243 memoizedHashCode = hash;
248 java.nio.ByteBuffer data)
249 throws com.google.protobuf.InvalidProtocolBufferException {
250 return PARSER.parseFrom(data);
253 java.nio.ByteBuffer data,
254 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
255 throws com.google.protobuf.InvalidProtocolBufferException {
256 return PARSER.parseFrom(data, extensionRegistry);
259 com.google.protobuf.ByteString data)
260 throws com.google.protobuf.InvalidProtocolBufferException {
261 return PARSER.parseFrom(data);
264 com.google.protobuf.ByteString data,
265 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
266 throws com.google.protobuf.InvalidProtocolBufferException {
267 return PARSER.parseFrom(data, extensionRegistry);
270 throws com.google.protobuf.InvalidProtocolBufferException {
271 return PARSER.parseFrom(data);
275 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
276 throws com.google.protobuf.InvalidProtocolBufferException {
277 return PARSER.parseFrom(data, extensionRegistry);
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessageV3
282 .parseWithIOException(PARSER, input);
285 java.io.InputStream input,
286 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
287 throws java.io.IOException {
288 return com.google.protobuf.GeneratedMessageV3
289 .parseWithIOException(PARSER, input, extensionRegistry);
293 throws java.io.IOException {
294 return com.google.protobuf.GeneratedMessageV3
295 .parseDelimitedWithIOException(PARSER, input);
299 java.io.InputStream input,
300 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
301 throws java.io.IOException {
302 return com.google.protobuf.GeneratedMessageV3
303 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
306 com.google.protobuf.CodedInputStream input)
307 throws java.io.IOException {
308 return com.google.protobuf.GeneratedMessageV3
309 .parseWithIOException(PARSER, input);
312 com.google.protobuf.CodedInputStream input,
313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314 throws java.io.IOException {
315 return com.google.protobuf.GeneratedMessageV3
316 .parseWithIOException(PARSER, input, extensionRegistry);
329 return this == DEFAULT_INSTANCE
335 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
349 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
352 public static final com.google.protobuf.Descriptors.Descriptor
354 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_descriptor;
358 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
360 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_fieldAccessorTable
361 .ensureFieldAccessorsInitialized(
362 com.google.ortools.sat.TableConstraintProto.class, com.google.ortools.sat.TableConstraintProto.Builder.class);
371 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
379 vars_ = emptyIntList();
380 values_ = emptyLongList();
386 public com.google.protobuf.Descriptors.Descriptor
388 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_descriptor;
393 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
400 throw newUninitializedMessageException(result);
408 if (bitField0_ != 0) { buildPartial0(result); }
413 private void buildPartial0(com.google.ortools.sat.TableConstraintProto result) {
414 int from_bitField0_ = bitField0_;
415 if (((from_bitField0_ & 0x00000001) != 0)) {
416 vars_.makeImmutable();
417 result.vars_ = vars_;
419 if (((from_bitField0_ & 0x00000002) != 0)) {
420 values_.makeImmutable();
421 result.values_ = values_;
423 if (((from_bitField0_ & 0x00000004) != 0)) {
424 result.negated_ = negated_;
430 return super.
clone();
434 com.google.protobuf.Descriptors.FieldDescriptor field,
435 java.lang.Object value) {
436 return super.
setField(field, value);
440 com.google.protobuf.Descriptors.FieldDescriptor field) {
445 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
450 com.google.protobuf.Descriptors.FieldDescriptor field,
451 int index, java.lang.Object value) {
456 com.google.protobuf.Descriptors.FieldDescriptor field,
457 java.lang.Object value) {
462 if (other instanceof com.google.ortools.sat.TableConstraintProto) {
463 return mergeFrom((com.google.ortools.sat.TableConstraintProto)other);
465 super.mergeFrom(other);
471 if (other == com.google.ortools.sat.TableConstraintProto.getDefaultInstance())
return this;
472 if (!other.vars_.isEmpty()) {
473 if (vars_.isEmpty()) {
475 vars_.makeImmutable();
476 bitField0_ |= 0x00000001;
478 ensureVarsIsMutable();
479 vars_.addAll(other.vars_);
483 if (!other.values_.isEmpty()) {
484 if (values_.isEmpty()) {
485 values_ = other.values_;
486 values_.makeImmutable();
487 bitField0_ |= 0x00000002;
489 ensureValuesIsMutable();
490 values_.addAll(other.values_);
494 if (other.getNegated() !=
false) {
509 com.google.protobuf.CodedInputStream input,
510 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
511 throws java.io.IOException {
512 if (extensionRegistry ==
null) {
513 throw new java.lang.NullPointerException();
516 boolean done =
false;
518 int tag = input.readTag();
524 int v = input.readInt32();
525 ensureVarsIsMutable();
530 int length = input.readRawVarint32();
531 int limit = input.pushLimit(length);
532 ensureVarsIsMutable();
533 while (input.getBytesUntilLimit() > 0) {
534 vars_.addInt(input.readInt32());
536 input.popLimit(limit);
540 long v = input.readInt64();
541 ensureValuesIsMutable();
546 int length = input.readRawVarint32();
547 int limit = input.pushLimit(length);
548 ensureValuesIsMutable();
549 while (input.getBytesUntilLimit() > 0) {
550 values_.addLong(input.readInt64());
552 input.popLimit(limit);
556 negated_ = input.readBool();
557 bitField0_ |= 0x00000004;
561 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
568 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
569 throw e.unwrapIOException();
575 private int bitField0_;
577 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
578 private void ensureVarsIsMutable() {
579 if (!vars_.isModifiable()) {
580 vars_ = makeMutableCopy(vars_);
582 bitField0_ |= 0x00000001;
588 public java.util.List<java.lang.Integer>
590 vars_.makeImmutable();
606 return vars_.getInt(index);
615 int index,
int value) {
617 ensureVarsIsMutable();
618 vars_.setInt(index, value);
619 bitField0_ |= 0x00000001;
630 ensureVarsIsMutable();
632 bitField0_ |= 0x00000001;
642 java.lang.Iterable<? extends java.lang.Integer> values) {
643 ensureVarsIsMutable();
644 com.google.protobuf.AbstractMessageLite.Builder.addAll(
646 bitField0_ |= 0x00000001;
655 vars_ = emptyIntList();
656 bitField0_ = (bitField0_ & ~0x00000001);
661 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
662 private void ensureValuesIsMutable() {
663 if (!values_.isModifiable()) {
664 values_ = makeMutableCopy(values_);
666 bitField0_ |= 0x00000002;
672 public java.util.List<java.lang.Long>
674 values_.makeImmutable();
682 return values_.size();
690 return values_.getLong(index);
699 int index,
long value) {
701 ensureValuesIsMutable();
702 values_.setLong(index, value);
703 bitField0_ |= 0x00000002;
714 ensureValuesIsMutable();
715 values_.addLong(value);
716 bitField0_ |= 0x00000002;
726 java.lang.Iterable<? extends java.lang.Long> values) {
727 ensureValuesIsMutable();
728 com.google.protobuf.AbstractMessageLite.Builder.addAll(
730 bitField0_ |= 0x00000002;
739 values_ = emptyLongList();
740 bitField0_ = (bitField0_ & ~0x00000002);
745 private boolean negated_ ;
772 bitField0_ |= 0x00000004;
786 bitField0_ = (bitField0_ & ~0x00000004);
793 final com.google.protobuf.UnknownFieldSet unknownFields) {
799 final com.google.protobuf.UnknownFieldSet unknownFields) {
810 DEFAULT_INSTANCE =
new com.google.ortools.sat.TableConstraintProto();
814 return DEFAULT_INSTANCE;
821 com.google.protobuf.CodedInputStream input,
822 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
823 throws com.google.protobuf.InvalidProtocolBufferException {
826 builder.mergeFrom(input, extensionRegistry);
827 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
828 throw e.setUnfinishedMessage(builder.buildPartial());
829 }
catch (com.google.protobuf.UninitializedMessageException e) {
830 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
831 }
catch (java.io.IOException e) {
832 throw new com.google.protobuf.InvalidProtocolBufferException(e)
833 .setUnfinishedMessage(builder.buildPartial());
835 return builder.buildPartial();
850 return DEFAULT_INSTANCE;