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_PartialVariableAssignment_descriptor;
43 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
45 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.sat.PartialVariableAssignment.class, com.google.ortools.sat.PartialVariableAssignment.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;
110 private byte memoizedIsInitialized = -1;
117 memoizedIsInitialized = 1;
122 public void writeTo(com.google.protobuf.CodedOutputStream output)
123 throws java.io.IOException {
126 output.writeUInt32NoTag(10);
127 output.writeUInt32NoTag(varsMemoizedSerializedSize);
129 for (
int i = 0; i < vars_.size(); i++) {
130 output.writeInt32NoTag(vars_.getInt(i));
133 output.writeUInt32NoTag(18);
134 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
136 for (
int i = 0; i < values_.size(); i++) {
137 output.writeInt64NoTag(values_.getLong(i));
139 getUnknownFields().writeTo(output);
144 int size = memoizedSize;
145 if (size != -1)
return size;
150 for (
int i = 0; i < vars_.size(); i++) {
151 dataSize += com.google.protobuf.CodedOutputStream
152 .computeInt32SizeNoTag(vars_.getInt(i));
157 size += com.google.protobuf.CodedOutputStream
158 .computeInt32SizeNoTag(dataSize);
160 varsMemoizedSerializedSize = dataSize;
164 for (
int i = 0; i < values_.size(); i++) {
165 dataSize += com.google.protobuf.CodedOutputStream
166 .computeInt64SizeNoTag(values_.getLong(i));
171 size += com.google.protobuf.CodedOutputStream
172 .computeInt32SizeNoTag(dataSize);
174 valuesMemoizedSerializedSize = dataSize;
176 size += getUnknownFields().getSerializedSize();
182 public boolean equals(
final java.lang.Object obj) {
186 if (!(obj instanceof com.google.ortools.sat.PartialVariableAssignment)) {
187 return super.equals(obj);
195 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
201 if (memoizedHashCode != 0) {
202 return memoizedHashCode;
214 hash = (29 * hash) + getUnknownFields().hashCode();
215 memoizedHashCode = hash;
220 java.nio.ByteBuffer data)
221 throws com.google.protobuf.InvalidProtocolBufferException {
222 return PARSER.parseFrom(data);
225 java.nio.ByteBuffer data,
226 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
227 throws com.google.protobuf.InvalidProtocolBufferException {
228 return PARSER.parseFrom(data, extensionRegistry);
231 com.google.protobuf.ByteString data)
232 throws com.google.protobuf.InvalidProtocolBufferException {
233 return PARSER.parseFrom(data);
236 com.google.protobuf.ByteString data,
237 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
238 throws com.google.protobuf.InvalidProtocolBufferException {
239 return PARSER.parseFrom(data, extensionRegistry);
242 throws com.google.protobuf.InvalidProtocolBufferException {
243 return PARSER.parseFrom(data);
247 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
248 throws com.google.protobuf.InvalidProtocolBufferException {
249 return PARSER.parseFrom(data, extensionRegistry);
252 throws java.io.IOException {
253 return com.google.protobuf.GeneratedMessageV3
254 .parseWithIOException(PARSER, input);
257 java.io.InputStream input,
258 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
259 throws java.io.IOException {
260 return com.google.protobuf.GeneratedMessageV3
261 .parseWithIOException(PARSER, input, extensionRegistry);
265 throws java.io.IOException {
266 return com.google.protobuf.GeneratedMessageV3
267 .parseDelimitedWithIOException(PARSER, input);
271 java.io.InputStream input,
272 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
273 throws java.io.IOException {
274 return com.google.protobuf.GeneratedMessageV3
275 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
278 com.google.protobuf.CodedInputStream input)
279 throws java.io.IOException {
280 return com.google.protobuf.GeneratedMessageV3
281 .parseWithIOException(PARSER, input);
284 com.google.protobuf.CodedInputStream input,
285 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
286 throws java.io.IOException {
287 return com.google.protobuf.GeneratedMessageV3
288 .parseWithIOException(PARSER, input, extensionRegistry);
301 return this == DEFAULT_INSTANCE
307 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
321 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
324 public static final com.google.protobuf.Descriptors.Descriptor
326 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_descriptor;
330 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
332 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_fieldAccessorTable
333 .ensureFieldAccessorsInitialized(
334 com.google.ortools.sat.PartialVariableAssignment.class, com.google.ortools.sat.PartialVariableAssignment.Builder.class);
343 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
351 vars_ = emptyIntList();
352 values_ = emptyLongList();
357 public com.google.protobuf.Descriptors.Descriptor
359 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_descriptor;
364 return com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance();
371 throw newUninitializedMessageException(result);
379 if (bitField0_ != 0) { buildPartial0(result); }
384 private void buildPartial0(com.google.ortools.sat.PartialVariableAssignment result) {
385 int from_bitField0_ = bitField0_;
386 if (((from_bitField0_ & 0x00000001) != 0)) {
387 vars_.makeImmutable();
388 result.vars_ = vars_;
390 if (((from_bitField0_ & 0x00000002) != 0)) {
391 values_.makeImmutable();
392 result.values_ = values_;
398 return super.
clone();
402 com.google.protobuf.Descriptors.FieldDescriptor field,
403 java.lang.Object value) {
404 return super.
setField(field, value);
408 com.google.protobuf.Descriptors.FieldDescriptor field) {
413 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
418 com.google.protobuf.Descriptors.FieldDescriptor field,
419 int index, java.lang.Object value) {
424 com.google.protobuf.Descriptors.FieldDescriptor field,
425 java.lang.Object value) {
430 if (other instanceof com.google.ortools.sat.PartialVariableAssignment) {
431 return mergeFrom((com.google.ortools.sat.PartialVariableAssignment)other);
433 super.mergeFrom(other);
439 if (other == com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance())
return this;
440 if (!other.vars_.isEmpty()) {
441 if (vars_.isEmpty()) {
443 vars_.makeImmutable();
444 bitField0_ |= 0x00000001;
446 ensureVarsIsMutable();
447 vars_.addAll(other.vars_);
451 if (!other.values_.isEmpty()) {
452 if (values_.isEmpty()) {
453 values_ = other.values_;
454 values_.makeImmutable();
455 bitField0_ |= 0x00000002;
457 ensureValuesIsMutable();
458 values_.addAll(other.values_);
474 com.google.protobuf.CodedInputStream input,
475 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
476 throws java.io.IOException {
477 if (extensionRegistry ==
null) {
478 throw new java.lang.NullPointerException();
481 boolean done =
false;
483 int tag = input.readTag();
489 int v = input.readInt32();
490 ensureVarsIsMutable();
495 int length = input.readRawVarint32();
496 int limit = input.pushLimit(length);
497 ensureVarsIsMutable();
498 while (input.getBytesUntilLimit() > 0) {
499 vars_.addInt(input.readInt32());
501 input.popLimit(limit);
505 long v = input.readInt64();
506 ensureValuesIsMutable();
511 int length = input.readRawVarint32();
512 int limit = input.pushLimit(length);
513 ensureValuesIsMutable();
514 while (input.getBytesUntilLimit() > 0) {
515 values_.addLong(input.readInt64());
517 input.popLimit(limit);
521 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
528 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
529 throw e.unwrapIOException();
535 private int bitField0_;
537 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
538 private void ensureVarsIsMutable() {
539 if (!vars_.isModifiable()) {
540 vars_ = makeMutableCopy(vars_);
542 bitField0_ |= 0x00000001;
548 public java.util.List<java.lang.Integer>
550 vars_.makeImmutable();
566 return vars_.getInt(index);
575 int index,
int value) {
577 ensureVarsIsMutable();
578 vars_.setInt(index, value);
579 bitField0_ |= 0x00000001;
590 ensureVarsIsMutable();
592 bitField0_ |= 0x00000001;
602 java.lang.Iterable<? extends java.lang.Integer> values) {
603 ensureVarsIsMutable();
604 com.google.protobuf.AbstractMessageLite.Builder.addAll(
606 bitField0_ |= 0x00000001;
615 vars_ = emptyIntList();
616 bitField0_ = (bitField0_ & ~0x00000001);
621 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
622 private void ensureValuesIsMutable() {
623 if (!values_.isModifiable()) {
624 values_ = makeMutableCopy(values_);
626 bitField0_ |= 0x00000002;
632 public java.util.List<java.lang.Long>
634 values_.makeImmutable();
642 return values_.size();
650 return values_.getLong(index);
659 int index,
long value) {
661 ensureValuesIsMutable();
662 values_.setLong(index, value);
663 bitField0_ |= 0x00000002;
674 ensureValuesIsMutable();
675 values_.addLong(value);
676 bitField0_ |= 0x00000002;
686 java.lang.Iterable<? extends java.lang.Long> values) {
687 ensureValuesIsMutable();
688 com.google.protobuf.AbstractMessageLite.Builder.addAll(
690 bitField0_ |= 0x00000002;
699 values_ = emptyLongList();
700 bitField0_ = (bitField0_ & ~0x00000002);
706 final com.google.protobuf.UnknownFieldSet unknownFields) {
712 final com.google.protobuf.UnknownFieldSet unknownFields) {
723 DEFAULT_INSTANCE =
new com.google.ortools.sat.PartialVariableAssignment();
727 return DEFAULT_INSTANCE;
734 com.google.protobuf.CodedInputStream input,
735 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
736 throws com.google.protobuf.InvalidProtocolBufferException {
739 builder.mergeFrom(input, extensionRegistry);
740 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
741 throw e.setUnfinishedMessage(builder.buildPartial());
742 }
catch (com.google.protobuf.UninitializedMessageException e) {
743 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
744 }
catch (java.io.IOException e) {
745 throw new com.google.protobuf.InvalidProtocolBufferException(e)
746 .setUnfinishedMessage(builder.buildPartial());
748 return builder.buildPartial();
763 return DEFAULT_INSTANCE;