Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MPConstraintProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/linear_solver/linear_solver.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.linearsolver;
6
24public final class MPConstraintProto extends
25 com.google.protobuf.GeneratedMessage implements
26 // @@protoc_insertion_point(message_implements:operations_research.MPConstraintProto)
28private static final long serialVersionUID = 0L;
29 static {
30 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
31 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
32 /* major= */ 4,
33 /* minor= */ 26,
34 /* patch= */ 1,
35 /* suffix= */ "",
37 }
38 // Use MPConstraintProto.newBuilder() to construct.
39 private MPConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
40 super(builder);
41 }
42 private MPConstraintProto() {
43 varIndex_ = emptyIntList();
44 coefficient_ = emptyDoubleList();
45 lowerBound_ = Double.NEGATIVE_INFINITY;
46 upperBound_ = Double.POSITIVE_INFINITY;
47 name_ = "";
48 }
49
50 public static final com.google.protobuf.Descriptors.Descriptor
52 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPConstraintProto_descriptor;
53 }
54
55 @java.lang.Override
56 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
58 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPConstraintProto_fieldAccessorTable
59 .ensureFieldAccessorsInitialized(
60 com.google.ortools.linearsolver.MPConstraintProto.class, com.google.ortools.linearsolver.MPConstraintProto.Builder.class);
61 }
62
63 private int bitField0_;
64 public static final int VAR_INDEX_FIELD_NUMBER = 6;
65 @SuppressWarnings("serial")
66 private com.google.protobuf.Internal.IntList varIndex_ =
67 emptyIntList();
79 @java.lang.Override
80 public java.util.List<java.lang.Integer>
82 return varIndex_;
83 }
95 public int getVarIndexCount() {
96 return varIndex_.size();
97 }
110 public int getVarIndex(int index) {
111 return varIndex_.getInt(index);
112 }
113 private int varIndexMemoizedSerializedSize = -1;
114
115 public static final int COEFFICIENT_FIELD_NUMBER = 7;
116 @SuppressWarnings("serial")
117 private com.google.protobuf.Internal.DoubleList coefficient_ =
118 emptyDoubleList();
127 @java.lang.Override
128 public java.util.List<java.lang.Double>
130 return coefficient_;
131 }
140 public int getCoefficientCount() {
141 return coefficient_.size();
142 }
152 public double getCoefficient(int index) {
153 return coefficient_.getDouble(index);
154 }
155 private int coefficientMemoizedSerializedSize = -1;
156
157 public static final int LOWER_BOUND_FIELD_NUMBER = 2;
158 private double lowerBound_ = Double.NEGATIVE_INFINITY;
167 @java.lang.Override
168 public boolean hasLowerBound() {
169 return ((bitField0_ & 0x00000001) != 0);
170 }
179 @java.lang.Override
180 public double getLowerBound() {
181 return lowerBound_;
182 }
183
184 public static final int UPPER_BOUND_FIELD_NUMBER = 3;
185 private double upperBound_ = Double.POSITIVE_INFINITY;
190 @java.lang.Override
191 public boolean hasUpperBound() {
192 return ((bitField0_ & 0x00000002) != 0);
193 }
198 @java.lang.Override
199 public double getUpperBound() {
200 return upperBound_;
201 }
202
203 public static final int NAME_FIELD_NUMBER = 4;
204 @SuppressWarnings("serial")
205 private volatile java.lang.Object name_ = "";
214 @java.lang.Override
215 public boolean hasName() {
216 return ((bitField0_ & 0x00000004) != 0);
217 }
226 @java.lang.Override
227 public java.lang.String getName() {
228 java.lang.Object ref = name_;
229 if (ref instanceof java.lang.String) {
230 return (java.lang.String) ref;
231 } else {
232 com.google.protobuf.ByteString bs =
233 (com.google.protobuf.ByteString) ref;
234 java.lang.String s = bs.toStringUtf8();
235 if (bs.isValidUtf8()) {
236 name_ = s;
237 }
238 return s;
239 }
240 }
249 @java.lang.Override
250 public com.google.protobuf.ByteString
252 java.lang.Object ref = name_;
253 if (ref instanceof java.lang.String) {
254 com.google.protobuf.ByteString b =
255 com.google.protobuf.ByteString.copyFromUtf8(
256 (java.lang.String) ref);
257 name_ = b;
258 return b;
259 } else {
260 return (com.google.protobuf.ByteString) ref;
261 }
262 }
263
264 public static final int IS_LAZY_FIELD_NUMBER = 5;
265 private boolean isLazy_ = false;
277 @java.lang.Override
278 public boolean hasIsLazy() {
279 return ((bitField0_ & 0x00000008) != 0);
280 }
292 @java.lang.Override
293 public boolean getIsLazy() {
294 return isLazy_;
295 }
296
297 private byte memoizedIsInitialized = -1;
298 @java.lang.Override
299 public final boolean isInitialized() {
300 byte isInitialized = memoizedIsInitialized;
301 if (isInitialized == 1) return true;
302 if (isInitialized == 0) return false;
303
304 memoizedIsInitialized = 1;
305 return true;
306 }
307
308 @java.lang.Override
309 public void writeTo(com.google.protobuf.CodedOutputStream output)
310 throws java.io.IOException {
312 if (((bitField0_ & 0x00000001) != 0)) {
313 output.writeDouble(2, lowerBound_);
314 }
315 if (((bitField0_ & 0x00000002) != 0)) {
316 output.writeDouble(3, upperBound_);
317 }
318 if (((bitField0_ & 0x00000004) != 0)) {
319 com.google.protobuf.GeneratedMessage.writeString(output, 4, name_);
320 }
321 if (((bitField0_ & 0x00000008) != 0)) {
322 output.writeBool(5, isLazy_);
323 }
324 if (getVarIndexList().size() > 0) {
325 output.writeUInt32NoTag(50);
326 output.writeUInt32NoTag(varIndexMemoizedSerializedSize);
327 }
328 for (int i = 0; i < varIndex_.size(); i++) {
329 output.writeInt32NoTag(varIndex_.getInt(i));
330 }
331 if (getCoefficientList().size() > 0) {
332 output.writeUInt32NoTag(58);
333 output.writeUInt32NoTag(coefficientMemoizedSerializedSize);
334 }
335 for (int i = 0; i < coefficient_.size(); i++) {
336 output.writeDoubleNoTag(coefficient_.getDouble(i));
337 }
338 getUnknownFields().writeTo(output);
339 }
340
341 @java.lang.Override
342 public int getSerializedSize() {
343 int size = memoizedSize;
344 if (size != -1) return size;
345
346 size = 0;
347 if (((bitField0_ & 0x00000001) != 0)) {
348 size += com.google.protobuf.CodedOutputStream
349 .computeDoubleSize(2, lowerBound_);
350 }
351 if (((bitField0_ & 0x00000002) != 0)) {
352 size += com.google.protobuf.CodedOutputStream
353 .computeDoubleSize(3, upperBound_);
354 }
355 if (((bitField0_ & 0x00000004) != 0)) {
356 size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_);
357 }
358 if (((bitField0_ & 0x00000008) != 0)) {
359 size += com.google.protobuf.CodedOutputStream
360 .computeBoolSize(5, isLazy_);
361 }
362 {
363 int dataSize = 0;
364 for (int i = 0; i < varIndex_.size(); i++) {
365 dataSize += com.google.protobuf.CodedOutputStream
366 .computeInt32SizeNoTag(varIndex_.getInt(i));
367 }
368 size += dataSize;
369 if (!getVarIndexList().isEmpty()) {
370 size += 1;
371 size += com.google.protobuf.CodedOutputStream
372 .computeInt32SizeNoTag(dataSize);
373 }
374 varIndexMemoizedSerializedSize = dataSize;
375 }
376 {
377 int dataSize = 0;
378 dataSize = 8 * getCoefficientList().size();
379 size += dataSize;
380 if (!getCoefficientList().isEmpty()) {
381 size += 1;
382 size += com.google.protobuf.CodedOutputStream
383 .computeInt32SizeNoTag(dataSize);
384 }
385 coefficientMemoizedSerializedSize = dataSize;
386 }
387 size += getUnknownFields().getSerializedSize();
388 memoizedSize = size;
389 return size;
390 }
391
392 @java.lang.Override
393 public boolean equals(final java.lang.Object obj) {
394 if (obj == this) {
395 return true;
396 }
397 if (!(obj instanceof com.google.ortools.linearsolver.MPConstraintProto)) {
398 return super.equals(obj);
399 }
400 com.google.ortools.linearsolver.MPConstraintProto other = (com.google.ortools.linearsolver.MPConstraintProto) obj;
401
402 if (!getVarIndexList()
403 .equals(other.getVarIndexList())) return false;
404 if (!getCoefficientList()
405 .equals(other.getCoefficientList())) return false;
406 if (hasLowerBound() != other.hasLowerBound()) return false;
407 if (hasLowerBound()) {
408 if (java.lang.Double.doubleToLongBits(getLowerBound())
409 != java.lang.Double.doubleToLongBits(
410 other.getLowerBound())) return false;
411 }
412 if (hasUpperBound() != other.hasUpperBound()) return false;
413 if (hasUpperBound()) {
414 if (java.lang.Double.doubleToLongBits(getUpperBound())
415 != java.lang.Double.doubleToLongBits(
416 other.getUpperBound())) return false;
417 }
418 if (hasName() != other.hasName()) return false;
419 if (hasName()) {
420 if (!getName()
421 .equals(other.getName())) return false;
422 }
423 if (hasIsLazy() != other.hasIsLazy()) return false;
424 if (hasIsLazy()) {
425 if (getIsLazy()
426 != other.getIsLazy()) return false;
427 }
428 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
429 return true;
430 }
431
432 @java.lang.Override
433 public int hashCode() {
434 if (memoizedHashCode != 0) {
435 return memoizedHashCode;
436 }
437 int hash = 41;
438 hash = (19 * hash) + getDescriptor().hashCode();
439 if (getVarIndexCount() > 0) {
440 hash = (37 * hash) + VAR_INDEX_FIELD_NUMBER;
441 hash = (53 * hash) + getVarIndexList().hashCode();
442 }
443 if (getCoefficientCount() > 0) {
444 hash = (37 * hash) + COEFFICIENT_FIELD_NUMBER;
445 hash = (53 * hash) + getCoefficientList().hashCode();
446 }
447 if (hasLowerBound()) {
448 hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER;
449 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
450 java.lang.Double.doubleToLongBits(getLowerBound()));
451 }
452 if (hasUpperBound()) {
453 hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER;
454 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
455 java.lang.Double.doubleToLongBits(getUpperBound()));
456 }
457 if (hasName()) {
458 hash = (37 * hash) + NAME_FIELD_NUMBER;
459 hash = (53 * hash) + getName().hashCode();
460 }
461 if (hasIsLazy()) {
462 hash = (37 * hash) + IS_LAZY_FIELD_NUMBER;
463 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
464 getIsLazy());
465 }
466 hash = (29 * hash) + getUnknownFields().hashCode();
467 memoizedHashCode = hash;
468 return hash;
469 }
470
472 java.nio.ByteBuffer data)
473 throws com.google.protobuf.InvalidProtocolBufferException {
474 return PARSER.parseFrom(data);
475 }
477 java.nio.ByteBuffer data,
478 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
479 throws com.google.protobuf.InvalidProtocolBufferException {
480 return PARSER.parseFrom(data, extensionRegistry);
481 }
483 com.google.protobuf.ByteString data)
484 throws com.google.protobuf.InvalidProtocolBufferException {
485 return PARSER.parseFrom(data);
486 }
488 com.google.protobuf.ByteString data,
489 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
490 throws com.google.protobuf.InvalidProtocolBufferException {
491 return PARSER.parseFrom(data, extensionRegistry);
492 }
494 throws com.google.protobuf.InvalidProtocolBufferException {
495 return PARSER.parseFrom(data);
496 }
498 byte[] data,
499 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
500 throws com.google.protobuf.InvalidProtocolBufferException {
501 return PARSER.parseFrom(data, extensionRegistry);
502 }
503 public static com.google.ortools.linearsolver.MPConstraintProto parseFrom(java.io.InputStream input)
504 throws java.io.IOException {
505 return com.google.protobuf.GeneratedMessage
506 .parseWithIOException(PARSER, input);
507 }
509 java.io.InputStream input,
510 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
511 throws java.io.IOException {
512 return com.google.protobuf.GeneratedMessage
513 .parseWithIOException(PARSER, input, extensionRegistry);
514 }
515
517 throws java.io.IOException {
518 return com.google.protobuf.GeneratedMessage
519 .parseDelimitedWithIOException(PARSER, input);
520 }
521
523 java.io.InputStream input,
524 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
525 throws java.io.IOException {
526 return com.google.protobuf.GeneratedMessage
527 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
528 }
530 com.google.protobuf.CodedInputStream input)
531 throws java.io.IOException {
532 return com.google.protobuf.GeneratedMessage
533 .parseWithIOException(PARSER, input);
534 }
536 com.google.protobuf.CodedInputStream input,
537 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
538 throws java.io.IOException {
539 return com.google.protobuf.GeneratedMessage
540 .parseWithIOException(PARSER, input, extensionRegistry);
541 }
542
543 @java.lang.Override
544 public Builder newBuilderForType() { return newBuilder(); }
545 public static Builder newBuilder() {
546 return DEFAULT_INSTANCE.toBuilder();
547 }
548 public static Builder newBuilder(com.google.ortools.linearsolver.MPConstraintProto prototype) {
549 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
550 }
551 @java.lang.Override
553 return this == DEFAULT_INSTANCE
554 ? new Builder() : new Builder().mergeFrom(this);
555 }
556
557 @java.lang.Override
559 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
560 Builder builder = new Builder(parent);
561 return builder;
562 }
580 public static final class Builder extends
581 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
582 // @@protoc_insertion_point(builder_implements:operations_research.MPConstraintProto)
583 com.google.ortools.linearsolver.MPConstraintProtoOrBuilder {
584 public static final com.google.protobuf.Descriptors.Descriptor
586 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPConstraintProto_descriptor;
587 }
588
589 @java.lang.Override
590 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
592 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPConstraintProto_fieldAccessorTable
593 .ensureFieldAccessorsInitialized(
594 com.google.ortools.linearsolver.MPConstraintProto.class, com.google.ortools.linearsolver.MPConstraintProto.Builder.class);
595 }
596
597 // Construct using com.google.ortools.linearsolver.MPConstraintProto.newBuilder()
598 private Builder() {
599
600 }
601
602 private Builder(
603 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
604 super(parent);
605
606 }
607 @java.lang.Override
608 public Builder clear() {
609 super.clear();
610 bitField0_ = 0;
611 varIndex_ = emptyIntList();
612 coefficient_ = emptyDoubleList();
613 lowerBound_ = Double.NEGATIVE_INFINITY;
614 upperBound_ = Double.POSITIVE_INFINITY;
615 name_ = "";
616 isLazy_ = false;
617 return this;
618 }
619
620 @java.lang.Override
621 public com.google.protobuf.Descriptors.Descriptor
623 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPConstraintProto_descriptor;
624 }
625
626 @java.lang.Override
628 return com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance();
629 }
630
631 @java.lang.Override
634 if (!result.isInitialized()) {
635 throw newUninitializedMessageException(result);
636 }
637 return result;
638 }
639
640 @java.lang.Override
642 com.google.ortools.linearsolver.MPConstraintProto result = new com.google.ortools.linearsolver.MPConstraintProto(this);
643 if (bitField0_ != 0) { buildPartial0(result); }
644 onBuilt();
645 return result;
646 }
647
648 private void buildPartial0(com.google.ortools.linearsolver.MPConstraintProto result) {
649 int from_bitField0_ = bitField0_;
650 if (((from_bitField0_ & 0x00000001) != 0)) {
651 varIndex_.makeImmutable();
652 result.varIndex_ = varIndex_;
653 }
654 if (((from_bitField0_ & 0x00000002) != 0)) {
655 coefficient_.makeImmutable();
656 result.coefficient_ = coefficient_;
657 }
658 int to_bitField0_ = 0;
659 if (((from_bitField0_ & 0x00000004) != 0)) {
660 result.lowerBound_ = lowerBound_;
661 to_bitField0_ |= 0x00000001;
662 }
663 if (((from_bitField0_ & 0x00000008) != 0)) {
664 result.upperBound_ = upperBound_;
665 to_bitField0_ |= 0x00000002;
666 }
667 if (((from_bitField0_ & 0x00000010) != 0)) {
668 result.name_ = name_;
669 to_bitField0_ |= 0x00000004;
670 }
671 if (((from_bitField0_ & 0x00000020) != 0)) {
672 result.isLazy_ = isLazy_;
673 to_bitField0_ |= 0x00000008;
674 }
675 result.bitField0_ |= to_bitField0_;
676 }
677
678 @java.lang.Override
679 public Builder mergeFrom(com.google.protobuf.Message other) {
680 if (other instanceof com.google.ortools.linearsolver.MPConstraintProto) {
681 return mergeFrom((com.google.ortools.linearsolver.MPConstraintProto)other);
682 } else {
683 super.mergeFrom(other);
684 return this;
685 }
686 }
687
688 public Builder mergeFrom(com.google.ortools.linearsolver.MPConstraintProto other) {
689 if (other == com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance()) return this;
690 if (!other.varIndex_.isEmpty()) {
691 if (varIndex_.isEmpty()) {
692 varIndex_ = other.varIndex_;
693 varIndex_.makeImmutable();
694 bitField0_ |= 0x00000001;
695 } else {
696 ensureVarIndexIsMutable();
697 varIndex_.addAll(other.varIndex_);
698 }
699 onChanged();
700 }
701 if (!other.coefficient_.isEmpty()) {
702 if (coefficient_.isEmpty()) {
703 coefficient_ = other.coefficient_;
704 coefficient_.makeImmutable();
705 bitField0_ |= 0x00000002;
706 } else {
707 ensureCoefficientIsMutable();
708 coefficient_.addAll(other.coefficient_);
709 }
710 onChanged();
711 }
712 if (other.hasLowerBound()) {
713 setLowerBound(other.getLowerBound());
714 }
715 if (other.hasUpperBound()) {
716 setUpperBound(other.getUpperBound());
717 }
718 if (other.hasName()) {
719 name_ = other.name_;
720 bitField0_ |= 0x00000010;
721 onChanged();
722 }
723 if (other.hasIsLazy()) {
724 setIsLazy(other.getIsLazy());
725 }
726 this.mergeUnknownFields(other.getUnknownFields());
727 onChanged();
728 return this;
729 }
730
731 @java.lang.Override
732 public final boolean isInitialized() {
733 return true;
734 }
735
736 @java.lang.Override
738 com.google.protobuf.CodedInputStream input,
739 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
740 throws java.io.IOException {
741 if (extensionRegistry == null) {
742 throw new java.lang.NullPointerException();
743 }
744 try {
745 boolean done = false;
746 while (!done) {
747 int tag = input.readTag();
748 switch (tag) {
749 case 0:
750 done = true;
751 break;
752 case 17: {
753 lowerBound_ = input.readDouble();
754 bitField0_ |= 0x00000004;
755 break;
756 } // case 17
757 case 25: {
758 upperBound_ = input.readDouble();
759 bitField0_ |= 0x00000008;
760 break;
761 } // case 25
762 case 34: {
763 name_ = input.readBytes();
764 bitField0_ |= 0x00000010;
765 break;
766 } // case 34
767 case 40: {
768 isLazy_ = input.readBool();
769 bitField0_ |= 0x00000020;
770 break;
771 } // case 40
772 case 48: {
773 int v = input.readInt32();
774 ensureVarIndexIsMutable();
775 varIndex_.addInt(v);
776 break;
777 } // case 48
778 case 50: {
779 int length = input.readRawVarint32();
780 int limit = input.pushLimit(length);
781 ensureVarIndexIsMutable();
782 while (input.getBytesUntilLimit() > 0) {
783 varIndex_.addInt(input.readInt32());
784 }
785 input.popLimit(limit);
786 break;
787 } // case 50
788 case 57: {
789 double v = input.readDouble();
790 ensureCoefficientIsMutable();
791 coefficient_.addDouble(v);
792 break;
793 } // case 57
794 case 58: {
795 int length = input.readRawVarint32();
796 int limit = input.pushLimit(length);
797 int alloc = length > 4096 ? 4096 : length;
798 ensureCoefficientIsMutable(alloc / 8);
799 while (input.getBytesUntilLimit() > 0) {
800 coefficient_.addDouble(input.readDouble());
801 }
802 input.popLimit(limit);
803 break;
804 } // case 58
805 default: {
806 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
807 done = true; // was an endgroup tag
808 }
809 break;
810 } // default:
811 } // switch (tag)
812 } // while (!done)
813 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
814 throw e.unwrapIOException();
815 } finally {
816 onChanged();
817 } // finally
818 return this;
819 }
820 private int bitField0_;
821
822 private com.google.protobuf.Internal.IntList varIndex_ = emptyIntList();
823 private void ensureVarIndexIsMutable() {
824 if (!varIndex_.isModifiable()) {
825 varIndex_ = makeMutableCopy(varIndex_);
826 }
827 bitField0_ |= 0x00000001;
828 }
840 public java.util.List<java.lang.Integer>
842 varIndex_.makeImmutable();
843 return varIndex_;
844 }
856 public int getVarIndexCount() {
857 return varIndex_.size();
858 }
871 public int getVarIndex(int index) {
872 return varIndex_.getInt(index);
873 }
888 int index, int value) {
889
890 ensureVarIndexIsMutable();
891 varIndex_.setInt(index, value);
892 bitField0_ |= 0x00000001;
893 onChanged();
894 return this;
895 }
908 public Builder addVarIndex(int value) {
909
910 ensureVarIndexIsMutable();
911 varIndex_.addInt(value);
912 bitField0_ |= 0x00000001;
913 onChanged();
914 return this;
915 }
929 java.lang.Iterable<? extends java.lang.Integer> values) {
930 ensureVarIndexIsMutable();
931 com.google.protobuf.AbstractMessageLite.Builder.addAll(
932 values, varIndex_);
933 bitField0_ |= 0x00000001;
934 onChanged();
935 return this;
936 }
949 varIndex_ = emptyIntList();
950 bitField0_ = (bitField0_ & ~0x00000001);
951 onChanged();
952 return this;
953 }
954
955 private com.google.protobuf.Internal.DoubleList coefficient_ = emptyDoubleList();
956 private void ensureCoefficientIsMutable() {
957 if (!coefficient_.isModifiable()) {
958 coefficient_ = makeMutableCopy(coefficient_);
959 }
960 bitField0_ |= 0x00000002;
961 }
962 private void ensureCoefficientIsMutable(int capacity) {
963 if (!coefficient_.isModifiable()) {
964 coefficient_ = makeMutableCopy(coefficient_, capacity);
965 }
966 bitField0_ |= 0x00000002;
967 }
976 public java.util.List<java.lang.Double>
978 coefficient_.makeImmutable();
979 return coefficient_;
980 }
989 public int getCoefficientCount() {
990 return coefficient_.size();
991 }
1001 public double getCoefficient(int index) {
1002 return coefficient_.getDouble(index);
1003 }
1015 int index, double value) {
1016
1017 ensureCoefficientIsMutable();
1018 coefficient_.setDouble(index, value);
1019 bitField0_ |= 0x00000002;
1020 onChanged();
1021 return this;
1022 }
1032 public Builder addCoefficient(double value) {
1033
1034 ensureCoefficientIsMutable();
1035 coefficient_.addDouble(value);
1036 bitField0_ |= 0x00000002;
1037 onChanged();
1038 return this;
1039 }
1050 java.lang.Iterable<? extends java.lang.Double> values) {
1051 ensureCoefficientIsMutable();
1052 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1053 values, coefficient_);
1054 bitField0_ |= 0x00000002;
1055 onChanged();
1056 return this;
1057 }
1067 coefficient_ = emptyDoubleList();
1068 bitField0_ = (bitField0_ & ~0x00000002);
1069 onChanged();
1070 return this;
1071 }
1072
1073 private double lowerBound_ = Double.NEGATIVE_INFINITY;
1082 @java.lang.Override
1083 public boolean hasLowerBound() {
1084 return ((bitField0_ & 0x00000004) != 0);
1085 }
1094 @java.lang.Override
1095 public double getLowerBound() {
1096 return lowerBound_;
1097 }
1107 public Builder setLowerBound(double value) {
1108
1109 lowerBound_ = value;
1110 bitField0_ |= 0x00000004;
1111 onChanged();
1112 return this;
1113 }
1123 bitField0_ = (bitField0_ & ~0x00000004);
1124 lowerBound_ = Double.NEGATIVE_INFINITY;
1125 onChanged();
1126 return this;
1127 }
1128
1129 private double upperBound_ = Double.POSITIVE_INFINITY;
1134 @java.lang.Override
1135 public boolean hasUpperBound() {
1136 return ((bitField0_ & 0x00000008) != 0);
1137 }
1142 @java.lang.Override
1143 public double getUpperBound() {
1144 return upperBound_;
1145 }
1151 public Builder setUpperBound(double value) {
1152
1153 upperBound_ = value;
1154 bitField0_ |= 0x00000008;
1155 onChanged();
1156 return this;
1157 }
1163 bitField0_ = (bitField0_ & ~0x00000008);
1164 upperBound_ = Double.POSITIVE_INFINITY;
1165 onChanged();
1166 return this;
1167 }
1168
1169 private java.lang.Object name_ = "";
1178 public boolean hasName() {
1179 return ((bitField0_ & 0x00000010) != 0);
1180 }
1189 public java.lang.String getName() {
1190 java.lang.Object ref = name_;
1191 if (!(ref instanceof java.lang.String)) {
1192 com.google.protobuf.ByteString bs =
1193 (com.google.protobuf.ByteString) ref;
1194 java.lang.String s = bs.toStringUtf8();
1195 if (bs.isValidUtf8()) {
1196 name_ = s;
1197 }
1198 return s;
1199 } else {
1200 return (java.lang.String) ref;
1201 }
1202 }
1211 public com.google.protobuf.ByteString
1213 java.lang.Object ref = name_;
1214 if (ref instanceof String) {
1215 com.google.protobuf.ByteString b =
1216 com.google.protobuf.ByteString.copyFromUtf8(
1217 (java.lang.String) ref);
1218 name_ = b;
1219 return b;
1220 } else {
1221 return (com.google.protobuf.ByteString) ref;
1222 }
1223 }
1234 java.lang.String value) {
1235 if (value == null) { throw new NullPointerException(); }
1236 name_ = value;
1237 bitField0_ |= 0x00000010;
1238 onChanged();
1239 return this;
1240 }
1250 name_ = getDefaultInstance().getName();
1251 bitField0_ = (bitField0_ & ~0x00000010);
1252 onChanged();
1253 return this;
1254 }
1265 com.google.protobuf.ByteString value) {
1266 if (value == null) { throw new NullPointerException(); }
1267 name_ = value;
1268 bitField0_ |= 0x00000010;
1269 onChanged();
1270 return this;
1271 }
1272
1273 private boolean isLazy_ ;
1285 @java.lang.Override
1286 public boolean hasIsLazy() {
1287 return ((bitField0_ & 0x00000020) != 0);
1288 }
1300 @java.lang.Override
1301 public boolean getIsLazy() {
1302 return isLazy_;
1303 }
1316 public Builder setIsLazy(boolean value) {
1317
1318 isLazy_ = value;
1319 bitField0_ |= 0x00000020;
1320 onChanged();
1321 return this;
1322 }
1335 bitField0_ = (bitField0_ & ~0x00000020);
1336 isLazy_ = false;
1337 onChanged();
1338 return this;
1339 }
1340
1341 // @@protoc_insertion_point(builder_scope:operations_research.MPConstraintProto)
1342 }
1343
1344 // @@protoc_insertion_point(class_scope:operations_research.MPConstraintProto)
1345 private static final com.google.ortools.linearsolver.MPConstraintProto DEFAULT_INSTANCE;
1346 static {
1347 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPConstraintProto();
1348 }
1349
1351 return DEFAULT_INSTANCE;
1352 }
1353
1354 private static final com.google.protobuf.Parser<MPConstraintProto>
1355 PARSER = new com.google.protobuf.AbstractParser<MPConstraintProto>() {
1356 @java.lang.Override
1357 public MPConstraintProto parsePartialFrom(
1358 com.google.protobuf.CodedInputStream input,
1359 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1360 throws com.google.protobuf.InvalidProtocolBufferException {
1361 Builder builder = newBuilder();
1362 try {
1363 builder.mergeFrom(input, extensionRegistry);
1364 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1365 throw e.setUnfinishedMessage(builder.buildPartial());
1366 } catch (com.google.protobuf.UninitializedMessageException e) {
1367 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1368 } catch (java.io.IOException e) {
1369 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1370 .setUnfinishedMessage(builder.buildPartial());
1371 }
1372 return builder.buildPartial();
1373 }
1374 };
1375
1376 public static com.google.protobuf.Parser<MPConstraintProto> parser() {
1377 return PARSER;
1378 }
1379
1380 @java.lang.Override
1381 public com.google.protobuf.Parser<MPConstraintProto> getParserForType() {
1382 return PARSER;
1383 }
1384
1385 @java.lang.Override
1389
1390}
1391
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.linearsolver.MPConstraintProto buildPartial()
Builder addAllCoefficient(java.lang.Iterable<? extends java.lang.Double > values)
com.google.ortools.linearsolver.MPConstraintProto build()
com.google.ortools.linearsolver.MPConstraintProto getDefaultInstanceForType()
Builder mergeFrom(com.google.protobuf.Message other)
Builder addAllVarIndex(java.lang.Iterable<? extends java.lang.Integer > values)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeFrom(com.google.ortools.linearsolver.MPConstraintProto other)
Builder setNameBytes(com.google.protobuf.ByteString value)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
static Builder newBuilder(com.google.ortools.linearsolver.MPConstraintProto prototype)
static com.google.ortools.linearsolver.MPConstraintProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(com.google.protobuf.ByteString data)
java.util.List< java.lang.Integer > getVarIndexList()
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(java.nio.ByteBuffer data)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.linearsolver.MPConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Parser< MPConstraintProto > getParserForType()
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(java.io.InputStream input)
static com.google.protobuf.Parser< MPConstraintProto > parser()
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.linearsolver.MPConstraintProto getDefaultInstanceForType()
java.util.List< java.lang.Double > getCoefficientList()
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPConstraintProto getDefaultInstance()
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)