5package com.google.ortools.sat;
15 com.google.protobuf.GeneratedMessageV3 implements
18private static final long serialVersionUID = 0L;
24 vars_ = emptyIntList();
28 @SuppressWarnings({
"unused"})
30 UnusedPrivateParameter unused) {
34 public static final com.google.protobuf.Descriptors.Descriptor
36 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
40 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
42 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_fieldAccessorTable
43 .ensureFieldAccessorsInitialized(
44 com.google.ortools.sat.ListOfVariablesProto.class, com.google.ortools.sat.ListOfVariablesProto.Builder.class);
48 @SuppressWarnings(
"serial")
49 private com.google.protobuf.Internal.IntList vars_ =
56 public java.util.List<java.lang.Integer>
73 return vars_.getInt(index);
75 private int varsMemoizedSerializedSize = -1;
77 private byte memoizedIsInitialized = -1;
84 memoizedIsInitialized = 1;
89 public void writeTo(com.google.protobuf.CodedOutputStream output)
90 throws java.io.IOException {
93 output.writeUInt32NoTag(10);
94 output.writeUInt32NoTag(varsMemoizedSerializedSize);
96 for (
int i = 0; i < vars_.size(); i++) {
97 output.writeInt32NoTag(vars_.getInt(i));
99 getUnknownFields().writeTo(output);
104 int size = memoizedSize;
105 if (size != -1)
return size;
110 for (
int i = 0; i < vars_.size(); i++) {
111 dataSize += com.google.protobuf.CodedOutputStream
112 .computeInt32SizeNoTag(vars_.getInt(i));
117 size += com.google.protobuf.CodedOutputStream
118 .computeInt32SizeNoTag(dataSize);
120 varsMemoizedSerializedSize = dataSize;
122 size += getUnknownFields().getSerializedSize();
128 public boolean equals(
final java.lang.Object obj) {
132 if (!(obj instanceof com.google.ortools.sat.ListOfVariablesProto)) {
133 return super.equals(obj);
139 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
145 if (memoizedHashCode != 0) {
146 return memoizedHashCode;
154 hash = (29 * hash) + getUnknownFields().hashCode();
155 memoizedHashCode = hash;
160 java.nio.ByteBuffer data)
161 throws com.google.protobuf.InvalidProtocolBufferException {
162 return PARSER.parseFrom(data);
165 java.nio.ByteBuffer data,
166 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
167 throws com.google.protobuf.InvalidProtocolBufferException {
168 return PARSER.parseFrom(data, extensionRegistry);
171 com.google.protobuf.ByteString data)
172 throws com.google.protobuf.InvalidProtocolBufferException {
173 return PARSER.parseFrom(data);
176 com.google.protobuf.ByteString data,
177 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
178 throws com.google.protobuf.InvalidProtocolBufferException {
179 return PARSER.parseFrom(data, extensionRegistry);
182 throws com.google.protobuf.InvalidProtocolBufferException {
183 return PARSER.parseFrom(data);
187 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
188 throws com.google.protobuf.InvalidProtocolBufferException {
189 return PARSER.parseFrom(data, extensionRegistry);
192 throws java.io.IOException {
193 return com.google.protobuf.GeneratedMessageV3
194 .parseWithIOException(PARSER, input);
197 java.io.InputStream input,
198 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
199 throws java.io.IOException {
200 return com.google.protobuf.GeneratedMessageV3
201 .parseWithIOException(PARSER, input, extensionRegistry);
205 throws java.io.IOException {
206 return com.google.protobuf.GeneratedMessageV3
207 .parseDelimitedWithIOException(PARSER, input);
211 java.io.InputStream input,
212 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
213 throws java.io.IOException {
214 return com.google.protobuf.GeneratedMessageV3
215 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
218 com.google.protobuf.CodedInputStream input)
219 throws java.io.IOException {
220 return com.google.protobuf.GeneratedMessageV3
221 .parseWithIOException(PARSER, input);
224 com.google.protobuf.CodedInputStream input,
225 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
226 throws java.io.IOException {
227 return com.google.protobuf.GeneratedMessageV3
228 .parseWithIOException(PARSER, input, extensionRegistry);
241 return this == DEFAULT_INSTANCE
247 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
259 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
262 public static final com.google.protobuf.Descriptors.Descriptor
264 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
268 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
270 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_fieldAccessorTable
271 .ensureFieldAccessorsInitialized(
272 com.google.ortools.sat.ListOfVariablesProto.class, com.google.ortools.sat.ListOfVariablesProto.Builder.class);
281 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
289 vars_ = emptyIntList();
294 public com.google.protobuf.Descriptors.Descriptor
296 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
301 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
308 throw newUninitializedMessageException(result);
316 if (bitField0_ != 0) { buildPartial0(result); }
321 private void buildPartial0(com.google.ortools.sat.ListOfVariablesProto result) {
322 int from_bitField0_ = bitField0_;
323 if (((from_bitField0_ & 0x00000001) != 0)) {
324 vars_.makeImmutable();
325 result.vars_ = vars_;
331 return super.
clone();
335 com.google.protobuf.Descriptors.FieldDescriptor field,
336 java.lang.Object value) {
337 return super.
setField(field, value);
341 com.google.protobuf.Descriptors.FieldDescriptor field) {
346 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
351 com.google.protobuf.Descriptors.FieldDescriptor field,
352 int index, java.lang.Object value) {
357 com.google.protobuf.Descriptors.FieldDescriptor field,
358 java.lang.Object value) {
363 if (other instanceof com.google.ortools.sat.ListOfVariablesProto) {
364 return mergeFrom((com.google.ortools.sat.ListOfVariablesProto)other);
366 super.mergeFrom(other);
372 if (other == com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance())
return this;
373 if (!other.vars_.isEmpty()) {
374 if (vars_.isEmpty()) {
376 vars_.makeImmutable();
377 bitField0_ |= 0x00000001;
379 ensureVarsIsMutable();
380 vars_.addAll(other.vars_);
396 com.google.protobuf.CodedInputStream input,
397 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
398 throws java.io.IOException {
399 if (extensionRegistry ==
null) {
400 throw new java.lang.NullPointerException();
403 boolean done =
false;
405 int tag = input.readTag();
411 int v = input.readInt32();
412 ensureVarsIsMutable();
417 int length = input.readRawVarint32();
418 int limit = input.pushLimit(length);
419 ensureVarsIsMutable();
420 while (input.getBytesUntilLimit() > 0) {
421 vars_.addInt(input.readInt32());
423 input.popLimit(limit);
427 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
434 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
435 throw e.unwrapIOException();
441 private int bitField0_;
443 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
444 private void ensureVarsIsMutable() {
445 if (!vars_.isModifiable()) {
446 vars_ = makeMutableCopy(vars_);
448 bitField0_ |= 0x00000001;
454 public java.util.List<java.lang.Integer>
456 vars_.makeImmutable();
472 return vars_.getInt(index);
481 int index,
int value) {
483 ensureVarsIsMutable();
484 vars_.setInt(index, value);
485 bitField0_ |= 0x00000001;
496 ensureVarsIsMutable();
498 bitField0_ |= 0x00000001;
508 java.lang.Iterable<? extends java.lang.Integer> values) {
509 ensureVarsIsMutable();
510 com.google.protobuf.AbstractMessageLite.Builder.addAll(
512 bitField0_ |= 0x00000001;
521 vars_ = emptyIntList();
522 bitField0_ = (bitField0_ & ~0x00000001);
528 final com.google.protobuf.UnknownFieldSet unknownFields) {
534 final com.google.protobuf.UnknownFieldSet unknownFields) {
545 DEFAULT_INSTANCE =
new com.google.ortools.sat.ListOfVariablesProto();
549 return DEFAULT_INSTANCE;
556 com.google.protobuf.CodedInputStream input,
557 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
558 throws com.google.protobuf.InvalidProtocolBufferException {
561 builder.mergeFrom(input, extensionRegistry);
562 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
563 throw e.setUnfinishedMessage(builder.buildPartial());
564 }
catch (com.google.protobuf.UninitializedMessageException e) {
565 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
566 }
catch (java.io.IOException e) {
567 throw new com.google.protobuf.InvalidProtocolBufferException(e)
568 .setUnfinishedMessage(builder.buildPartial());
570 return builder.buildPartial();
585 return DEFAULT_INSTANCE;