5package com.google.ortools.linearsolver;
15 com.google.protobuf.GeneratedMessageV3 implements
18private static final long serialVersionUID = 0L;
20 private MPArrayConstraint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
24 varIndex_ = emptyIntList();
28 @SuppressWarnings({
"unused"})
30 UnusedPrivateParameter unused) {
34 public static final com.google.protobuf.Descriptors.Descriptor
36 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayConstraint_descriptor;
40 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
42 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayConstraint_fieldAccessorTable
43 .ensureFieldAccessorsInitialized(
44 com.google.ortools.linearsolver.MPArrayConstraint.class, com.google.ortools.linearsolver.MPArrayConstraint.Builder.class);
47 private int bitField0_;
49 @SuppressWarnings(
"serial")
50 private com.google.protobuf.Internal.IntList varIndex_ =
61 public java.util.List<java.lang.Integer>
74 return varIndex_.size();
86 return varIndex_.getInt(index);
90 private int resultantVarIndex_ = 0;
97 return ((bitField0_ & 0x00000001) != 0);
105 return resultantVarIndex_;
108 private byte memoizedIsInitialized = -1;
115 memoizedIsInitialized = 1;
120 public void writeTo(com.google.protobuf.CodedOutputStream output)
121 throws java.io.IOException {
122 for (
int i = 0; i < varIndex_.size(); i++) {
123 output.writeInt32(1, varIndex_.getInt(i));
125 if (((bitField0_ & 0x00000001) != 0)) {
126 output.writeInt32(2, resultantVarIndex_);
128 getUnknownFields().writeTo(output);
133 int size = memoizedSize;
134 if (size != -1)
return size;
139 for (
int i = 0; i < varIndex_.size(); i++) {
140 dataSize += com.google.protobuf.CodedOutputStream
141 .computeInt32SizeNoTag(varIndex_.getInt(i));
146 if (((bitField0_ & 0x00000001) != 0)) {
147 size += com.google.protobuf.CodedOutputStream
148 .computeInt32Size(2, resultantVarIndex_);
150 size += getUnknownFields().getSerializedSize();
156 public boolean equals(
final java.lang.Object obj) {
160 if (!(obj instanceof com.google.ortools.linearsolver.MPArrayConstraint)) {
161 return super.equals(obj);
172 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
178 if (memoizedHashCode != 0) {
179 return memoizedHashCode;
191 hash = (29 * hash) + getUnknownFields().hashCode();
192 memoizedHashCode = hash;
197 java.nio.ByteBuffer data)
198 throws com.google.protobuf.InvalidProtocolBufferException {
202 java.nio.ByteBuffer data,
203 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
204 throws com.google.protobuf.InvalidProtocolBufferException {
208 com.google.protobuf.ByteString data)
209 throws com.google.protobuf.InvalidProtocolBufferException {
213 com.google.protobuf.ByteString data,
214 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
215 throws com.google.protobuf.InvalidProtocolBufferException {
219 throws com.google.protobuf.InvalidProtocolBufferException {
224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
225 throws com.google.protobuf.InvalidProtocolBufferException {
229 throws java.io.IOException {
230 return com.google.protobuf.GeneratedMessageV3
231 .parseWithIOException(
PARSER, input);
234 java.io.InputStream input,
235 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
236 throws java.io.IOException {
237 return com.google.protobuf.GeneratedMessageV3
238 .parseWithIOException(
PARSER, input, extensionRegistry);
242 throws java.io.IOException {
243 return com.google.protobuf.GeneratedMessageV3
244 .parseDelimitedWithIOException(
PARSER, input);
248 java.io.InputStream input,
249 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250 throws java.io.IOException {
251 return com.google.protobuf.GeneratedMessageV3
252 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
255 com.google.protobuf.CodedInputStream input)
256 throws java.io.IOException {
257 return com.google.protobuf.GeneratedMessageV3
258 .parseWithIOException(
PARSER, input);
261 com.google.protobuf.CodedInputStream input,
262 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
263 throws java.io.IOException {
264 return com.google.protobuf.GeneratedMessageV3
265 .parseWithIOException(
PARSER, input, extensionRegistry);
278 return this == DEFAULT_INSTANCE
284 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
296 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
299 public static final com.google.protobuf.Descriptors.Descriptor
301 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayConstraint_descriptor;
305 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
307 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayConstraint_fieldAccessorTable
308 .ensureFieldAccessorsInitialized(
309 com.google.ortools.linearsolver.MPArrayConstraint.class, com.google.ortools.linearsolver.MPArrayConstraint.Builder.class);
318 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
326 varIndex_ = emptyIntList();
327 resultantVarIndex_ = 0;
332 public com.google.protobuf.Descriptors.Descriptor
334 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayConstraint_descriptor;
339 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
346 throw newUninitializedMessageException(result);
354 if (bitField0_ != 0) { buildPartial0(result); }
359 private void buildPartial0(com.google.ortools.linearsolver.MPArrayConstraint result) {
360 int from_bitField0_ = bitField0_;
361 if (((from_bitField0_ & 0x00000001) != 0)) {
362 varIndex_.makeImmutable();
363 result.varIndex_ = varIndex_;
365 int to_bitField0_ = 0;
366 if (((from_bitField0_ & 0x00000002) != 0)) {
367 result.resultantVarIndex_ = resultantVarIndex_;
368 to_bitField0_ |= 0x00000001;
370 result.bitField0_ |= to_bitField0_;
375 return super.
clone();
379 com.google.protobuf.Descriptors.FieldDescriptor field,
380 java.lang.Object value) {
381 return super.
setField(field, value);
385 com.google.protobuf.Descriptors.FieldDescriptor field) {
390 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
395 com.google.protobuf.Descriptors.FieldDescriptor field,
396 int index, java.lang.Object value) {
401 com.google.protobuf.Descriptors.FieldDescriptor field,
402 java.lang.Object value) {
407 if (other instanceof com.google.ortools.linearsolver.MPArrayConstraint) {
408 return mergeFrom((com.google.ortools.linearsolver.MPArrayConstraint)other);
410 super.mergeFrom(other);
416 if (other == com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance())
return this;
417 if (!other.varIndex_.isEmpty()) {
418 if (varIndex_.isEmpty()) {
419 varIndex_ = other.varIndex_;
420 varIndex_.makeImmutable();
421 bitField0_ |= 0x00000001;
423 ensureVarIndexIsMutable();
424 varIndex_.addAll(other.varIndex_);
428 if (other.hasResultantVarIndex()) {
443 com.google.protobuf.CodedInputStream input,
444 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
445 throws java.io.IOException {
446 if (extensionRegistry ==
null) {
447 throw new java.lang.NullPointerException();
450 boolean done =
false;
452 int tag = input.readTag();
458 int v = input.readInt32();
459 ensureVarIndexIsMutable();
464 int length = input.readRawVarint32();
465 int limit = input.pushLimit(length);
466 ensureVarIndexIsMutable();
467 while (input.getBytesUntilLimit() > 0) {
468 varIndex_.addInt(input.readInt32());
470 input.popLimit(limit);
474 resultantVarIndex_ = input.readInt32();
475 bitField0_ |= 0x00000002;
479 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
486 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
487 throw e.unwrapIOException();
493 private int bitField0_;
495 private com.google.protobuf.Internal.IntList varIndex_ = emptyIntList();
496 private void ensureVarIndexIsMutable() {
497 if (!varIndex_.isModifiable()) {
498 varIndex_ = makeMutableCopy(varIndex_);
500 bitField0_ |= 0x00000001;
510 public java.util.List<java.lang.Integer>
512 varIndex_.makeImmutable();
524 return varIndex_.size();
536 return varIndex_.getInt(index);
549 int index,
int value) {
551 ensureVarIndexIsMutable();
552 varIndex_.setInt(index, value);
553 bitField0_ |= 0x00000001;
568 ensureVarIndexIsMutable();
569 varIndex_.addInt(value);
570 bitField0_ |= 0x00000001;
584 java.lang.Iterable<? extends java.lang.Integer> values) {
585 ensureVarIndexIsMutable();
586 com.google.protobuf.AbstractMessageLite.Builder.addAll(
588 bitField0_ |= 0x00000001;
601 varIndex_ = emptyIntList();
602 bitField0_ = (bitField0_ & ~0x00000001);
607 private int resultantVarIndex_ ;
614 return ((bitField0_ & 0x00000002) != 0);
622 return resultantVarIndex_;
631 resultantVarIndex_ = value;
632 bitField0_ |= 0x00000002;
641 bitField0_ = (bitField0_ & ~0x00000002);
642 resultantVarIndex_ = 0;
648 final com.google.protobuf.UnknownFieldSet unknownFields) {
654 final com.google.protobuf.UnknownFieldSet unknownFields) {
665 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPArrayConstraint();
669 return DEFAULT_INSTANCE;
672 @java.lang.Deprecated
public static final com.google.protobuf.Parser<
MPArrayConstraint>
676 com.google.protobuf.CodedInputStream input,
677 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
678 throws com.google.protobuf.InvalidProtocolBufferException {
681 builder.
mergeFrom(input, extensionRegistry);
682 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
684 }
catch (com.google.protobuf.UninitializedMessageException e) {
685 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
686 }
catch (java.io.IOException e) {
687 throw new com.google.protobuf.InvalidProtocolBufferException(e)
705 return DEFAULT_INSTANCE;