4 package com.google.ortools.linearsolver;
24 com.google.protobuf.GeneratedMessageV3 implements
27 private static final long serialVersionUID = 0L;
33 varIndex_ = emptyIntList();
34 coefficient_ = emptyDoubleList();
35 lowerBound_ = Double.NEGATIVE_INFINITY;
36 upperBound_ = Double.POSITIVE_INFINITY;
41 @SuppressWarnings({
"unused"})
43 UnusedPrivateParameter unused) {
48 public final com.
google.protobuf.UnknownFieldSet
50 return this.unknownFields;
53 com.
google.protobuf.CodedInputStream input,
54 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
55 throws com.
google.protobuf.InvalidProtocolBufferException {
57 if (extensionRegistry ==
null) {
58 throw new java.lang.NullPointerException();
60 int mutable_bitField0_ = 0;
61 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
62 com.
google.protobuf.UnknownFieldSet.newBuilder();
66 int tag = input.readTag();
72 bitField0_ |= 0x00000001;
73 lowerBound_ = input.readDouble();
77 bitField0_ |= 0x00000002;
78 upperBound_ = input.readDouble();
82 com.
google.protobuf.ByteString bs = input.readBytes();
83 bitField0_ |= 0x00000004;
88 bitField0_ |= 0x00000008;
89 isLazy_ = input.readBool();
93 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
94 varIndex_ = newIntList();
95 mutable_bitField0_ |= 0x00000001;
97 varIndex_.addInt(input.readInt32());
101 int length = input.readRawVarint32();
102 int limit = input.pushLimit(length);
103 if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
104 varIndex_ = newIntList();
105 mutable_bitField0_ |= 0x00000001;
107 while (input.getBytesUntilLimit() > 0) {
108 varIndex_.addInt(input.readInt32());
110 input.popLimit(limit);
114 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
115 coefficient_ = newDoubleList();
116 mutable_bitField0_ |= 0x00000002;
118 coefficient_.addDouble(input.readDouble());
122 int length = input.readRawVarint32();
123 int limit = input.pushLimit(length);
124 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
125 coefficient_ = newDoubleList();
126 mutable_bitField0_ |= 0x00000002;
128 while (input.getBytesUntilLimit() > 0) {
129 coefficient_.addDouble(input.readDouble());
131 input.popLimit(limit);
135 if (!parseUnknownField(
136 input, unknownFields, extensionRegistry, tag)) {
143 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
144 throw e.setUnfinishedMessage(
this);
145 }
catch (java.io.IOException e) {
146 throw new com.
google.protobuf.InvalidProtocolBufferException(
147 e).setUnfinishedMessage(
this);
149 if (((mutable_bitField0_ & 0x00000001) != 0)) {
150 varIndex_.makeImmutable();
152 if (((mutable_bitField0_ & 0x00000002) != 0)) {
153 coefficient_.makeImmutable();
155 this.unknownFields = unknownFields.build();
156 makeExtensionsImmutable();
159 public static final com.
google.protobuf.Descriptors.Descriptor
165 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
168 .ensureFieldAccessorsInitialized(
172 private int bitField0_;
174 private com.
google.protobuf.Internal.IntList varIndex_;
185 public java.util.List<java.lang.Integer>
200 return varIndex_.size();
213 return varIndex_.getInt(index);
215 private int varIndexMemoizedSerializedSize = -1;
218 private com.
google.protobuf.Internal.DoubleList coefficient_;
226 public java.util.List<java.lang.Double>
238 return coefficient_.size();
248 return coefficient_.getDouble(index);
250 private int coefficientMemoizedSerializedSize = -1;
253 private double lowerBound_;
262 return ((bitField0_ & 0x00000001) != 0);
276 private double upperBound_;
281 return ((bitField0_ & 0x00000002) != 0);
291 private volatile java.lang.Object name_;
300 return ((bitField0_ & 0x00000004) != 0);
310 java.lang.Object ref = name_;
311 if (ref instanceof java.lang.String) {
312 return (java.lang.String) ref;
316 java.lang.String s = bs.toStringUtf8();
317 if (bs.isValidUtf8()) {
332 java.lang.Object ref = name_;
333 if (ref instanceof java.lang.String) {
335 com.
google.protobuf.ByteString.copyFromUtf8(
336 (java.lang.String) ref);
340 return (
com.
google.protobuf.ByteString) ref;
345 private boolean isLazy_;
357 return ((bitField0_ & 0x00000008) != 0);
373 private byte memoizedIsInitialized = -1;
380 memoizedIsInitialized = 1;
386 throws java.io.IOException {
388 if (((bitField0_ & 0x00000001) != 0)) {
389 output.writeDouble(2, lowerBound_);
391 if (((bitField0_ & 0x00000002) != 0)) {
392 output.writeDouble(3, upperBound_);
394 if (((bitField0_ & 0x00000004) != 0)) {
395 com.
google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
397 if (((bitField0_ & 0x00000008) != 0)) {
398 output.writeBool(5, isLazy_);
401 output.writeUInt32NoTag(50);
402 output.writeUInt32NoTag(varIndexMemoizedSerializedSize);
404 for (
int i = 0; i < varIndex_.size(); i++) {
405 output.writeInt32NoTag(varIndex_.getInt(i));
408 output.writeUInt32NoTag(58);
409 output.writeUInt32NoTag(coefficientMemoizedSerializedSize);
411 for (
int i = 0; i < coefficient_.size(); i++) {
412 output.writeDoubleNoTag(coefficient_.getDouble(i));
414 unknownFields.writeTo(output);
419 int size = memoizedSize;
420 if (size != -1)
return size;
423 if (((bitField0_ & 0x00000001) != 0)) {
424 size +=
com.
google.protobuf.CodedOutputStream
425 .computeDoubleSize(2, lowerBound_);
427 if (((bitField0_ & 0x00000002) != 0)) {
428 size +=
com.
google.protobuf.CodedOutputStream
429 .computeDoubleSize(3, upperBound_);
431 if (((bitField0_ & 0x00000004) != 0)) {
432 size +=
com.
google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
434 if (((bitField0_ & 0x00000008) != 0)) {
435 size +=
com.
google.protobuf.CodedOutputStream
436 .computeBoolSize(5, isLazy_);
440 for (
int i = 0; i < varIndex_.size(); i++) {
441 dataSize +=
com.
google.protobuf.CodedOutputStream
442 .computeInt32SizeNoTag(varIndex_.getInt(i));
447 size +=
com.
google.protobuf.CodedOutputStream
448 .computeInt32SizeNoTag(dataSize);
450 varIndexMemoizedSerializedSize = dataSize;
458 size +=
com.
google.protobuf.CodedOutputStream
459 .computeInt32SizeNoTag(dataSize);
461 coefficientMemoizedSerializedSize = dataSize;
463 size += unknownFields.getSerializedSize();
469 public boolean equals(
final java.lang.Object obj) {
474 return super.equals(obj);
479 .equals(other.getVarIndexList()))
return false;
481 .equals(other.getCoefficientList()))
return false;
485 != java.lang.Double.doubleToLongBits(
486 other.getLowerBound()))
return false;
491 != java.lang.Double.doubleToLongBits(
492 other.getUpperBound()))
return false;
494 if (
hasName() != other.hasName())
return false;
497 .equals(other.getName()))
return false;
499 if (
hasIsLazy() != other.hasIsLazy())
return false;
502 != other.getIsLazy())
return false;
504 if (!unknownFields.equals(other.unknownFields))
return false;
510 if (memoizedHashCode != 0) {
511 return memoizedHashCode;
525 hash = (53 * hash) +
com.
google.protobuf.Internal.hashLong(
530 hash = (53 * hash) +
com.
google.protobuf.Internal.hashLong(
535 hash = (53 * hash) +
getName().hashCode();
539 hash = (53 * hash) +
com.
google.protobuf.Internal.hashBoolean(
542 hash = (29 * hash) + unknownFields.hashCode();
543 memoizedHashCode = hash;
548 java.nio.ByteBuffer data)
549 throws com.
google.protobuf.InvalidProtocolBufferException {
550 return PARSER.parseFrom(data);
553 java.nio.ByteBuffer data,
554 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
555 throws com.
google.protobuf.InvalidProtocolBufferException {
556 return PARSER.parseFrom(data, extensionRegistry);
560 throws com.
google.protobuf.InvalidProtocolBufferException {
561 return PARSER.parseFrom(data);
565 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
566 throws com.
google.protobuf.InvalidProtocolBufferException {
567 return PARSER.parseFrom(data, extensionRegistry);
570 throws com.
google.protobuf.InvalidProtocolBufferException {
571 return PARSER.parseFrom(data);
575 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
576 throws com.
google.protobuf.InvalidProtocolBufferException {
577 return PARSER.parseFrom(data, extensionRegistry);
580 throws java.io.IOException {
581 return com.
google.protobuf.GeneratedMessageV3
582 .parseWithIOException(
PARSER, input);
585 java.io.InputStream input,
586 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
587 throws java.io.IOException {
588 return com.
google.protobuf.GeneratedMessageV3
589 .parseWithIOException(
PARSER, input, extensionRegistry);
592 throws java.io.IOException {
593 return com.
google.protobuf.GeneratedMessageV3
594 .parseDelimitedWithIOException(
PARSER, input);
597 java.io.InputStream input,
598 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
599 throws java.io.IOException {
600 return com.
google.protobuf.GeneratedMessageV3
601 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
604 com.
google.protobuf.CodedInputStream input)
605 throws java.io.IOException {
606 return com.
google.protobuf.GeneratedMessageV3
607 .parseWithIOException(
PARSER, input);
610 com.
google.protobuf.CodedInputStream input,
611 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
612 throws java.io.IOException {
613 return com.
google.protobuf.GeneratedMessageV3
614 .parseWithIOException(
PARSER, input, extensionRegistry);
627 return this == DEFAULT_INSTANCE
633 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
655 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
658 public static final com.
google.protobuf.Descriptors.Descriptor
664 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
667 .ensureFieldAccessorsInitialized(
673 maybeForceBuilderInitialization();
677 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
679 maybeForceBuilderInitialization();
681 private void maybeForceBuilderInitialization() {
682 if (
com.
google.protobuf.GeneratedMessageV3
683 .alwaysUseFieldBuilders) {
689 varIndex_ = emptyIntList();
690 bitField0_ = (bitField0_ & ~0x00000001);
691 coefficient_ = emptyDoubleList();
692 bitField0_ = (bitField0_ & ~0x00000002);
693 lowerBound_ = Double.NEGATIVE_INFINITY;
694 bitField0_ = (bitField0_ & ~0x00000004);
695 upperBound_ = Double.POSITIVE_INFINITY;
696 bitField0_ = (bitField0_ & ~0x00000008);
698 bitField0_ = (bitField0_ & ~0x00000010);
700 bitField0_ = (bitField0_ & ~0x00000020);
705 public com.
google.protobuf.Descriptors.Descriptor
718 if (!result.isInitialized()) {
719 throw newUninitializedMessageException(result);
727 int from_bitField0_ = bitField0_;
728 int to_bitField0_ = 0;
729 if (((bitField0_ & 0x00000001) != 0)) {
730 varIndex_.makeImmutable();
731 bitField0_ = (bitField0_ & ~0x00000001);
733 result.varIndex_ = varIndex_;
734 if (((bitField0_ & 0x00000002) != 0)) {
735 coefficient_.makeImmutable();
736 bitField0_ = (bitField0_ & ~0x00000002);
738 result.coefficient_ = coefficient_;
739 if (((from_bitField0_ & 0x00000004) != 0)) {
740 to_bitField0_ |= 0x00000001;
742 result.lowerBound_ = lowerBound_;
743 if (((from_bitField0_ & 0x00000008) != 0)) {
744 to_bitField0_ |= 0x00000002;
746 result.upperBound_ = upperBound_;
747 if (((from_bitField0_ & 0x00000010) != 0)) {
748 to_bitField0_ |= 0x00000004;
750 result.name_ = name_;
751 if (((from_bitField0_ & 0x00000020) != 0)) {
752 result.isLazy_ = isLazy_;
753 to_bitField0_ |= 0x00000008;
755 result.bitField0_ = to_bitField0_;
762 return super.
clone();
766 com.
google.protobuf.Descriptors.FieldDescriptor field,
767 java.lang.Object value) {
768 return super.
setField(field, value);
772 com.
google.protobuf.Descriptors.FieldDescriptor field) {
777 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
782 com.
google.protobuf.Descriptors.FieldDescriptor field,
783 int index, java.lang.Object value) {
788 com.
google.protobuf.Descriptors.FieldDescriptor field,
789 java.lang.Object value) {
797 super.mergeFrom(other);
804 if (!other.varIndex_.isEmpty()) {
805 if (varIndex_.isEmpty()) {
806 varIndex_ = other.varIndex_;
807 bitField0_ = (bitField0_ & ~0x00000001);
809 ensureVarIndexIsMutable();
810 varIndex_.addAll(other.varIndex_);
814 if (!other.coefficient_.isEmpty()) {
815 if (coefficient_.isEmpty()) {
816 coefficient_ = other.coefficient_;
817 bitField0_ = (bitField0_ & ~0x00000002);
819 ensureCoefficientIsMutable();
820 coefficient_.addAll(other.coefficient_);
824 if (other.hasLowerBound()) {
827 if (other.hasUpperBound()) {
830 if (other.hasName()) {
831 bitField0_ |= 0x00000010;
835 if (other.hasIsLazy()) {
850 com.
google.protobuf.CodedInputStream input,
851 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
852 throws java.io.IOException {
855 parsedMessage =
PARSER.parsePartialFrom(input, extensionRegistry);
856 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
858 throw e.unwrapIOException();
860 if (parsedMessage !=
null) {
866 private int bitField0_;
868 private com.
google.protobuf.Internal.IntList varIndex_ = emptyIntList();
869 private void ensureVarIndexIsMutable() {
870 if (!((bitField0_ & 0x00000001) != 0)) {
871 varIndex_ = mutableCopy(varIndex_);
872 bitField0_ |= 0x00000001;
885 public java.util.List<java.lang.Integer>
887 return ((bitField0_ & 0x00000001) != 0) ?
888 java.util.Collections.unmodifiableList(varIndex_) : varIndex_;
901 return varIndex_.size();
914 return varIndex_.getInt(index);
927 int index,
int value) {
928 ensureVarIndexIsMutable();
929 varIndex_.setInt(index, value);
944 ensureVarIndexIsMutable();
945 varIndex_.addInt(value);
960 java.lang.Iterable<? extends java.lang.Integer> values) {
961 ensureVarIndexIsMutable();
962 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
978 varIndex_ = emptyIntList();
979 bitField0_ = (bitField0_ & ~0x00000001);
984 private com.
google.protobuf.Internal.DoubleList coefficient_ = emptyDoubleList();
985 private void ensureCoefficientIsMutable() {
986 if (!((bitField0_ & 0x00000002) != 0)) {
987 coefficient_ = mutableCopy(coefficient_);
988 bitField0_ |= 0x00000002;
998 public java.util.List<java.lang.Double>
1000 return ((bitField0_ & 0x00000002) != 0) ?
1001 java.util.Collections.unmodifiableList(coefficient_) : coefficient_;
1011 return coefficient_.size();
1021 return coefficient_.getDouble(index);
1031 int index,
double value) {
1032 ensureCoefficientIsMutable();
1033 coefficient_.setDouble(index, value);
1045 ensureCoefficientIsMutable();
1046 coefficient_.addDouble(value);
1058 java.lang.Iterable<? extends java.lang.Double> values) {
1059 ensureCoefficientIsMutable();
1060 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
1061 values, coefficient_);
1073 coefficient_ = emptyDoubleList();
1074 bitField0_ = (bitField0_ & ~0x00000002);
1079 private double lowerBound_ = Double.NEGATIVE_INFINITY;
1088 return ((bitField0_ & 0x00000004) != 0);
1108 bitField0_ |= 0x00000004;
1109 lowerBound_ = value;
1121 bitField0_ = (bitField0_ & ~0x00000004);
1122 lowerBound_ = Double.NEGATIVE_INFINITY;
1127 private double upperBound_ = Double.POSITIVE_INFINITY;
1132 return ((bitField0_ & 0x00000008) != 0);
1144 bitField0_ |= 0x00000008;
1145 upperBound_ = value;
1153 bitField0_ = (bitField0_ & ~0x00000008);
1154 upperBound_ = Double.POSITIVE_INFINITY;
1159 private java.lang.Object name_ =
"";
1168 return ((bitField0_ & 0x00000010) != 0);
1178 java.lang.Object ref = name_;
1179 if (!(ref instanceof java.lang.String)) {
1182 java.lang.String s = bs.toStringUtf8();
1183 if (bs.isValidUtf8()) {
1188 return (java.lang.String) ref;
1200 java.lang.Object ref = name_;
1201 if (ref instanceof String) {
1203 com.
google.protobuf.ByteString.copyFromUtf8(
1204 (java.lang.String) ref);
1208 return (
com.
google.protobuf.ByteString) ref;
1219 java.lang.String value) {
1220 if (value ==
null) {
1221 throw new NullPointerException();
1223 bitField0_ |= 0x00000010;
1236 bitField0_ = (bitField0_ & ~0x00000010);
1250 if (value ==
null) {
1251 throw new NullPointerException();
1253 bitField0_ |= 0x00000010;
1259 private boolean isLazy_ ;
1271 return ((bitField0_ & 0x00000020) != 0);
1297 bitField0_ |= 0x00000020;
1313 bitField0_ = (bitField0_ & ~0x00000020);
1320 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1326 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1341 return DEFAULT_INSTANCE;
1348 com.
google.protobuf.CodedInputStream input,
1349 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
1350 throws com.
google.protobuf.InvalidProtocolBufferException {
1366 return DEFAULT_INSTANCE;