5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
30 private CpSolverSolution(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 values_ = emptyLongList();
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
51 @SuppressWarnings(
"serial")
52 private com.google.protobuf.Internal.LongList values_ =
59 public java.util.List<java.lang.Long>
68 return values_.size();
76 return values_.getLong(index);
78 private int valuesMemoizedSerializedSize = -1;
80 private byte memoizedIsInitialized = -1;
87 memoizedIsInitialized = 1;
92 public void writeTo(com.google.protobuf.CodedOutputStream output)
93 throws java.io.IOException {
96 output.writeUInt32NoTag(10);
97 output.writeUInt32NoTag(valuesMemoizedSerializedSize);
99 for (
int i = 0; i < values_.size(); i++) {
100 output.writeInt64NoTag(values_.getLong(i));
102 getUnknownFields().writeTo(output);
107 int size = memoizedSize;
108 if (size != -1)
return size;
113 for (
int i = 0; i < values_.size(); i++) {
114 dataSize += com.google.protobuf.CodedOutputStream
115 .computeInt64SizeNoTag(values_.getLong(i));
120 size += com.google.protobuf.CodedOutputStream
121 .computeInt32SizeNoTag(dataSize);
123 valuesMemoizedSerializedSize = dataSize;
125 size += getUnknownFields().getSerializedSize();
131 public boolean equals(
final java.lang.Object obj) {
135 if (!(obj instanceof com.google.ortools.sat.CpSolverSolution)) {
136 return super.equals(obj);
142 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
148 if (memoizedHashCode != 0) {
149 return memoizedHashCode;
157 hash = (29 * hash) + getUnknownFields().hashCode();
158 memoizedHashCode = hash;
163 java.nio.ByteBuffer data)
164 throws com.google.protobuf.InvalidProtocolBufferException {
165 return PARSER.parseFrom(data);
168 java.nio.ByteBuffer data,
169 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
170 throws com.google.protobuf.InvalidProtocolBufferException {
171 return PARSER.parseFrom(data, extensionRegistry);
174 com.google.protobuf.ByteString data)
175 throws com.google.protobuf.InvalidProtocolBufferException {
176 return PARSER.parseFrom(data);
179 com.google.protobuf.ByteString data,
180 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
181 throws com.google.protobuf.InvalidProtocolBufferException {
182 return PARSER.parseFrom(data, extensionRegistry);
185 throws com.google.protobuf.InvalidProtocolBufferException {
186 return PARSER.parseFrom(data);
190 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
191 throws com.google.protobuf.InvalidProtocolBufferException {
192 return PARSER.parseFrom(data, extensionRegistry);
195 throws java.io.IOException {
196 return com.google.protobuf.GeneratedMessage
197 .parseWithIOException(PARSER, input);
200 java.io.InputStream input,
201 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
202 throws java.io.IOException {
203 return com.google.protobuf.GeneratedMessage
204 .parseWithIOException(PARSER, input, extensionRegistry);
208 throws java.io.IOException {
209 return com.google.protobuf.GeneratedMessage
210 .parseDelimitedWithIOException(PARSER, input);
214 java.io.InputStream input,
215 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
216 throws java.io.IOException {
217 return com.google.protobuf.GeneratedMessage
218 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
221 com.google.protobuf.CodedInputStream input)
222 throws java.io.IOException {
223 return com.google.protobuf.GeneratedMessage
224 .parseWithIOException(PARSER, input);
227 com.google.protobuf.CodedInputStream input,
228 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
229 throws java.io.IOException {
230 return com.google.protobuf.GeneratedMessage
231 .parseWithIOException(PARSER, input, extensionRegistry);
244 return this == DEFAULT_INSTANCE
250 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
263 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
266 public static final com.google.protobuf.Descriptors.Descriptor
268 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
272 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
274 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_fieldAccessorTable
275 .ensureFieldAccessorsInitialized(
276 com.google.ortools.sat.CpSolverSolution.class, com.google.ortools.sat.CpSolverSolution.Builder.class);
285 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
293 values_ = emptyLongList();
298 public com.google.protobuf.Descriptors.Descriptor
300 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverSolution_descriptor;
305 return com.google.ortools.sat.CpSolverSolution.getDefaultInstance();
312 throw newUninitializedMessageException(result);
320 if (bitField0_ != 0) { buildPartial0(result); }
325 private void buildPartial0(com.google.ortools.sat.CpSolverSolution result) {
326 int from_bitField0_ = bitField0_;
327 if (((from_bitField0_ & 0x00000001) != 0)) {
328 values_.makeImmutable();
329 result.values_ = values_;
335 if (other instanceof com.google.ortools.sat.CpSolverSolution) {
336 return mergeFrom((com.google.ortools.sat.CpSolverSolution)other);
338 super.mergeFrom(other);
344 if (other == com.google.ortools.sat.CpSolverSolution.getDefaultInstance())
return this;
345 if (!other.values_.isEmpty()) {
346 if (values_.isEmpty()) {
347 values_ = other.values_;
348 values_.makeImmutable();
349 bitField0_ |= 0x00000001;
351 ensureValuesIsMutable();
352 values_.addAll(other.values_);
356 this.mergeUnknownFields(other.getUnknownFields());
368 com.google.protobuf.CodedInputStream input,
369 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
370 throws java.io.IOException {
371 if (extensionRegistry ==
null) {
372 throw new java.lang.NullPointerException();
375 boolean done =
false;
377 int tag = input.readTag();
383 long v = input.readInt64();
384 ensureValuesIsMutable();
389 int length = input.readRawVarint32();
390 int limit = input.pushLimit(length);
391 ensureValuesIsMutable();
392 while (input.getBytesUntilLimit() > 0) {
393 values_.addLong(input.readInt64());
395 input.popLimit(limit);
399 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
406 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
407 throw e.unwrapIOException();
413 private int bitField0_;
415 private com.google.protobuf.Internal.LongList values_ = emptyLongList();
416 private void ensureValuesIsMutable() {
417 if (!values_.isModifiable()) {
418 values_ = makeMutableCopy(values_);
420 bitField0_ |= 0x00000001;
426 public java.util.List<java.lang.Long>
428 values_.makeImmutable();
436 return values_.size();
444 return values_.getLong(index);
453 int index,
long value) {
455 ensureValuesIsMutable();
456 values_.setLong(index, value);
457 bitField0_ |= 0x00000001;
468 ensureValuesIsMutable();
469 values_.addLong(value);
470 bitField0_ |= 0x00000001;
480 java.lang.Iterable<? extends java.lang.Long> values) {
481 ensureValuesIsMutable();
482 com.google.protobuf.AbstractMessageLite.Builder.addAll(
484 bitField0_ |= 0x00000001;
493 values_ = emptyLongList();
494 bitField0_ = (bitField0_ & ~0x00000001);
505 DEFAULT_INSTANCE =
new com.google.ortools.sat.CpSolverSolution();
509 return DEFAULT_INSTANCE;
516 com.google.protobuf.CodedInputStream input,
517 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
518 throws com.google.protobuf.InvalidProtocolBufferException {
521 builder.mergeFrom(input, extensionRegistry);
522 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
523 throw e.setUnfinishedMessage(builder.buildPartial());
524 }
catch (com.google.protobuf.UninitializedMessageException e) {
525 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
526 }
catch (java.io.IOException e) {
527 throw new com.google.protobuf.InvalidProtocolBufferException(e)
528 .setUnfinishedMessage(builder.buildPartial());
530 return builder.buildPartial();
545 return DEFAULT_INSTANCE;