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_PartialVariableAssignment_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.PartialVariableAssignment.class, com.google.ortools.sat.PartialVariableAssignment.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;
112 private byte memoizedIsInitialized = -1;
119 memoizedIsInitialized = 1;
124 public void writeTo(com.google.protobuf.CodedOutputStream output)
125 throws java.io.IOException {
128 output.writeUInt32NoTag(10);
129 output.writeUInt32NoTag(varsMemoizedSerializedSize);
131 for (
int i = 0; i < vars_.size(); i++) {
132 output.writeInt32NoTag(vars_.getInt(i));
135 output.writeUInt32NoTag(18);
136 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
138 for (
int i = 0; i < values_.size(); i++) {
139 output.writeInt64NoTag(values_.getLong(i));
141 getUnknownFields().writeTo(output);
146 int size = memoizedSize;
147 if (size != -1)
return size;
152 for (
int i = 0; i < vars_.size(); i++) {
153 dataSize += com.google.protobuf.CodedOutputStream
154 .computeInt32SizeNoTag(vars_.getInt(i));
159 size += com.google.protobuf.CodedOutputStream
160 .computeInt32SizeNoTag(dataSize);
162 varsMemoizedSerializedSize = dataSize;
166 for (
int i = 0; i < values_.size(); i++) {
167 dataSize += com.google.protobuf.CodedOutputStream
168 .computeInt64SizeNoTag(values_.getLong(i));
173 size += com.google.protobuf.CodedOutputStream
174 .computeInt32SizeNoTag(dataSize);
176 valuesMemoizedSerializedSize = dataSize;
178 size += getUnknownFields().getSerializedSize();
184 public boolean equals(
final java.lang.Object obj) {
188 if (!(obj instanceof com.google.ortools.sat.PartialVariableAssignment)) {
189 return super.equals(obj);
197 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
203 if (memoizedHashCode != 0) {
204 return memoizedHashCode;
216 hash = (29 * hash) + getUnknownFields().hashCode();
217 memoizedHashCode = hash;
222 java.nio.ByteBuffer data)
223 throws com.google.protobuf.InvalidProtocolBufferException {
224 return PARSER.parseFrom(data);
227 java.nio.ByteBuffer data,
228 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
229 throws com.google.protobuf.InvalidProtocolBufferException {
230 return PARSER.parseFrom(data, extensionRegistry);
233 com.google.protobuf.ByteString data)
234 throws com.google.protobuf.InvalidProtocolBufferException {
235 return PARSER.parseFrom(data);
238 com.google.protobuf.ByteString data,
239 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
240 throws com.google.protobuf.InvalidProtocolBufferException {
241 return PARSER.parseFrom(data, extensionRegistry);
244 throws com.google.protobuf.InvalidProtocolBufferException {
245 return PARSER.parseFrom(data);
249 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250 throws com.google.protobuf.InvalidProtocolBufferException {
251 return PARSER.parseFrom(data, extensionRegistry);
254 throws java.io.IOException {
255 return com.google.protobuf.GeneratedMessage
256 .parseWithIOException(PARSER, input);
259 java.io.InputStream input,
260 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
261 throws java.io.IOException {
262 return com.google.protobuf.GeneratedMessage
263 .parseWithIOException(PARSER, input, extensionRegistry);
267 throws java.io.IOException {
268 return com.google.protobuf.GeneratedMessage
269 .parseDelimitedWithIOException(PARSER, input);
273 java.io.InputStream input,
274 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
275 throws java.io.IOException {
276 return com.google.protobuf.GeneratedMessage
277 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
280 com.google.protobuf.CodedInputStream input)
281 throws java.io.IOException {
282 return com.google.protobuf.GeneratedMessage
283 .parseWithIOException(PARSER, input);
286 com.google.protobuf.CodedInputStream input,
287 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
288 throws java.io.IOException {
289 return com.google.protobuf.GeneratedMessage
290 .parseWithIOException(PARSER, input, extensionRegistry);
303 return this == DEFAULT_INSTANCE
309 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
323 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
326 public static final com.google.protobuf.Descriptors.Descriptor
328 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_descriptor;
332 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
334 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_fieldAccessorTable
335 .ensureFieldAccessorsInitialized(
336 com.google.ortools.sat.PartialVariableAssignment.class, com.google.ortools.sat.PartialVariableAssignment.Builder.class);
345 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
353 vars_ = emptyIntList();
354 values_ = emptyLongList();
359 public com.google.protobuf.Descriptors.Descriptor
361 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_PartialVariableAssignment_descriptor;
366 return com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance();
373 throw newUninitializedMessageException(result);
381 if (bitField0_ != 0) { buildPartial0(result); }
386 private void buildPartial0(com.google.ortools.sat.PartialVariableAssignment result) {
387 int from_bitField0_ = bitField0_;
388 if (((from_bitField0_ & 0x00000001) != 0)) {
389 vars_.makeImmutable();
390 result.vars_ = vars_;
392 if (((from_bitField0_ & 0x00000002) != 0)) {
393 values_.makeImmutable();
394 result.values_ = values_;
400 if (other instanceof com.google.ortools.sat.PartialVariableAssignment) {
401 return mergeFrom((com.google.ortools.sat.PartialVariableAssignment)other);
403 super.mergeFrom(other);
409 if (other == com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance())
return this;
410 if (!other.vars_.isEmpty()) {
411 if (vars_.isEmpty()) {
413 vars_.makeImmutable();
414 bitField0_ |= 0x00000001;
416 ensureVarsIsMutable();
417 vars_.addAll(other.vars_);
421 if (!other.values_.isEmpty()) {
422 if (values_.isEmpty()) {
423 values_ = other.values_;
424 values_.makeImmutable();
425 bitField0_ |= 0x00000002;
427 ensureValuesIsMutable();
428 values_.addAll(other.values_);
432 this.mergeUnknownFields(other.getUnknownFields());
444 com.google.protobuf.CodedInputStream input,
445 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
446 throws java.io.IOException {
447 if (extensionRegistry ==
null) {
448 throw new java.lang.NullPointerException();
451 boolean done =
false;
453 int tag = input.readTag();
459 int v = input.readInt32();
460 ensureVarsIsMutable();
465 int length = input.readRawVarint32();
466 int limit = input.pushLimit(length);
467 ensureVarsIsMutable();
468 while (input.getBytesUntilLimit() > 0) {
469 vars_.addInt(input.readInt32());
471 input.popLimit(limit);
475 long v = input.readInt64();
476 ensureValuesIsMutable();
481 int length = input.readRawVarint32();
482 int limit = input.pushLimit(length);
483 ensureValuesIsMutable();
484 while (input.getBytesUntilLimit() > 0) {
485 values_.addLong(input.readInt64());
487 input.popLimit(limit);
491 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
498 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
499 throw e.unwrapIOException();
505 private int bitField0_;
507 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
508 private void ensureVarsIsMutable() {
509 if (!vars_.isModifiable()) {
510 vars_ = makeMutableCopy(vars_);
512 bitField0_ |= 0x00000001;
518 public java.util.List<java.lang.Integer>
520 vars_.makeImmutable();
536 return vars_.getInt(index);
545 int index,
int value) {
547 ensureVarsIsMutable();
548 vars_.setInt(index, value);
549 bitField0_ |= 0x00000001;
560 ensureVarsIsMutable();
562 bitField0_ |= 0x00000001;
572 java.lang.Iterable<? extends java.lang.Integer> values) {
573 ensureVarsIsMutable();
574 com.google.protobuf.AbstractMessageLite.Builder.addAll(
576 bitField0_ |= 0x00000001;
585 vars_ = emptyIntList();
586 bitField0_ = (bitField0_ & ~0x00000001);
591 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
592 private void ensureValuesIsMutable() {
593 if (!values_.isModifiable()) {
594 values_ = makeMutableCopy(values_);
596 bitField0_ |= 0x00000002;
602 public java.util.List<java.lang.Long>
604 values_.makeImmutable();
612 return values_.size();
620 return values_.getLong(index);
629 int index,
long value) {
631 ensureValuesIsMutable();
632 values_.setLong(index, value);
633 bitField0_ |= 0x00000002;
644 ensureValuesIsMutable();
645 values_.addLong(value);
646 bitField0_ |= 0x00000002;
656 java.lang.Iterable<? extends java.lang.Long> values) {
657 ensureValuesIsMutable();
658 com.google.protobuf.AbstractMessageLite.Builder.addAll(
660 bitField0_ |= 0x00000002;
669 values_ = emptyLongList();
670 bitField0_ = (bitField0_ & ~0x00000002);
681 DEFAULT_INSTANCE =
new com.google.ortools.sat.PartialVariableAssignment();
685 return DEFAULT_INSTANCE;
692 com.google.protobuf.CodedInputStream input,
693 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
694 throws com.google.protobuf.InvalidProtocolBufferException {
697 builder.mergeFrom(input, extensionRegistry);
698 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
699 throw e.setUnfinishedMessage(builder.buildPartial());
700 }
catch (com.google.protobuf.UninitializedMessageException e) {
701 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
702 }
catch (java.io.IOException e) {
703 throw new com.google.protobuf.InvalidProtocolBufferException(e)
704 .setUnfinishedMessage(builder.buildPartial());
706 return builder.buildPartial();
721 return DEFAULT_INSTANCE;