5package com.google.ortools.linearsolver;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
25 varIndex_ = emptyIntList();
29 @SuppressWarnings({
"unused"})
31 UnusedPrivateParameter unused) {
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayWithConstantConstraint_descriptor;
41 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
43 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayWithConstantConstraint_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.class, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder.class);
48 private int bitField0_;
50 @SuppressWarnings(
"serial")
51 private com.google.protobuf.Internal.IntList varIndex_ =
63 public java.util.List<java.lang.Integer>
77 return varIndex_.size();
90 return varIndex_.getInt(index);
94 private double constant_ = 0D;
101 return ((bitField0_ & 0x00000001) != 0);
113 private int resultantVarIndex_ = 0;
120 return ((bitField0_ & 0x00000002) != 0);
128 return resultantVarIndex_;
131 private byte memoizedIsInitialized = -1;
138 memoizedIsInitialized = 1;
143 public void writeTo(com.google.protobuf.CodedOutputStream output)
144 throws java.io.IOException {
145 for (
int i = 0; i < varIndex_.size(); i++) {
146 output.writeInt32(1, varIndex_.getInt(i));
148 if (((bitField0_ & 0x00000001) != 0)) {
149 output.writeDouble(2, constant_);
151 if (((bitField0_ & 0x00000002) != 0)) {
152 output.writeInt32(3, resultantVarIndex_);
154 getUnknownFields().writeTo(output);
159 int size = memoizedSize;
160 if (size != -1)
return size;
165 for (
int i = 0; i < varIndex_.size(); i++) {
166 dataSize += com.google.protobuf.CodedOutputStream
167 .computeInt32SizeNoTag(varIndex_.getInt(i));
172 if (((bitField0_ & 0x00000001) != 0)) {
173 size += com.google.protobuf.CodedOutputStream
174 .computeDoubleSize(2, constant_);
176 if (((bitField0_ & 0x00000002) != 0)) {
177 size += com.google.protobuf.CodedOutputStream
178 .computeInt32Size(3, resultantVarIndex_);
180 size += getUnknownFields().getSerializedSize();
186 public boolean equals(
final java.lang.Object obj) {
190 if (!(obj instanceof com.google.ortools.linearsolver.MPArrayWithConstantConstraint)) {
191 return super.equals(obj);
199 if (java.lang.Double.doubleToLongBits(
getConstant())
200 != java.lang.Double.doubleToLongBits(
208 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
214 if (memoizedHashCode != 0) {
215 return memoizedHashCode;
225 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
232 hash = (29 * hash) + getUnknownFields().hashCode();
233 memoizedHashCode = hash;
238 java.nio.ByteBuffer data)
239 throws com.google.protobuf.InvalidProtocolBufferException {
243 java.nio.ByteBuffer data,
244 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
245 throws com.google.protobuf.InvalidProtocolBufferException {
249 com.google.protobuf.ByteString data)
250 throws com.google.protobuf.InvalidProtocolBufferException {
254 com.google.protobuf.ByteString data,
255 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
256 throws com.google.protobuf.InvalidProtocolBufferException {
260 throws com.google.protobuf.InvalidProtocolBufferException {
265 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
266 throws com.google.protobuf.InvalidProtocolBufferException {
270 throws java.io.IOException {
271 return com.google.protobuf.GeneratedMessageV3
272 .parseWithIOException(
PARSER, input);
275 java.io.InputStream input,
276 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
277 throws java.io.IOException {
278 return com.google.protobuf.GeneratedMessageV3
279 .parseWithIOException(
PARSER, input, extensionRegistry);
283 throws java.io.IOException {
284 return com.google.protobuf.GeneratedMessageV3
285 .parseDelimitedWithIOException(
PARSER, input);
289 java.io.InputStream input,
290 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
291 throws java.io.IOException {
292 return com.google.protobuf.GeneratedMessageV3
293 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
296 com.google.protobuf.CodedInputStream input)
297 throws java.io.IOException {
298 return com.google.protobuf.GeneratedMessageV3
299 .parseWithIOException(
PARSER, input);
302 com.google.protobuf.CodedInputStream input,
303 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304 throws java.io.IOException {
305 return com.google.protobuf.GeneratedMessageV3
306 .parseWithIOException(
PARSER, input, extensionRegistry);
314 public static Builder newBuilder(com.google.ortools.linearsolver.MPArrayWithConstantConstraint prototype) {
319 return this == DEFAULT_INSTANCE
325 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
338 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
341 public static final com.google.protobuf.Descriptors.Descriptor
343 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayWithConstantConstraint_descriptor;
347 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
349 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayWithConstantConstraint_fieldAccessorTable
350 .ensureFieldAccessorsInitialized(
351 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.class, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder.class);
360 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
368 varIndex_ = emptyIntList();
370 resultantVarIndex_ = 0;
375 public com.google.protobuf.Descriptors.Descriptor
377 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPArrayWithConstantConstraint_descriptor;
382 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
389 throw newUninitializedMessageException(result);
397 if (bitField0_ != 0) { buildPartial0(result); }
402 private void buildPartial0(com.google.ortools.linearsolver.MPArrayWithConstantConstraint result) {
403 int from_bitField0_ = bitField0_;
404 if (((from_bitField0_ & 0x00000001) != 0)) {
405 varIndex_.makeImmutable();
406 result.varIndex_ = varIndex_;
408 int to_bitField0_ = 0;
409 if (((from_bitField0_ & 0x00000002) != 0)) {
410 result.constant_ = constant_;
411 to_bitField0_ |= 0x00000001;
413 if (((from_bitField0_ & 0x00000004) != 0)) {
414 result.resultantVarIndex_ = resultantVarIndex_;
415 to_bitField0_ |= 0x00000002;
417 result.bitField0_ |= to_bitField0_;
422 return super.
clone();
426 com.google.protobuf.Descriptors.FieldDescriptor field,
427 java.lang.Object value) {
428 return super.
setField(field, value);
432 com.google.protobuf.Descriptors.FieldDescriptor field) {
437 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
442 com.google.protobuf.Descriptors.FieldDescriptor field,
443 int index, java.lang.Object value) {
448 com.google.protobuf.Descriptors.FieldDescriptor field,
449 java.lang.Object value) {
454 if (other instanceof com.google.ortools.linearsolver.MPArrayWithConstantConstraint) {
455 return mergeFrom((com.google.ortools.linearsolver.MPArrayWithConstantConstraint)other);
457 super.mergeFrom(other);
462 public Builder mergeFrom(com.google.ortools.linearsolver.MPArrayWithConstantConstraint other) {
463 if (other == com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance())
return this;
464 if (!other.varIndex_.isEmpty()) {
465 if (varIndex_.isEmpty()) {
466 varIndex_ = other.varIndex_;
467 varIndex_.makeImmutable();
468 bitField0_ |= 0x00000001;
470 ensureVarIndexIsMutable();
471 varIndex_.addAll(other.varIndex_);
475 if (other.hasConstant()) {
478 if (other.hasResultantVarIndex()) {
493 com.google.protobuf.CodedInputStream input,
494 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
495 throws java.io.IOException {
496 if (extensionRegistry ==
null) {
497 throw new java.lang.NullPointerException();
500 boolean done =
false;
502 int tag = input.readTag();
508 int v = input.readInt32();
509 ensureVarIndexIsMutable();
514 int length = input.readRawVarint32();
515 int limit = input.pushLimit(length);
516 ensureVarIndexIsMutable();
517 while (input.getBytesUntilLimit() > 0) {
518 varIndex_.addInt(input.readInt32());
520 input.popLimit(limit);
524 constant_ = input.readDouble();
525 bitField0_ |= 0x00000002;
529 resultantVarIndex_ = input.readInt32();
530 bitField0_ |= 0x00000004;
534 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
541 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
542 throw e.unwrapIOException();
548 private int bitField0_;
550 private com.google.protobuf.Internal.IntList varIndex_ = emptyIntList();
551 private void ensureVarIndexIsMutable() {
552 if (!varIndex_.isModifiable()) {
553 varIndex_ = makeMutableCopy(varIndex_);
555 bitField0_ |= 0x00000001;
566 public java.util.List<java.lang.Integer>
568 varIndex_.makeImmutable();
581 return varIndex_.size();
594 return varIndex_.getInt(index);
608 int index,
int value) {
610 ensureVarIndexIsMutable();
611 varIndex_.setInt(index, value);
612 bitField0_ |= 0x00000001;
628 ensureVarIndexIsMutable();
629 varIndex_.addInt(value);
630 bitField0_ |= 0x00000001;
645 java.lang.Iterable<? extends java.lang.Integer> values) {
646 ensureVarIndexIsMutable();
647 com.google.protobuf.AbstractMessageLite.Builder.addAll(
649 bitField0_ |= 0x00000001;
663 varIndex_ = emptyIntList();
664 bitField0_ = (bitField0_ & ~0x00000001);
669 private double constant_ ;
676 return ((bitField0_ & 0x00000002) != 0);
694 bitField0_ |= 0x00000002;
703 bitField0_ = (bitField0_ & ~0x00000002);
709 private int resultantVarIndex_ ;
716 return ((bitField0_ & 0x00000004) != 0);
724 return resultantVarIndex_;
733 resultantVarIndex_ = value;
734 bitField0_ |= 0x00000004;
743 bitField0_ = (bitField0_ & ~0x00000004);
744 resultantVarIndex_ = 0;
750 final com.google.protobuf.UnknownFieldSet unknownFields) {
756 final com.google.protobuf.UnknownFieldSet unknownFields) {
767 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPArrayWithConstantConstraint();
771 return DEFAULT_INSTANCE;
778 com.google.protobuf.CodedInputStream input,
779 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
780 throws com.google.protobuf.InvalidProtocolBufferException {
783 builder.
mergeFrom(input, extensionRegistry);
784 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
786 }
catch (com.google.protobuf.UninitializedMessageException e) {
787 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
788 }
catch (java.io.IOException e) {
789 throw new com.google.protobuf.InvalidProtocolBufferException(e)
807 return DEFAULT_INSTANCE;