5package com.google.ortools.sat;
15 com.google.protobuf.GeneratedMessage implements
18private static final long serialVersionUID = 0L;
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
33 vars_ = emptyIntList();
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
42 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
44 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.sat.ListOfVariablesProto.class, com.google.ortools.sat.ListOfVariablesProto.Builder.class);
50 @SuppressWarnings(
"serial")
51 private com.google.protobuf.Internal.IntList vars_ =
58 public java.util.List<java.lang.Integer>
75 return vars_.getInt(index);
77 private int varsMemoizedSerializedSize = -1;
79 private byte memoizedIsInitialized = -1;
86 memoizedIsInitialized = 1;
91 public void writeTo(com.google.protobuf.CodedOutputStream output)
92 throws java.io.IOException {
95 output.writeUInt32NoTag(10);
96 output.writeUInt32NoTag(varsMemoizedSerializedSize);
98 for (
int i = 0; i < vars_.size(); i++) {
99 output.writeInt32NoTag(vars_.getInt(i));
101 getUnknownFields().writeTo(output);
106 int size = memoizedSize;
107 if (size != -1)
return size;
112 for (
int i = 0; i < vars_.size(); i++) {
113 dataSize += com.google.protobuf.CodedOutputStream
114 .computeInt32SizeNoTag(vars_.getInt(i));
119 size += com.google.protobuf.CodedOutputStream
120 .computeInt32SizeNoTag(dataSize);
122 varsMemoizedSerializedSize = dataSize;
124 size += getUnknownFields().getSerializedSize();
130 public boolean equals(
final java.lang.Object obj) {
134 if (!(obj instanceof com.google.ortools.sat.ListOfVariablesProto)) {
135 return super.equals(obj);
141 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
147 if (memoizedHashCode != 0) {
148 return memoizedHashCode;
156 hash = (29 * hash) + getUnknownFields().hashCode();
157 memoizedHashCode = hash;
162 java.nio.ByteBuffer data)
163 throws com.google.protobuf.InvalidProtocolBufferException {
164 return PARSER.parseFrom(data);
167 java.nio.ByteBuffer data,
168 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
169 throws com.google.protobuf.InvalidProtocolBufferException {
170 return PARSER.parseFrom(data, extensionRegistry);
173 com.google.protobuf.ByteString data)
174 throws com.google.protobuf.InvalidProtocolBufferException {
175 return PARSER.parseFrom(data);
178 com.google.protobuf.ByteString data,
179 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
180 throws com.google.protobuf.InvalidProtocolBufferException {
181 return PARSER.parseFrom(data, extensionRegistry);
184 throws com.google.protobuf.InvalidProtocolBufferException {
185 return PARSER.parseFrom(data);
189 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
190 throws com.google.protobuf.InvalidProtocolBufferException {
191 return PARSER.parseFrom(data, extensionRegistry);
194 throws java.io.IOException {
195 return com.google.protobuf.GeneratedMessage
196 .parseWithIOException(PARSER, input);
199 java.io.InputStream input,
200 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
201 throws java.io.IOException {
202 return com.google.protobuf.GeneratedMessage
203 .parseWithIOException(PARSER, input, extensionRegistry);
207 throws java.io.IOException {
208 return com.google.protobuf.GeneratedMessage
209 .parseDelimitedWithIOException(PARSER, input);
213 java.io.InputStream input,
214 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
215 throws java.io.IOException {
216 return com.google.protobuf.GeneratedMessage
217 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
220 com.google.protobuf.CodedInputStream input)
221 throws java.io.IOException {
222 return com.google.protobuf.GeneratedMessage
223 .parseWithIOException(PARSER, input);
226 com.google.protobuf.CodedInputStream input,
227 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
228 throws java.io.IOException {
229 return com.google.protobuf.GeneratedMessage
230 .parseWithIOException(PARSER, input, extensionRegistry);
243 return this == DEFAULT_INSTANCE
249 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
261 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
264 public static final com.google.protobuf.Descriptors.Descriptor
266 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
270 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
272 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_fieldAccessorTable
273 .ensureFieldAccessorsInitialized(
274 com.google.ortools.sat.ListOfVariablesProto.class, com.google.ortools.sat.ListOfVariablesProto.Builder.class);
283 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
291 vars_ = emptyIntList();
296 public com.google.protobuf.Descriptors.Descriptor
298 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ListOfVariablesProto_descriptor;
303 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
310 throw newUninitializedMessageException(result);
318 if (bitField0_ != 0) { buildPartial0(result); }
323 private void buildPartial0(com.google.ortools.sat.ListOfVariablesProto result) {
324 int from_bitField0_ = bitField0_;
325 if (((from_bitField0_ & 0x00000001) != 0)) {
326 vars_.makeImmutable();
327 result.vars_ = vars_;
333 if (other instanceof com.google.ortools.sat.ListOfVariablesProto) {
334 return mergeFrom((com.google.ortools.sat.ListOfVariablesProto)other);
336 super.mergeFrom(other);
342 if (other == com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance())
return this;
343 if (!other.vars_.isEmpty()) {
344 if (vars_.isEmpty()) {
346 vars_.makeImmutable();
347 bitField0_ |= 0x00000001;
349 ensureVarsIsMutable();
350 vars_.addAll(other.vars_);
354 this.mergeUnknownFields(other.getUnknownFields());
366 com.google.protobuf.CodedInputStream input,
367 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
368 throws java.io.IOException {
369 if (extensionRegistry ==
null) {
370 throw new java.lang.NullPointerException();
373 boolean done =
false;
375 int tag = input.readTag();
381 int v = input.readInt32();
382 ensureVarsIsMutable();
387 int length = input.readRawVarint32();
388 int limit = input.pushLimit(length);
389 ensureVarsIsMutable();
390 while (input.getBytesUntilLimit() > 0) {
391 vars_.addInt(input.readInt32());
393 input.popLimit(limit);
397 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
404 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
405 throw e.unwrapIOException();
411 private int bitField0_;
413 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
414 private void ensureVarsIsMutable() {
415 if (!vars_.isModifiable()) {
416 vars_ = makeMutableCopy(vars_);
418 bitField0_ |= 0x00000001;
424 public java.util.List<java.lang.Integer>
426 vars_.makeImmutable();
442 return vars_.getInt(index);
451 int index,
int value) {
453 ensureVarsIsMutable();
454 vars_.setInt(index, value);
455 bitField0_ |= 0x00000001;
466 ensureVarsIsMutable();
468 bitField0_ |= 0x00000001;
478 java.lang.Iterable<? extends java.lang.Integer> values) {
479 ensureVarsIsMutable();
480 com.google.protobuf.AbstractMessageLite.Builder.addAll(
482 bitField0_ |= 0x00000001;
491 vars_ = emptyIntList();
492 bitField0_ = (bitField0_ & ~0x00000001);
503 DEFAULT_INSTANCE =
new com.google.ortools.sat.ListOfVariablesProto();
507 return DEFAULT_INSTANCE;
514 com.google.protobuf.CodedInputStream input,
515 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
516 throws com.google.protobuf.InvalidProtocolBufferException {
519 builder.mergeFrom(input, extensionRegistry);
520 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
521 throw e.setUnfinishedMessage(builder.buildPartial());
522 }
catch (com.google.protobuf.UninitializedMessageException e) {
523 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
524 }
catch (java.io.IOException e) {
525 throw new com.google.protobuf.InvalidProtocolBufferException(e)
526 .setUnfinishedMessage(builder.buildPartial());
528 return builder.buildPartial();
543 return DEFAULT_INSTANCE;