513 int size = memoizedSize;
514 if (size != -1)
return size;
517 if (((bitField0_ & 0x00000001) != 0)) {
518 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
520 if (generalConstraintCase_ == 2) {
521 size += com.google.protobuf.CodedOutputStream
522 .computeMessageSize(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
524 if (generalConstraintCase_ == 3) {
525 size += com.google.protobuf.CodedOutputStream
526 .computeMessageSize(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
528 if (generalConstraintCase_ == 4) {
529 size += com.google.protobuf.CodedOutputStream
530 .computeMessageSize(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
532 if (generalConstraintCase_ == 5) {
533 size += com.google.protobuf.CodedOutputStream
534 .computeMessageSize(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
536 if (generalConstraintCase_ == 6) {
537 size += com.google.protobuf.CodedOutputStream
538 .computeMessageSize(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
540 if (generalConstraintCase_ == 7) {
541 size += com.google.protobuf.CodedOutputStream
542 .computeMessageSize(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
544 if (generalConstraintCase_ == 8) {
545 size += com.google.protobuf.CodedOutputStream
546 .computeMessageSize(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
548 if (generalConstraintCase_ == 9) {
549 size += com.google.protobuf.CodedOutputStream
550 .computeMessageSize(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
552 size += getUnknownFields().getSerializedSize();
765 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
768 public static final com.google.protobuf.Descriptors.Descriptor
770 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
774 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
776 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable
777 .ensureFieldAccessorsInitialized(
778 com.google.ortools.linearsolver.MPGeneralConstraintProto.class, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder.class);
787 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
796 if (indicatorConstraintBuilder_ !=
null) {
797 indicatorConstraintBuilder_.clear();
799 if (sosConstraintBuilder_ !=
null) {
800 sosConstraintBuilder_.clear();
802 if (quadraticConstraintBuilder_ !=
null) {
803 quadraticConstraintBuilder_.clear();
805 if (absConstraintBuilder_ !=
null) {
806 absConstraintBuilder_.clear();
808 if (andConstraintBuilder_ !=
null) {
809 andConstraintBuilder_.clear();
811 if (orConstraintBuilder_ !=
null) {
812 orConstraintBuilder_.clear();
814 if (minConstraintBuilder_ !=
null) {
815 minConstraintBuilder_.clear();
817 if (maxConstraintBuilder_ !=
null) {
818 maxConstraintBuilder_.clear();
820 generalConstraintCase_ = 0;
821 generalConstraint_ =
null;
826 public com.google.protobuf.Descriptors.Descriptor
828 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
833 return com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance();
840 throw newUninitializedMessageException(result);
848 if (bitField0_ != 0) { buildPartial0(result); }
849 buildPartialOneofs(result);
854 private void buildPartial0(com.google.ortools.linearsolver.MPGeneralConstraintProto result) {
855 int from_bitField0_ = bitField0_;
856 int to_bitField0_ = 0;
857 if (((from_bitField0_ & 0x00000001) != 0)) {
858 result.name_ = name_;
859 to_bitField0_ |= 0x00000001;
861 result.bitField0_ |= to_bitField0_;
864 private void buildPartialOneofs(com.google.ortools.linearsolver.MPGeneralConstraintProto result) {
865 result.generalConstraintCase_ = generalConstraintCase_;
866 result.generalConstraint_ = this.generalConstraint_;
867 if (generalConstraintCase_ == 2 &&
868 indicatorConstraintBuilder_ !=
null) {
869 result.generalConstraint_ = indicatorConstraintBuilder_.build();
871 if (generalConstraintCase_ == 3 &&
872 sosConstraintBuilder_ !=
null) {
873 result.generalConstraint_ = sosConstraintBuilder_.build();
875 if (generalConstraintCase_ == 4 &&
876 quadraticConstraintBuilder_ !=
null) {
877 result.generalConstraint_ = quadraticConstraintBuilder_.build();
879 if (generalConstraintCase_ == 5 &&
880 absConstraintBuilder_ !=
null) {
881 result.generalConstraint_ = absConstraintBuilder_.build();
883 if (generalConstraintCase_ == 6 &&
884 andConstraintBuilder_ !=
null) {
885 result.generalConstraint_ = andConstraintBuilder_.build();
887 if (generalConstraintCase_ == 7 &&
888 orConstraintBuilder_ !=
null) {
889 result.generalConstraint_ = orConstraintBuilder_.build();
891 if (generalConstraintCase_ == 8 &&
892 minConstraintBuilder_ !=
null) {
893 result.generalConstraint_ = minConstraintBuilder_.build();
895 if (generalConstraintCase_ == 9 &&
896 maxConstraintBuilder_ !=
null) {
897 result.generalConstraint_ = maxConstraintBuilder_.build();
903 if (other instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto) {
904 return mergeFrom((com.google.ortools.linearsolver.MPGeneralConstraintProto)other);
906 super.mergeFrom(other);
912 if (other == com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance())
return this;
913 if (other.hasName()) {
915 bitField0_ |= 0x00000001;
918 switch (other.getGeneralConstraintCase()) {
919 case INDICATOR_CONSTRAINT: {
923 case SOS_CONSTRAINT: {
927 case QUADRATIC_CONSTRAINT: {
931 case ABS_CONSTRAINT: {
935 case AND_CONSTRAINT: {
939 case OR_CONSTRAINT: {
943 case MIN_CONSTRAINT: {
947 case MAX_CONSTRAINT: {
951 case GENERALCONSTRAINT_NOT_SET: {
955 this.mergeUnknownFields(other.getUnknownFields());
967 com.google.protobuf.CodedInputStream input,
968 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
969 throws java.io.IOException {
970 if (extensionRegistry ==
null) {
971 throw new java.lang.NullPointerException();
974 boolean done =
false;
976 int tag = input.readTag();
982 name_ = input.readBytes();
983 bitField0_ |= 0x00000001;
988 getIndicatorConstraintFieldBuilder().getBuilder(),
990 generalConstraintCase_ = 2;
995 getSosConstraintFieldBuilder().getBuilder(),
997 generalConstraintCase_ = 3;
1002 getQuadraticConstraintFieldBuilder().getBuilder(),
1004 generalConstraintCase_ = 4;
1009 getAbsConstraintFieldBuilder().getBuilder(),
1011 generalConstraintCase_ = 5;
1016 getAndConstraintFieldBuilder().getBuilder(),
1018 generalConstraintCase_ = 6;
1023 getOrConstraintFieldBuilder().getBuilder(),
1025 generalConstraintCase_ = 7;
1030 getMinConstraintFieldBuilder().getBuilder(),
1032 generalConstraintCase_ = 8;
1037 getMaxConstraintFieldBuilder().getBuilder(),
1039 generalConstraintCase_ = 9;
1043 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1050 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1051 throw e.unwrapIOException();
1057 private int generalConstraintCase_ = 0;
1058 private java.lang.Object generalConstraint_;
1062 generalConstraintCase_);
1066 generalConstraintCase_ = 0;
1067 generalConstraint_ =
null;
1072 private int bitField0_;
1074 private java.lang.Object name_ =
"";
1084 return ((bitField0_ & 0x00000001) != 0);
1095 java.lang.Object ref = name_;
1096 if (!(ref instanceof java.lang.String)) {
1097 com.google.protobuf.ByteString bs =
1098 (com.google.protobuf.ByteString) ref;
1099 java.lang.String s = bs.toStringUtf8();
1100 if (bs.isValidUtf8()) {
1105 return (java.lang.String) ref;
1116 public com.google.protobuf.ByteString
1118 java.lang.Object ref = name_;
1119 if (ref instanceof String) {
1120 com.google.protobuf.ByteString b =
1121 com.google.protobuf.ByteString.copyFromUtf8(
1122 (java.lang.String) ref);
1126 return (com.google.protobuf.ByteString) ref;
1139 java.lang.String value) {
1140 if (value ==
null) {
throw new NullPointerException(); }
1142 bitField0_ |= 0x00000001;
1156 bitField0_ = (bitField0_ & ~0x00000001);
1170 com.google.protobuf.ByteString value) {
1171 if (value ==
null) {
throw new NullPointerException(); }
1173 bitField0_ |= 0x00000001;
1178 private com.google.protobuf.SingleFieldBuilder<
1179 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder> indicatorConstraintBuilder_;
1186 return generalConstraintCase_ == 2;
1194 if (indicatorConstraintBuilder_ ==
null) {
1195 if (generalConstraintCase_ == 2) {
1196 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1198 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1200 if (generalConstraintCase_ == 2) {
1201 return indicatorConstraintBuilder_.getMessage();
1203 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1210 if (indicatorConstraintBuilder_ ==
null) {
1211 if (value ==
null) {
1212 throw new NullPointerException();
1214 generalConstraint_ = value;
1217 indicatorConstraintBuilder_.setMessage(value);
1219 generalConstraintCase_ = 2;
1226 com.google.ortools.linearsolver.MPIndicatorConstraint.Builder builderForValue) {
1227 if (indicatorConstraintBuilder_ ==
null) {
1228 generalConstraint_ = builderForValue.build();
1231 indicatorConstraintBuilder_.setMessage(builderForValue.build());
1233 generalConstraintCase_ = 2;
1240 if (indicatorConstraintBuilder_ ==
null) {
1241 if (generalConstraintCase_ == 2 &&
1242 generalConstraint_ != com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance()) {
1243 generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.newBuilder((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_)
1244 .mergeFrom(value).buildPartial();
1246 generalConstraint_ = value;
1250 if (generalConstraintCase_ == 2) {
1251 indicatorConstraintBuilder_.mergeFrom(value);
1253 indicatorConstraintBuilder_.setMessage(value);
1256 generalConstraintCase_ = 2;
1263 if (indicatorConstraintBuilder_ ==
null) {
1264 if (generalConstraintCase_ == 2) {
1265 generalConstraintCase_ = 0;
1266 generalConstraint_ =
null;
1270 if (generalConstraintCase_ == 2) {
1271 generalConstraintCase_ = 0;
1272 generalConstraint_ =
null;
1274 indicatorConstraintBuilder_.clear();
1282 return getIndicatorConstraintFieldBuilder().getBuilder();
1289 if ((generalConstraintCase_ == 2) && (indicatorConstraintBuilder_ !=
null)) {
1290 return indicatorConstraintBuilder_.getMessageOrBuilder();
1292 if (generalConstraintCase_ == 2) {
1293 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1295 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1301 private com.google.protobuf.SingleFieldBuilder<
1302 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>
1303 getIndicatorConstraintFieldBuilder() {
1304 if (indicatorConstraintBuilder_ ==
null) {
1305 if (!(generalConstraintCase_ == 2)) {
1306 generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1308 indicatorConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1309 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>(
1310 (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_,
1311 getParentForChildren(),
1313 generalConstraint_ =
null;
1315 generalConstraintCase_ = 2;
1317 return indicatorConstraintBuilder_;
1320 private com.google.protobuf.SingleFieldBuilder<
1321 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder> sosConstraintBuilder_;
1328 return generalConstraintCase_ == 3;
1336 if (sosConstraintBuilder_ ==
null) {
1337 if (generalConstraintCase_ == 3) {
1338 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1340 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1342 if (generalConstraintCase_ == 3) {
1343 return sosConstraintBuilder_.getMessage();
1345 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1352 if (sosConstraintBuilder_ ==
null) {
1353 if (value ==
null) {
1354 throw new NullPointerException();
1356 generalConstraint_ = value;
1359 sosConstraintBuilder_.setMessage(value);
1361 generalConstraintCase_ = 3;
1368 com.google.ortools.linearsolver.MPSosConstraint.Builder builderForValue) {
1369 if (sosConstraintBuilder_ ==
null) {
1370 generalConstraint_ = builderForValue.build();
1373 sosConstraintBuilder_.setMessage(builderForValue.build());
1375 generalConstraintCase_ = 3;
1382 if (sosConstraintBuilder_ ==
null) {
1383 if (generalConstraintCase_ == 3 &&
1384 generalConstraint_ != com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance()) {
1385 generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.newBuilder((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_)
1386 .mergeFrom(value).buildPartial();
1388 generalConstraint_ = value;
1392 if (generalConstraintCase_ == 3) {
1393 sosConstraintBuilder_.mergeFrom(value);
1395 sosConstraintBuilder_.setMessage(value);
1398 generalConstraintCase_ = 3;
1405 if (sosConstraintBuilder_ ==
null) {
1406 if (generalConstraintCase_ == 3) {
1407 generalConstraintCase_ = 0;
1408 generalConstraint_ =
null;
1412 if (generalConstraintCase_ == 3) {
1413 generalConstraintCase_ = 0;
1414 generalConstraint_ =
null;
1416 sosConstraintBuilder_.clear();
1424 return getSosConstraintFieldBuilder().getBuilder();
1431 if ((generalConstraintCase_ == 3) && (sosConstraintBuilder_ !=
null)) {
1432 return sosConstraintBuilder_.getMessageOrBuilder();
1434 if (generalConstraintCase_ == 3) {
1435 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1437 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1443 private com.google.protobuf.SingleFieldBuilder<
1444 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>
1445 getSosConstraintFieldBuilder() {
1446 if (sosConstraintBuilder_ ==
null) {
1447 if (!(generalConstraintCase_ == 3)) {
1448 generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1450 sosConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1451 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>(
1452 (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_,
1453 getParentForChildren(),
1455 generalConstraint_ =
null;
1457 generalConstraintCase_ = 3;
1459 return sosConstraintBuilder_;
1462 private com.google.protobuf.SingleFieldBuilder<
1463 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder> quadraticConstraintBuilder_;
1470 return generalConstraintCase_ == 4;
1478 if (quadraticConstraintBuilder_ ==
null) {
1479 if (generalConstraintCase_ == 4) {
1480 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1482 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1484 if (generalConstraintCase_ == 4) {
1485 return quadraticConstraintBuilder_.getMessage();
1487 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1494 if (quadraticConstraintBuilder_ ==
null) {
1495 if (value ==
null) {
1496 throw new NullPointerException();
1498 generalConstraint_ = value;
1501 quadraticConstraintBuilder_.setMessage(value);
1503 generalConstraintCase_ = 4;
1510 com.google.ortools.linearsolver.MPQuadraticConstraint.Builder builderForValue) {
1511 if (quadraticConstraintBuilder_ ==
null) {
1512 generalConstraint_ = builderForValue.build();
1515 quadraticConstraintBuilder_.setMessage(builderForValue.build());
1517 generalConstraintCase_ = 4;
1524 if (quadraticConstraintBuilder_ ==
null) {
1525 if (generalConstraintCase_ == 4 &&
1526 generalConstraint_ != com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance()) {
1527 generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.newBuilder((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_)
1528 .mergeFrom(value).buildPartial();
1530 generalConstraint_ = value;
1534 if (generalConstraintCase_ == 4) {
1535 quadraticConstraintBuilder_.mergeFrom(value);
1537 quadraticConstraintBuilder_.setMessage(value);
1540 generalConstraintCase_ = 4;
1547 if (quadraticConstraintBuilder_ ==
null) {
1548 if (generalConstraintCase_ == 4) {
1549 generalConstraintCase_ = 0;
1550 generalConstraint_ =
null;
1554 if (generalConstraintCase_ == 4) {
1555 generalConstraintCase_ = 0;
1556 generalConstraint_ =
null;
1558 quadraticConstraintBuilder_.clear();
1566 return getQuadraticConstraintFieldBuilder().getBuilder();
1573 if ((generalConstraintCase_ == 4) && (quadraticConstraintBuilder_ !=
null)) {
1574 return quadraticConstraintBuilder_.getMessageOrBuilder();
1576 if (generalConstraintCase_ == 4) {
1577 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1579 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1585 private com.google.protobuf.SingleFieldBuilder<
1586 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>
1587 getQuadraticConstraintFieldBuilder() {
1588 if (quadraticConstraintBuilder_ ==
null) {
1589 if (!(generalConstraintCase_ == 4)) {
1590 generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1592 quadraticConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1593 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>(
1594 (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_,
1595 getParentForChildren(),
1597 generalConstraint_ =
null;
1599 generalConstraintCase_ = 4;
1601 return quadraticConstraintBuilder_;
1604 private com.google.protobuf.SingleFieldBuilder<
1605 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder> absConstraintBuilder_;
1612 return generalConstraintCase_ == 5;
1620 if (absConstraintBuilder_ ==
null) {
1621 if (generalConstraintCase_ == 5) {
1622 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1624 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1626 if (generalConstraintCase_ == 5) {
1627 return absConstraintBuilder_.getMessage();
1629 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1636 if (absConstraintBuilder_ ==
null) {
1637 if (value ==
null) {
1638 throw new NullPointerException();
1640 generalConstraint_ = value;
1643 absConstraintBuilder_.setMessage(value);
1645 generalConstraintCase_ = 5;
1652 com.google.ortools.linearsolver.MPAbsConstraint.Builder builderForValue) {
1653 if (absConstraintBuilder_ ==
null) {
1654 generalConstraint_ = builderForValue.build();
1657 absConstraintBuilder_.setMessage(builderForValue.build());
1659 generalConstraintCase_ = 5;
1666 if (absConstraintBuilder_ ==
null) {
1667 if (generalConstraintCase_ == 5 &&
1668 generalConstraint_ != com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance()) {
1669 generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.newBuilder((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_)
1670 .mergeFrom(value).buildPartial();
1672 generalConstraint_ = value;
1676 if (generalConstraintCase_ == 5) {
1677 absConstraintBuilder_.mergeFrom(value);
1679 absConstraintBuilder_.setMessage(value);
1682 generalConstraintCase_ = 5;
1689 if (absConstraintBuilder_ ==
null) {
1690 if (generalConstraintCase_ == 5) {
1691 generalConstraintCase_ = 0;
1692 generalConstraint_ =
null;
1696 if (generalConstraintCase_ == 5) {
1697 generalConstraintCase_ = 0;
1698 generalConstraint_ =
null;
1700 absConstraintBuilder_.clear();
1708 return getAbsConstraintFieldBuilder().getBuilder();
1715 if ((generalConstraintCase_ == 5) && (absConstraintBuilder_ !=
null)) {
1716 return absConstraintBuilder_.getMessageOrBuilder();
1718 if (generalConstraintCase_ == 5) {
1719 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1721 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1727 private com.google.protobuf.SingleFieldBuilder<
1728 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>
1729 getAbsConstraintFieldBuilder() {
1730 if (absConstraintBuilder_ ==
null) {
1731 if (!(generalConstraintCase_ == 5)) {
1732 generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1734 absConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1735 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>(
1736 (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_,
1737 getParentForChildren(),
1739 generalConstraint_ =
null;
1741 generalConstraintCase_ = 5;
1743 return absConstraintBuilder_;
1746 private com.google.protobuf.SingleFieldBuilder<
1747 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> andConstraintBuilder_;
1759 return generalConstraintCase_ == 6;
1772 if (andConstraintBuilder_ ==
null) {
1773 if (generalConstraintCase_ == 6) {
1774 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1776 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1778 if (generalConstraintCase_ == 6) {
1779 return andConstraintBuilder_.getMessage();
1781 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1793 if (andConstraintBuilder_ ==
null) {
1794 if (value ==
null) {
1795 throw new NullPointerException();
1797 generalConstraint_ = value;
1800 andConstraintBuilder_.setMessage(value);
1802 generalConstraintCase_ = 6;
1814 com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) {
1815 if (andConstraintBuilder_ ==
null) {
1816 generalConstraint_ = builderForValue.build();
1819 andConstraintBuilder_.setMessage(builderForValue.build());
1821 generalConstraintCase_ = 6;
1833 if (andConstraintBuilder_ ==
null) {
1834 if (generalConstraintCase_ == 6 &&
1835 generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) {
1836 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_)
1837 .mergeFrom(value).buildPartial();
1839 generalConstraint_ = value;
1843 if (generalConstraintCase_ == 6) {
1844 andConstraintBuilder_.mergeFrom(value);
1846 andConstraintBuilder_.setMessage(value);
1849 generalConstraintCase_ = 6;
1861 if (andConstraintBuilder_ ==
null) {
1862 if (generalConstraintCase_ == 6) {
1863 generalConstraintCase_ = 0;
1864 generalConstraint_ =
null;
1868 if (generalConstraintCase_ == 6) {
1869 generalConstraintCase_ = 0;
1870 generalConstraint_ =
null;
1872 andConstraintBuilder_.clear();
1885 return getAndConstraintFieldBuilder().getBuilder();
1897 if ((generalConstraintCase_ == 6) && (andConstraintBuilder_ !=
null)) {
1898 return andConstraintBuilder_.getMessageOrBuilder();
1900 if (generalConstraintCase_ == 6) {
1901 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1903 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1914 private com.google.protobuf.SingleFieldBuilder<
1915 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>
1916 getAndConstraintFieldBuilder() {
1917 if (andConstraintBuilder_ ==
null) {
1918 if (!(generalConstraintCase_ == 6)) {
1919 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1921 andConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1922 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>(
1923 (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
1924 getParentForChildren(),
1926 generalConstraint_ =
null;
1928 generalConstraintCase_ = 6;
1930 return andConstraintBuilder_;
1933 private com.google.protobuf.SingleFieldBuilder<
1934 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> orConstraintBuilder_;
1946 return generalConstraintCase_ == 7;
1959 if (orConstraintBuilder_ ==
null) {
1960 if (generalConstraintCase_ == 7) {
1961 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1963 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1965 if (generalConstraintCase_ == 7) {
1966 return orConstraintBuilder_.getMessage();
1968 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1980 if (orConstraintBuilder_ ==
null) {
1981 if (value ==
null) {
1982 throw new NullPointerException();
1984 generalConstraint_ = value;
1987 orConstraintBuilder_.setMessage(value);
1989 generalConstraintCase_ = 7;
2001 com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) {
2002 if (orConstraintBuilder_ ==
null) {
2003 generalConstraint_ = builderForValue.build();
2006 orConstraintBuilder_.setMessage(builderForValue.build());
2008 generalConstraintCase_ = 7;
2020 if (orConstraintBuilder_ ==
null) {
2021 if (generalConstraintCase_ == 7 &&
2022 generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) {
2023 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_)
2024 .mergeFrom(value).buildPartial();
2026 generalConstraint_ = value;
2030 if (generalConstraintCase_ == 7) {
2031 orConstraintBuilder_.mergeFrom(value);
2033 orConstraintBuilder_.setMessage(value);
2036 generalConstraintCase_ = 7;
2048 if (orConstraintBuilder_ ==
null) {
2049 if (generalConstraintCase_ == 7) {
2050 generalConstraintCase_ = 0;
2051 generalConstraint_ =
null;
2055 if (generalConstraintCase_ == 7) {
2056 generalConstraintCase_ = 0;
2057 generalConstraint_ =
null;
2059 orConstraintBuilder_.clear();
2072 return getOrConstraintFieldBuilder().getBuilder();
2084 if ((generalConstraintCase_ == 7) && (orConstraintBuilder_ !=
null)) {
2085 return orConstraintBuilder_.getMessageOrBuilder();
2087 if (generalConstraintCase_ == 7) {
2088 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
2090 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
2101 private com.google.protobuf.SingleFieldBuilder<
2102 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>
2103 getOrConstraintFieldBuilder() {
2104 if (orConstraintBuilder_ ==
null) {
2105 if (!(generalConstraintCase_ == 7)) {
2106 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
2108 orConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2109 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>(
2110 (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
2111 getParentForChildren(),
2113 generalConstraint_ =
null;
2115 generalConstraintCase_ = 7;
2117 return orConstraintBuilder_;
2120 private com.google.protobuf.SingleFieldBuilder<
2121 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> minConstraintBuilder_;
2132 return generalConstraintCase_ == 8;
2144 if (minConstraintBuilder_ ==
null) {
2145 if (generalConstraintCase_ == 8) {
2146 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2148 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2150 if (generalConstraintCase_ == 8) {
2151 return minConstraintBuilder_.getMessage();
2153 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2164 if (minConstraintBuilder_ ==
null) {
2165 if (value ==
null) {
2166 throw new NullPointerException();
2168 generalConstraint_ = value;
2171 minConstraintBuilder_.setMessage(value);
2173 generalConstraintCase_ = 8;
2184 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) {
2185 if (minConstraintBuilder_ ==
null) {
2186 generalConstraint_ = builderForValue.build();
2189 minConstraintBuilder_.setMessage(builderForValue.build());
2191 generalConstraintCase_ = 8;
2202 if (minConstraintBuilder_ ==
null) {
2203 if (generalConstraintCase_ == 8 &&
2204 generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) {
2205 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_)
2206 .mergeFrom(value).buildPartial();
2208 generalConstraint_ = value;
2212 if (generalConstraintCase_ == 8) {
2213 minConstraintBuilder_.mergeFrom(value);
2215 minConstraintBuilder_.setMessage(value);
2218 generalConstraintCase_ = 8;
2229 if (minConstraintBuilder_ ==
null) {
2230 if (generalConstraintCase_ == 8) {
2231 generalConstraintCase_ = 0;
2232 generalConstraint_ =
null;
2236 if (generalConstraintCase_ == 8) {
2237 generalConstraintCase_ = 0;
2238 generalConstraint_ =
null;
2240 minConstraintBuilder_.clear();
2252 return getMinConstraintFieldBuilder().getBuilder();
2263 if ((generalConstraintCase_ == 8) && (minConstraintBuilder_ !=
null)) {
2264 return minConstraintBuilder_.getMessageOrBuilder();
2266 if (generalConstraintCase_ == 8) {
2267 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2269 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2279 private com.google.protobuf.SingleFieldBuilder<
2280 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>
2281 getMinConstraintFieldBuilder() {
2282 if (minConstraintBuilder_ ==
null) {
2283 if (!(generalConstraintCase_ == 8)) {
2284 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2286 minConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2287 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>(
2288 (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_,
2289 getParentForChildren(),
2291 generalConstraint_ =
null;
2293 generalConstraintCase_ = 8;
2295 return minConstraintBuilder_;
2298 private com.google.protobuf.SingleFieldBuilder<
2299 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> maxConstraintBuilder_;
2310 return generalConstraintCase_ == 9;
2322 if (maxConstraintBuilder_ ==
null) {
2323 if (generalConstraintCase_ == 9) {
2324 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2326 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2328 if (generalConstraintCase_ == 9) {
2329 return maxConstraintBuilder_.getMessage();
2331 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2342 if (maxConstraintBuilder_ ==
null) {
2343 if (value ==
null) {
2344 throw new NullPointerException();
2346 generalConstraint_ = value;
2349 maxConstraintBuilder_.setMessage(value);
2351 generalConstraintCase_ = 9;
2362 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) {
2363 if (maxConstraintBuilder_ ==
null) {
2364 generalConstraint_ = builderForValue.build();
2367 maxConstraintBuilder_.setMessage(builderForValue.build());
2369 generalConstraintCase_ = 9;
2380 if (maxConstraintBuilder_ ==
null) {
2381 if (generalConstraintCase_ == 9 &&
2382 generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) {
2383 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_)
2384 .mergeFrom(value).buildPartial();
2386 generalConstraint_ = value;
2390 if (generalConstraintCase_ == 9) {
2391 maxConstraintBuilder_.mergeFrom(value);
2393 maxConstraintBuilder_.setMessage(value);
2396 generalConstraintCase_ = 9;
2407 if (maxConstraintBuilder_ ==
null) {
2408 if (generalConstraintCase_ == 9) {
2409 generalConstraintCase_ = 0;
2410 generalConstraint_ =
null;
2414 if (generalConstraintCase_ == 9) {
2415 generalConstraintCase_ = 0;
2416 generalConstraint_ =
null;
2418 maxConstraintBuilder_.clear();
2430 return getMaxConstraintFieldBuilder().getBuilder();
2441 if ((generalConstraintCase_ == 9) && (maxConstraintBuilder_ !=
null)) {
2442 return maxConstraintBuilder_.getMessageOrBuilder();
2444 if (generalConstraintCase_ == 9) {
2445 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2447 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2457 private com.google.protobuf.SingleFieldBuilder<
2458 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>
2459 getMaxConstraintFieldBuilder() {
2460 if (maxConstraintBuilder_ ==
null) {
2461 if (!(generalConstraintCase_ == 9)) {
2462 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2464 maxConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2465 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>(
2466 (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_,
2467 getParentForChildren(),
2469 generalConstraint_ =
null;
2471 generalConstraintCase_ = 9;
2473 return maxConstraintBuilder_;