5package com.google.ortools.sat;
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35 vars_ = emptyIntList();
36 values_ = emptyLongList();
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.TableConstraintProto.class, com.google.ortools.sat.TableConstraintProto.Builder.class);
53 @SuppressWarnings(
"serial")
54 private com.google.protobuf.Internal.IntList vars_ =
61 public java.util.List<java.lang.Integer>
78 return vars_.getInt(index);
80 private int varsMemoizedSerializedSize = -1;
83 @SuppressWarnings(
"serial")
84 private com.google.protobuf.Internal.LongList values_ =
91 public java.util.List<java.lang.Long>
100 return values_.size();
108 return values_.getLong(index);
110 private int valuesMemoizedSerializedSize = -1;
113 private boolean negated_ =
false;
128 private byte memoizedIsInitialized = -1;
135 memoizedIsInitialized = 1;
140 public void writeTo(com.google.protobuf.CodedOutputStream output)
141 throws java.io.IOException {
144 output.writeUInt32NoTag(10);
145 output.writeUInt32NoTag(varsMemoizedSerializedSize);
147 for (
int i = 0; i < vars_.size(); i++) {
148 output.writeInt32NoTag(vars_.getInt(i));
151 output.writeUInt32NoTag(18);
152 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
154 for (
int i = 0; i < values_.size(); i++) {
155 output.writeInt64NoTag(values_.getLong(i));
157 if (negated_ !=
false) {
158 output.writeBool(3, negated_);
160 getUnknownFields().writeTo(output);
165 int size = memoizedSize;
166 if (size != -1)
return size;
171 for (
int i = 0; i < vars_.size(); i++) {
172 dataSize += com.google.protobuf.CodedOutputStream
173 .computeInt32SizeNoTag(vars_.getInt(i));
178 size += com.google.protobuf.CodedOutputStream
179 .computeInt32SizeNoTag(dataSize);
181 varsMemoizedSerializedSize = dataSize;
185 for (
int i = 0; i < values_.size(); i++) {
186 dataSize += com.google.protobuf.CodedOutputStream
187 .computeInt64SizeNoTag(values_.getLong(i));
192 size += com.google.protobuf.CodedOutputStream
193 .computeInt32SizeNoTag(dataSize);
195 valuesMemoizedSerializedSize = dataSize;
197 if (negated_ !=
false) {
198 size += com.google.protobuf.CodedOutputStream
199 .computeBoolSize(3, negated_);
201 size += getUnknownFields().getSerializedSize();
207 public boolean equals(
final java.lang.Object obj) {
211 if (!(obj instanceof com.google.ortools.sat.TableConstraintProto)) {
212 return super.equals(obj);
222 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
228 if (memoizedHashCode != 0) {
229 return memoizedHashCode;
242 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
244 hash = (29 * hash) + getUnknownFields().hashCode();
245 memoizedHashCode = hash;
250 java.nio.ByteBuffer data)
251 throws com.google.protobuf.InvalidProtocolBufferException {
252 return PARSER.parseFrom(data);
255 java.nio.ByteBuffer data,
256 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
257 throws com.google.protobuf.InvalidProtocolBufferException {
258 return PARSER.parseFrom(data, extensionRegistry);
261 com.google.protobuf.ByteString data)
262 throws com.google.protobuf.InvalidProtocolBufferException {
263 return PARSER.parseFrom(data);
266 com.google.protobuf.ByteString data,
267 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268 throws com.google.protobuf.InvalidProtocolBufferException {
269 return PARSER.parseFrom(data, extensionRegistry);
272 throws com.google.protobuf.InvalidProtocolBufferException {
273 return PARSER.parseFrom(data);
277 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
278 throws com.google.protobuf.InvalidProtocolBufferException {
279 return PARSER.parseFrom(data, extensionRegistry);
282 throws java.io.IOException {
283 return com.google.protobuf.GeneratedMessage
284 .parseWithIOException(PARSER, input);
287 java.io.InputStream input,
288 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
289 throws java.io.IOException {
290 return com.google.protobuf.GeneratedMessage
291 .parseWithIOException(PARSER, input, extensionRegistry);
295 throws java.io.IOException {
296 return com.google.protobuf.GeneratedMessage
297 .parseDelimitedWithIOException(PARSER, input);
301 java.io.InputStream input,
302 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303 throws java.io.IOException {
304 return com.google.protobuf.GeneratedMessage
305 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
308 com.google.protobuf.CodedInputStream input)
309 throws java.io.IOException {
310 return com.google.protobuf.GeneratedMessage
311 .parseWithIOException(PARSER, input);
314 com.google.protobuf.CodedInputStream input,
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws java.io.IOException {
317 return com.google.protobuf.GeneratedMessage
318 .parseWithIOException(PARSER, input, extensionRegistry);
331 return this == DEFAULT_INSTANCE
337 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
351 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
354 public static final com.google.protobuf.Descriptors.Descriptor
356 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_descriptor;
360 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
362 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_fieldAccessorTable
363 .ensureFieldAccessorsInitialized(
364 com.google.ortools.sat.TableConstraintProto.class, com.google.ortools.sat.TableConstraintProto.Builder.class);
373 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
381 vars_ = emptyIntList();
382 values_ = emptyLongList();
388 public com.google.protobuf.Descriptors.Descriptor
390 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_TableConstraintProto_descriptor;
395 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
402 throw newUninitializedMessageException(result);
410 if (bitField0_ != 0) { buildPartial0(result); }
415 private void buildPartial0(com.google.ortools.sat.TableConstraintProto result) {
416 int from_bitField0_ = bitField0_;
417 if (((from_bitField0_ & 0x00000001) != 0)) {
418 vars_.makeImmutable();
419 result.vars_ = vars_;
421 if (((from_bitField0_ & 0x00000002) != 0)) {
422 values_.makeImmutable();
423 result.values_ = values_;
425 if (((from_bitField0_ & 0x00000004) != 0)) {
426 result.negated_ = negated_;
432 if (other instanceof com.google.ortools.sat.TableConstraintProto) {
433 return mergeFrom((com.google.ortools.sat.TableConstraintProto)other);
435 super.mergeFrom(other);
441 if (other == com.google.ortools.sat.TableConstraintProto.getDefaultInstance())
return this;
442 if (!other.vars_.isEmpty()) {
443 if (vars_.isEmpty()) {
445 vars_.makeImmutable();
446 bitField0_ |= 0x00000001;
448 ensureVarsIsMutable();
449 vars_.addAll(other.vars_);
453 if (!other.values_.isEmpty()) {
454 if (values_.isEmpty()) {
455 values_ = other.values_;
456 values_.makeImmutable();
457 bitField0_ |= 0x00000002;
459 ensureValuesIsMutable();
460 values_.addAll(other.values_);
464 if (other.getNegated() !=
false) {
467 this.mergeUnknownFields(other.getUnknownFields());
479 com.google.protobuf.CodedInputStream input,
480 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
481 throws java.io.IOException {
482 if (extensionRegistry ==
null) {
483 throw new java.lang.NullPointerException();
486 boolean done =
false;
488 int tag = input.readTag();
494 int v = input.readInt32();
495 ensureVarsIsMutable();
500 int length = input.readRawVarint32();
501 int limit = input.pushLimit(length);
502 ensureVarsIsMutable();
503 while (input.getBytesUntilLimit() > 0) {
504 vars_.addInt(input.readInt32());
506 input.popLimit(limit);
510 long v = input.readInt64();
511 ensureValuesIsMutable();
516 int length = input.readRawVarint32();
517 int limit = input.pushLimit(length);
518 ensureValuesIsMutable();
519 while (input.getBytesUntilLimit() > 0) {
520 values_.addLong(input.readInt64());
522 input.popLimit(limit);
526 negated_ = input.readBool();
527 bitField0_ |= 0x00000004;
531 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
538 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
539 throw e.unwrapIOException();
545 private int bitField0_;
547 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
548 private void ensureVarsIsMutable() {
549 if (!vars_.isModifiable()) {
550 vars_ = makeMutableCopy(vars_);
552 bitField0_ |= 0x00000001;
558 public java.util.List<java.lang.Integer>
560 vars_.makeImmutable();
576 return vars_.getInt(index);
585 int index,
int value) {
587 ensureVarsIsMutable();
588 vars_.setInt(index, value);
589 bitField0_ |= 0x00000001;
600 ensureVarsIsMutable();
602 bitField0_ |= 0x00000001;
612 java.lang.Iterable<? extends java.lang.Integer> values) {
613 ensureVarsIsMutable();
614 com.google.protobuf.AbstractMessageLite.Builder.addAll(
616 bitField0_ |= 0x00000001;
625 vars_ = emptyIntList();
626 bitField0_ = (bitField0_ & ~0x00000001);
631 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
632 private void ensureValuesIsMutable() {
633 if (!values_.isModifiable()) {
634 values_ = makeMutableCopy(values_);
636 bitField0_ |= 0x00000002;
642 public java.util.List<java.lang.Long>
644 values_.makeImmutable();
652 return values_.size();
660 return values_.getLong(index);
669 int index,
long value) {
671 ensureValuesIsMutable();
672 values_.setLong(index, value);
673 bitField0_ |= 0x00000002;
684 ensureValuesIsMutable();
685 values_.addLong(value);
686 bitField0_ |= 0x00000002;
696 java.lang.Iterable<? extends java.lang.Long> values) {
697 ensureValuesIsMutable();
698 com.google.protobuf.AbstractMessageLite.Builder.addAll(
700 bitField0_ |= 0x00000002;
709 values_ = emptyLongList();
710 bitField0_ = (bitField0_ & ~0x00000002);
715 private boolean negated_ ;
742 bitField0_ |= 0x00000004;
756 bitField0_ = (bitField0_ & ~0x00000004);
768 DEFAULT_INSTANCE =
new com.google.ortools.sat.TableConstraintProto();
772 return DEFAULT_INSTANCE;
779 com.google.protobuf.CodedInputStream input,
780 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
781 throws com.google.protobuf.InvalidProtocolBufferException {
784 builder.mergeFrom(input, extensionRegistry);
785 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
786 throw e.setUnfinishedMessage(builder.buildPartial());
787 }
catch (com.google.protobuf.UninitializedMessageException e) {
788 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
789 }
catch (java.io.IOException e) {
790 throw new com.google.protobuf.InvalidProtocolBufferException(e)
791 .setUnfinishedMessage(builder.buildPartial());
793 return builder.buildPartial();
808 return DEFAULT_INSTANCE;