6package com.google.ortools.sat;
16public final class CpSolverSolution
extends
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,
28 CpSolverSolution.class.getName());
31 private CpSolverSolution(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private CpSolverSolution() {
35 values_ = emptyLongList();
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
52 @SuppressWarnings(
"serial")
53 private com.google.protobuf.Internal.LongList values_ =
60 public java.
util.List<java.lang.Long>
69 return values_.size();
77 return values_.getLong(index);
79 private int valuesMemoizedSerializedSize = -1;
81 private byte memoizedIsInitialized = -1;
88 memoizedIsInitialized = 1;
93 public void writeTo(com.google.protobuf.CodedOutputStream output)
94 throws java.io.IOException {
97 output.writeUInt32NoTag(10);
98 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
100 for (
int i = 0; i < values_.size(); i++) {
101 output.writeInt64NoTag(values_.getLong(i));
103 getUnknownFields().writeTo(output);
108 int size = memoizedSize;
109 if (size != -1)
return size;
114 for (
int i = 0; i < values_.size(); i++) {
115 dataSize += com.google.protobuf.CodedOutputStream
116 .computeInt64SizeNoTag(values_.getLong(i));
121 size += com.google.protobuf.CodedOutputStream
122 .computeInt32SizeNoTag(dataSize);
124 valuesMemoizedSerializedSize = dataSize;
126 size += getUnknownFields().getSerializedSize();
132 public boolean equals(
final java.lang.Object obj) {
136 if (!(obj instanceof com.google.ortools.sat.CpSolverSolution)) {
137 return super.equals(obj);
143 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
149 if (memoizedHashCode != 0) {
150 return memoizedHashCode;
158 hash = (29 * hash) + getUnknownFields().hashCode();
159 memoizedHashCode = hash;
164 java.nio.ByteBuffer data)
165 throws com.google.protobuf.InvalidProtocolBufferException {
166 return PARSER.parseFrom(data);
169 java.nio.ByteBuffer data,
170 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
171 throws com.google.protobuf.InvalidProtocolBufferException {
172 return PARSER.parseFrom(data, extensionRegistry);
175 com.google.protobuf.ByteString data)
176 throws com.google.protobuf.InvalidProtocolBufferException {
177 return PARSER.parseFrom(data);
180 com.google.protobuf.ByteString data,
181 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
182 throws com.google.protobuf.InvalidProtocolBufferException {
183 return PARSER.parseFrom(data, extensionRegistry);
186 throws com.google.protobuf.InvalidProtocolBufferException {
187 return PARSER.parseFrom(data);
191 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
192 throws com.google.protobuf.InvalidProtocolBufferException {
193 return PARSER.parseFrom(data, extensionRegistry);
196 throws java.io.IOException {
197 return com.google.protobuf.GeneratedMessage
198 .parseWithIOException(PARSER, input);
201 java.io.InputStream input,
202 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
203 throws java.io.IOException {
204 return com.google.protobuf.GeneratedMessage
205 .parseWithIOException(PARSER, input, extensionRegistry);
209 throws java.io.IOException {
210 return com.google.protobuf.GeneratedMessage
211 .parseDelimitedWithIOException(PARSER, input);
215 java.io.InputStream input,
216 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
217 throws java.io.IOException {
218 return com.google.protobuf.GeneratedMessage
219 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
222 com.google.protobuf.CodedInputStream input)
223 throws java.io.IOException {
224 return com.google.protobuf.GeneratedMessage
225 .parseWithIOException(PARSER, input);
228 com.google.protobuf.CodedInputStream input,
229 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
230 throws java.io.IOException {
231 return com.google.protobuf.GeneratedMessage
232 .parseWithIOException(PARSER, input, extensionRegistry);
238 return DEFAULT_INSTANCE.toBuilder();
241 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
245 return this == DEFAULT_INSTANCE
251 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
263 public static final class Builder
extends
264 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
267 public static final com.google.protobuf.Descriptors.Descriptor
269 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
273 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
275 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
276 .ensureFieldAccessorsInitialized(
277 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
286 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
294 values_ = emptyLongList();
299 public com.google.protobuf.Descriptors.Descriptor
301 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
306 return com.google.ortools.sat.CpSolverSolution.getDefaultInstance();
313 throw newUninitializedMessageException(result);
321 if (bitField0_ != 0) { buildPartial0(result); }
326 private void buildPartial0(com.google.ortools.sat.CpSolverSolution result) {
327 int from_bitField0_ = bitField0_;
328 if (((from_bitField0_ & 0x00000001) != 0)) {
329 values_.makeImmutable();
330 result.values_ = values_;
335 public Builder
mergeFrom(com.google.protobuf.Message other) {
336 if (other instanceof com.google.ortools.sat.CpSolverSolution) {
337 return mergeFrom((com.google.ortools.sat.CpSolverSolution)other);
339 super.mergeFrom(other);
344 public Builder
mergeFrom(com.google.ortools.sat.CpSolverSolution other) {
345 if (other == com.google.ortools.sat.CpSolverSolution.getDefaultInstance())
return this;
346 if (!other.values_.isEmpty()) {
347 if (values_.isEmpty()) {
348 values_ = other.values_;
349 values_.makeImmutable();
350 bitField0_ |= 0x00000001;
352 ensureValuesIsMutable();
353 values_.addAll(other.values_);
357 this.mergeUnknownFields(other.getUnknownFields());
369 com.google.protobuf.CodedInputStream input,
370 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
371 throws java.io.IOException {
372 if (extensionRegistry ==
null) {
373 throw new java.lang.NullPointerException();
376 boolean done =
false;
378 int tag = input.readTag();
384 long v = input.readInt64();
385 ensureValuesIsMutable();
390 int length = input.readRawVarint32();
391 int limit = input.pushLimit(length);
392 ensureValuesIsMutable();
393 while (input.getBytesUntilLimit() > 0) {
394 values_.addLong(input.readInt64());
396 input.popLimit(limit);
400 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
407 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
408 throw e.unwrapIOException();
414 private int bitField0_;
416 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
417 private void ensureValuesIsMutable() {
418 if (!values_.isModifiable()) {
419 values_ = makeMutableCopy(values_);
421 bitField0_ |= 0x00000001;
427 public java.util.List<java.lang.Long>
429 values_.makeImmutable();
437 return values_.size();
445 return values_.getLong(index);
454 int index,
long value) {
456 ensureValuesIsMutable();
457 values_.setLong(index, value);
458 bitField0_ |= 0x00000001;
469 ensureValuesIsMutable();
470 values_.addLong(value);
471 bitField0_ |= 0x00000001;
481 java.lang.Iterable<? extends java.lang.Long> values) {
482 ensureValuesIsMutable();
483 com.google.protobuf.AbstractMessageLite.Builder.addAll(
485 bitField0_ |= 0x00000001;
494 values_ = emptyLongList();
495 bitField0_ = (bitField0_ & ~0x00000001);
506 DEFAULT_INSTANCE =
new com.google.ortools.sat.CpSolverSolution();
510 return DEFAULT_INSTANCE;
517 com.google.protobuf.CodedInputStream input,
518 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
519 throws com.google.protobuf.InvalidProtocolBufferException {
522 builder.mergeFrom(input, extensionRegistry);
523 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
524 throw e.setUnfinishedMessage(builder.buildPartial());
525 }
catch (com.google.protobuf.UninitializedMessageException e) {
526 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
527 }
catch (java.io.IOException e) {
528 throw new com.google.protobuf.InvalidProtocolBufferException(e)
529 .setUnfinishedMessage(builder.buildPartial());
531 return builder.buildPartial();
535 public static com.google.protobuf.Parser<CpSolverSolution>
parser() {
546 return DEFAULT_INSTANCE;