6package com.google.ortools.sat;
15@com.google.protobuf.Generated
16public final class ListOfVariablesProto
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 ListOfVariablesProto.class.getName());
31 private ListOfVariablesProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private ListOfVariablesProto() {
35 vars_ = emptyIntList();
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.sat.ListOfVariablesProto.class, com.google.ortools.sat.ListOfVariablesProto.Builder.class);
52 @SuppressWarnings(
"serial")
53 private com.google.protobuf.Internal.IntList vars_ =
60 public java.
util.List<java.lang.Integer>
77 return vars_.getInt(index);
79 private int varsMemoizedSerializedSize = -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(varsMemoizedSerializedSize);
100 for (
int i = 0; i < vars_.size(); i++) {
101 output.writeInt32NoTag(vars_.getInt(i));
103 getUnknownFields().writeTo(output);
108 int size = memoizedSize;
109 if (size != -1)
return size;
114 for (
int i = 0; i < vars_.size(); i++) {
115 dataSize += com.google.protobuf.CodedOutputStream
116 .computeInt32SizeNoTag(vars_.getInt(i));
121 size += com.google.protobuf.CodedOutputStream
122 .computeInt32SizeNoTag(dataSize);
124 varsMemoizedSerializedSize = dataSize;
126 size += getUnknownFields().getSerializedSize();
132 public boolean equals(
final java.lang.Object obj) {
136 if (!(obj instanceof com.google.ortools.sat.ListOfVariablesProto)) {
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) {
262 public static final class Builder
extends
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_ListOfVariablesProto_descriptor;
272 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
274 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_fieldAccessorTable
275 .ensureFieldAccessorsInitialized(
276 com.google.ortools.sat.ListOfVariablesProto.class, com.google.ortools.sat.ListOfVariablesProto.Builder.class);
285 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
293 vars_ = emptyIntList();
298 public com.google.protobuf.Descriptors.Descriptor
300 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
305 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
312 throw newUninitializedMessageException(result);
320 if (bitField0_ != 0) { buildPartial0(result); }
325 private void buildPartial0(com.google.ortools.sat.ListOfVariablesProto result) {
326 int from_bitField0_ = bitField0_;
327 if (((from_bitField0_ & 0x00000001) != 0)) {
328 vars_.makeImmutable();
329 result.vars_ = vars_;
334 public Builder
mergeFrom(com.google.protobuf.Message other) {
335 if (other instanceof com.google.ortools.sat.ListOfVariablesProto) {
336 return mergeFrom((com.google.ortools.sat.ListOfVariablesProto)other);
338 super.mergeFrom(other);
343 public Builder
mergeFrom(com.google.ortools.sat.ListOfVariablesProto other) {
344 if (other == com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance())
return this;
345 if (!other.vars_.isEmpty()) {
346 if (vars_.isEmpty()) {
348 vars_.makeImmutable();
349 bitField0_ |= 0x00000001;
351 ensureVarsIsMutable();
352 vars_.addAll(other.vars_);
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 int v = input.readInt32();
384 ensureVarsIsMutable();
389 int length = input.readRawVarint32();
390 int limit = input.pushLimit(length);
391 ensureVarsIsMutable();
392 while (input.getBytesUntilLimit() > 0) {
393 vars_.addInt(input.readInt32());
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.IntList vars_ = emptyIntList();
416 private void ensureVarsIsMutable() {
417 if (!vars_.isModifiable()) {
418 vars_ = makeMutableCopy(vars_);
420 bitField0_ |= 0x00000001;
426 public java.util.List<java.lang.Integer>
428 vars_.makeImmutable();
444 return vars_.getInt(index);
453 int index,
int value) {
455 ensureVarsIsMutable();
456 vars_.setInt(index, value);
457 bitField0_ |= 0x00000001;
468 ensureVarsIsMutable();
470 bitField0_ |= 0x00000001;
480 java.lang.Iterable<? extends java.lang.Integer> values) {
481 ensureVarsIsMutable();
482 com.google.protobuf.AbstractMessageLite.Builder.addAll(
484 bitField0_ |= 0x00000001;
493 vars_ = emptyIntList();
494 bitField0_ = (bitField0_ & ~0x00000001);
505 DEFAULT_INSTANCE =
new com.google.ortools.sat.ListOfVariablesProto();
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();
534 public static com.google.protobuf.Parser<ListOfVariablesProto>
parser() {
545 return DEFAULT_INSTANCE;