5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
21 private CpSolverSolution(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
25 values_ = emptyLongList();
29 @SuppressWarnings({
"unused"})
31 UnusedPrivateParameter unused) {
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
41 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
43 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
49 @SuppressWarnings(
"serial")
50 private com.google.protobuf.Internal.LongList values_ =
57 public java.util.List<java.lang.Long>
66 return values_.size();
74 return values_.getLong(index);
76 private int valuesMemoizedSerializedSize = -1;
78 private byte memoizedIsInitialized = -1;
85 memoizedIsInitialized = 1;
90 public void writeTo(com.google.protobuf.CodedOutputStream output)
91 throws java.io.IOException {
94 output.writeUInt32NoTag(10);
95 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
97 for (
int i = 0; i < values_.size(); i++) {
98 output.writeInt64NoTag(values_.getLong(i));
100 getUnknownFields().writeTo(output);
105 int size = memoizedSize;
106 if (size != -1)
return size;
111 for (
int i = 0; i < values_.size(); i++) {
112 dataSize += com.google.protobuf.CodedOutputStream
113 .computeInt64SizeNoTag(values_.getLong(i));
118 size += com.google.protobuf.CodedOutputStream
119 .computeInt32SizeNoTag(dataSize);
121 valuesMemoizedSerializedSize = dataSize;
123 size += getUnknownFields().getSerializedSize();
129 public boolean equals(
final java.lang.Object obj) {
133 if (!(obj instanceof com.google.ortools.sat.CpSolverSolution)) {
134 return super.equals(obj);
140 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
146 if (memoizedHashCode != 0) {
147 return memoizedHashCode;
155 hash = (29 * hash) + getUnknownFields().hashCode();
156 memoizedHashCode = hash;
161 java.nio.ByteBuffer data)
162 throws com.google.protobuf.InvalidProtocolBufferException {
163 return PARSER.parseFrom(data);
166 java.nio.ByteBuffer data,
167 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
168 throws com.google.protobuf.InvalidProtocolBufferException {
169 return PARSER.parseFrom(data, extensionRegistry);
172 com.google.protobuf.ByteString data)
173 throws com.google.protobuf.InvalidProtocolBufferException {
174 return PARSER.parseFrom(data);
177 com.google.protobuf.ByteString data,
178 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
179 throws com.google.protobuf.InvalidProtocolBufferException {
180 return PARSER.parseFrom(data, extensionRegistry);
183 throws com.google.protobuf.InvalidProtocolBufferException {
184 return PARSER.parseFrom(data);
188 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
189 throws com.google.protobuf.InvalidProtocolBufferException {
190 return PARSER.parseFrom(data, extensionRegistry);
193 throws java.io.IOException {
194 return com.google.protobuf.GeneratedMessageV3
195 .parseWithIOException(PARSER, input);
198 java.io.InputStream input,
199 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
200 throws java.io.IOException {
201 return com.google.protobuf.GeneratedMessageV3
202 .parseWithIOException(PARSER, input, extensionRegistry);
206 throws java.io.IOException {
207 return com.google.protobuf.GeneratedMessageV3
208 .parseDelimitedWithIOException(PARSER, input);
212 java.io.InputStream input,
213 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
214 throws java.io.IOException {
215 return com.google.protobuf.GeneratedMessageV3
216 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
219 com.google.protobuf.CodedInputStream input)
220 throws java.io.IOException {
221 return com.google.protobuf.GeneratedMessageV3
222 .parseWithIOException(PARSER, input);
225 com.google.protobuf.CodedInputStream input,
226 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
227 throws java.io.IOException {
228 return com.google.protobuf.GeneratedMessageV3
229 .parseWithIOException(PARSER, input, extensionRegistry);
242 return this == DEFAULT_INSTANCE
248 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
261 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
264 public static final com.google.protobuf.Descriptors.Descriptor
266 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
270 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
272 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
273 .ensureFieldAccessorsInitialized(
274 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
283 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
291 values_ = emptyLongList();
296 public com.google.protobuf.Descriptors.Descriptor
298 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
303 return com.google.ortools.sat.CpSolverSolution.getDefaultInstance();
310 throw newUninitializedMessageException(result);
318 if (bitField0_ != 0) { buildPartial0(result); }
323 private void buildPartial0(com.google.ortools.sat.CpSolverSolution result) {
324 int from_bitField0_ = bitField0_;
325 if (((from_bitField0_ & 0x00000001) != 0)) {
326 values_.makeImmutable();
327 result.values_ = values_;
333 return super.
clone();
337 com.google.protobuf.Descriptors.FieldDescriptor field,
338 java.lang.Object value) {
339 return super.
setField(field, value);
343 com.google.protobuf.Descriptors.FieldDescriptor field) {
348 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
353 com.google.protobuf.Descriptors.FieldDescriptor field,
354 int index, java.lang.Object value) {
359 com.google.protobuf.Descriptors.FieldDescriptor field,
360 java.lang.Object value) {
365 if (other instanceof com.google.ortools.sat.CpSolverSolution) {
366 return mergeFrom((com.google.ortools.sat.CpSolverSolution)other);
368 super.mergeFrom(other);
374 if (other == com.google.ortools.sat.CpSolverSolution.getDefaultInstance())
return this;
375 if (!other.values_.isEmpty()) {
376 if (values_.isEmpty()) {
377 values_ = other.values_;
378 values_.makeImmutable();
379 bitField0_ |= 0x00000001;
381 ensureValuesIsMutable();
382 values_.addAll(other.values_);
398 com.google.protobuf.CodedInputStream input,
399 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
400 throws java.io.IOException {
401 if (extensionRegistry ==
null) {
402 throw new java.lang.NullPointerException();
405 boolean done =
false;
407 int tag = input.readTag();
413 long v = input.readInt64();
414 ensureValuesIsMutable();
419 int length = input.readRawVarint32();
420 int limit = input.pushLimit(length);
421 ensureValuesIsMutable();
422 while (input.getBytesUntilLimit() > 0) {
423 values_.addLong(input.readInt64());
425 input.popLimit(limit);
429 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
436 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
437 throw e.unwrapIOException();
443 private int bitField0_;
445 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
446 private void ensureValuesIsMutable() {
447 if (!values_.isModifiable()) {
448 values_ = makeMutableCopy(values_);
450 bitField0_ |= 0x00000001;
456 public java.util.List<java.lang.Long>
458 values_.makeImmutable();
466 return values_.size();
474 return values_.getLong(index);
483 int index,
long value) {
485 ensureValuesIsMutable();
486 values_.setLong(index, value);
487 bitField0_ |= 0x00000001;
498 ensureValuesIsMutable();
499 values_.addLong(value);
500 bitField0_ |= 0x00000001;
510 java.lang.Iterable<? extends java.lang.Long> values) {
511 ensureValuesIsMutable();
512 com.google.protobuf.AbstractMessageLite.Builder.addAll(
514 bitField0_ |= 0x00000001;
523 values_ = emptyLongList();
524 bitField0_ = (bitField0_ & ~0x00000001);
530 final com.google.protobuf.UnknownFieldSet unknownFields) {
536 final com.google.protobuf.UnknownFieldSet unknownFields) {
547 DEFAULT_INSTANCE =
new com.google.ortools.sat.CpSolverSolution();
551 return DEFAULT_INSTANCE;
558 com.google.protobuf.CodedInputStream input,
559 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
560 throws com.google.protobuf.InvalidProtocolBufferException {
563 builder.mergeFrom(input, extensionRegistry);
564 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
565 throw e.setUnfinishedMessage(builder.buildPartial());
566 }
catch (com.google.protobuf.UninitializedMessageException e) {
567 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
568 }
catch (java.io.IOException e) {
569 throw new com.google.protobuf.InvalidProtocolBufferException(e)
570 .setUnfinishedMessage(builder.buildPartial());
572 return builder.buildPartial();
587 return DEFAULT_INSTANCE;