6package com.google.ortools.sat;
16@com.google.protobuf.Generated
17public final class CpSolverSolution
extends
18 com.google.protobuf.GeneratedMessage implements
21private static final long serialVersionUID = 0L;
23 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
24 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 CpSolverSolution.class.getName());
32 private CpSolverSolution(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35 private CpSolverSolution() {
36 values_ = emptyLongList();
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
53 @SuppressWarnings(
"serial")
54 private com.google.protobuf.Internal.LongList values_ =
61 public java.
util.List<java.lang.Long>
70 return values_.size();
78 return values_.getLong(index);
80 private int valuesMemoizedSerializedSize = -1;
82 private byte memoizedIsInitialized = -1;
89 memoizedIsInitialized = 1;
94 public void writeTo(com.google.protobuf.CodedOutputStream output)
95 throws java.io.IOException {
98 output.writeUInt32NoTag(10);
99 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
101 for (
int i = 0; i < values_.size(); i++) {
102 output.writeInt64NoTag(values_.getLong(i));
104 getUnknownFields().writeTo(output);
109 int size = memoizedSize;
110 if (size != -1)
return size;
115 for (
int i = 0; i < values_.size(); i++) {
116 dataSize += com.google.protobuf.CodedOutputStream
117 .computeInt64SizeNoTag(values_.getLong(i));
122 size += com.google.protobuf.CodedOutputStream
123 .computeInt32SizeNoTag(dataSize);
125 valuesMemoizedSerializedSize = dataSize;
127 size += getUnknownFields().getSerializedSize();
133 public boolean equals(
final java.lang.Object obj) {
137 if (!(obj instanceof com.google.ortools.sat.CpSolverSolution)) {
138 return super.equals(obj);
144 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
150 if (memoizedHashCode != 0) {
151 return memoizedHashCode;
159 hash = (29 * hash) + getUnknownFields().hashCode();
160 memoizedHashCode = hash;
165 java.nio.ByteBuffer data)
166 throws com.google.protobuf.InvalidProtocolBufferException {
167 return PARSER.parseFrom(data);
170 java.nio.ByteBuffer data,
171 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
172 throws com.google.protobuf.InvalidProtocolBufferException {
173 return PARSER.parseFrom(data, extensionRegistry);
176 com.google.protobuf.ByteString data)
177 throws com.google.protobuf.InvalidProtocolBufferException {
178 return PARSER.parseFrom(data);
181 com.google.protobuf.ByteString data,
182 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
183 throws com.google.protobuf.InvalidProtocolBufferException {
184 return PARSER.parseFrom(data, extensionRegistry);
187 throws com.google.protobuf.InvalidProtocolBufferException {
188 return PARSER.parseFrom(data);
192 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
193 throws com.google.protobuf.InvalidProtocolBufferException {
194 return PARSER.parseFrom(data, extensionRegistry);
197 throws java.io.IOException {
198 return com.google.protobuf.GeneratedMessage
199 .parseWithIOException(PARSER, input);
202 java.io.InputStream input,
203 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
204 throws java.io.IOException {
205 return com.google.protobuf.GeneratedMessage
206 .parseWithIOException(PARSER, input, extensionRegistry);
210 throws java.io.IOException {
211 return com.google.protobuf.GeneratedMessage
212 .parseDelimitedWithIOException(PARSER, input);
216 java.io.InputStream input,
217 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
218 throws java.io.IOException {
219 return com.google.protobuf.GeneratedMessage
220 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
223 com.google.protobuf.CodedInputStream input)
224 throws java.io.IOException {
225 return com.google.protobuf.GeneratedMessage
226 .parseWithIOException(PARSER, input);
229 com.google.protobuf.CodedInputStream input,
230 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
231 throws java.io.IOException {
232 return com.google.protobuf.GeneratedMessage
233 .parseWithIOException(PARSER, input, extensionRegistry);
239 return DEFAULT_INSTANCE.toBuilder();
242 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
246 return this == DEFAULT_INSTANCE
252 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
264 public static final class Builder
extends
265 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
268 public static final com.google.protobuf.Descriptors.Descriptor
270 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
274 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
276 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
277 .ensureFieldAccessorsInitialized(
278 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
287 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
295 values_ = emptyLongList();
300 public com.google.protobuf.Descriptors.Descriptor
302 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
307 return com.google.ortools.sat.CpSolverSolution.getDefaultInstance();
314 throw newUninitializedMessageException(result);
322 if (bitField0_ != 0) { buildPartial0(result); }
327 private void buildPartial0(com.google.ortools.sat.CpSolverSolution result) {
328 int from_bitField0_ = bitField0_;
329 if (((from_bitField0_ & 0x00000001) != 0)) {
330 values_.makeImmutable();
331 result.values_ = values_;
336 public Builder
mergeFrom(com.google.protobuf.Message other) {
337 if (other instanceof com.google.ortools.sat.CpSolverSolution) {
338 return mergeFrom((com.google.ortools.sat.CpSolverSolution)other);
340 super.mergeFrom(other);
345 public Builder
mergeFrom(com.google.ortools.sat.CpSolverSolution other) {
346 if (other == com.google.ortools.sat.CpSolverSolution.getDefaultInstance())
return this;
347 if (!other.values_.isEmpty()) {
348 if (values_.isEmpty()) {
349 values_ = other.values_;
350 values_.makeImmutable();
351 bitField0_ |= 0x00000001;
353 ensureValuesIsMutable();
354 values_.addAll(other.values_);
358 this.mergeUnknownFields(other.getUnknownFields());
370 com.google.protobuf.CodedInputStream input,
371 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
372 throws java.io.IOException {
373 if (extensionRegistry ==
null) {
374 throw new java.lang.NullPointerException();
377 boolean done =
false;
379 int tag = input.readTag();
385 long v = input.readInt64();
386 ensureValuesIsMutable();
391 int length = input.readRawVarint32();
392 int limit = input.pushLimit(length);
393 ensureValuesIsMutable();
394 while (input.getBytesUntilLimit() > 0) {
395 values_.addLong(input.readInt64());
397 input.popLimit(limit);
401 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
408 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
409 throw e.unwrapIOException();
415 private int bitField0_;
417 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
418 private void ensureValuesIsMutable() {
419 if (!values_.isModifiable()) {
420 values_ = makeMutableCopy(values_);
422 bitField0_ |= 0x00000001;
428 public java.util.List<java.lang.Long>
430 values_.makeImmutable();
438 return values_.size();
446 return values_.getLong(index);
455 int index,
long value) {
457 ensureValuesIsMutable();
458 values_.setLong(index, value);
459 bitField0_ |= 0x00000001;
470 ensureValuesIsMutable();
471 values_.addLong(value);
472 bitField0_ |= 0x00000001;
482 java.lang.Iterable<? extends java.lang.Long> values) {
483 ensureValuesIsMutable();
484 com.google.protobuf.AbstractMessageLite.Builder.addAll(
486 bitField0_ |= 0x00000001;
495 values_ = emptyLongList();
496 bitField0_ = (bitField0_ & ~0x00000001);
507 DEFAULT_INSTANCE =
new com.google.ortools.sat.CpSolverSolution();
511 return DEFAULT_INSTANCE;
518 com.google.protobuf.CodedInputStream input,
519 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
520 throws com.google.protobuf.InvalidProtocolBufferException {
523 builder.mergeFrom(input, extensionRegistry);
524 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
525 throw e.setUnfinishedMessage(builder.buildPartial());
526 }
catch (com.google.protobuf.UninitializedMessageException e) {
527 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
528 }
catch (java.io.IOException e) {
529 throw new com.google.protobuf.InvalidProtocolBufferException(e)
530 .setUnfinishedMessage(builder.buildPartial());
532 return builder.buildPartial();
536 public static com.google.protobuf.Parser<CpSolverSolution>
parser() {
547 return DEFAULT_INSTANCE;