908 public static final class Builder
extends
909 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
912 public static final com.google.protobuf.Descriptors.Descriptor
914 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
918 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
920 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
921 .ensureFieldAccessorsInitialized(
922 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
927 maybeForceBuilderInitialization();
931 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
933 maybeForceBuilderInitialization();
935 private void maybeForceBuilderInitialization() {
936 if (com.google.protobuf.GeneratedMessage
937 .alwaysUseFieldBuilders) {
938 internalGetVariablesFieldBuilder();
939 internalGetConstraintsFieldBuilder();
940 internalGetObjectiveFieldBuilder();
941 internalGetFloatingPointObjectiveFieldBuilder();
942 internalGetSearchStrategyFieldBuilder();
943 internalGetSolutionHintFieldBuilder();
944 internalGetSymmetryFieldBuilder();
952 if (variablesBuilder_ ==
null) {
953 variables_ = java.util.Collections.emptyList();
956 variablesBuilder_.clear();
958 bitField0_ = (bitField0_ & ~0x00000002);
959 if (constraintsBuilder_ ==
null) {
960 constraints_ = java.util.Collections.emptyList();
963 constraintsBuilder_.clear();
965 bitField0_ = (bitField0_ & ~0x00000004);
967 if (objectiveBuilder_ !=
null) {
968 objectiveBuilder_.dispose();
969 objectiveBuilder_ =
null;
971 floatingPointObjective_ =
null;
972 if (floatingPointObjectiveBuilder_ !=
null) {
973 floatingPointObjectiveBuilder_.dispose();
974 floatingPointObjectiveBuilder_ =
null;
976 if (searchStrategyBuilder_ ==
null) {
977 searchStrategy_ = java.util.Collections.emptyList();
979 searchStrategy_ =
null;
980 searchStrategyBuilder_.clear();
982 bitField0_ = (bitField0_ & ~0x00000020);
983 solutionHint_ =
null;
984 if (solutionHintBuilder_ !=
null) {
985 solutionHintBuilder_.dispose();
986 solutionHintBuilder_ =
null;
988 assumptions_ = emptyIntList();
990 if (symmetryBuilder_ !=
null) {
991 symmetryBuilder_.dispose();
992 symmetryBuilder_ =
null;
998 public com.google.protobuf.Descriptors.Descriptor
1000 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
1005 return com.google.ortools.sat.CpModelProto.getDefaultInstance();
1012 throw newUninitializedMessageException(result);
1020 buildPartialRepeatedFields(result);
1021 if (bitField0_ != 0) { buildPartial0(result); }
1026 private void buildPartialRepeatedFields(com.google.ortools.sat.CpModelProto result) {
1027 if (variablesBuilder_ ==
null) {
1028 if (((bitField0_ & 0x00000002) != 0)) {
1029 variables_ = java.util.Collections.unmodifiableList(variables_);
1030 bitField0_ = (bitField0_ & ~0x00000002);
1032 result.variables_ = variables_;
1034 result.variables_ = variablesBuilder_.build();
1036 if (constraintsBuilder_ ==
null) {
1037 if (((bitField0_ & 0x00000004) != 0)) {
1038 constraints_ = java.util.Collections.unmodifiableList(constraints_);
1039 bitField0_ = (bitField0_ & ~0x00000004);
1041 result.constraints_ = constraints_;
1043 result.constraints_ = constraintsBuilder_.build();
1045 if (searchStrategyBuilder_ ==
null) {
1046 if (((bitField0_ & 0x00000020) != 0)) {
1047 searchStrategy_ = java.util.Collections.unmodifiableList(searchStrategy_);
1048 bitField0_ = (bitField0_ & ~0x00000020);
1050 result.searchStrategy_ = searchStrategy_;
1052 result.searchStrategy_ = searchStrategyBuilder_.build();
1056 private void buildPartial0(com.google.ortools.sat.CpModelProto result) {
1057 int from_bitField0_ = bitField0_;
1058 if (((from_bitField0_ & 0x00000001) != 0)) {
1059 result.name_ = name_;
1061 int to_bitField0_ = 0;
1062 if (((from_bitField0_ & 0x00000008) != 0)) {
1063 result.objective_ = objectiveBuilder_ ==
null
1065 : objectiveBuilder_.build();
1066 to_bitField0_ |= 0x00000001;
1068 if (((from_bitField0_ & 0x00000010) != 0)) {
1069 result.floatingPointObjective_ = floatingPointObjectiveBuilder_ ==
null
1070 ? floatingPointObjective_
1071 : floatingPointObjectiveBuilder_.build();
1072 to_bitField0_ |= 0x00000002;
1074 if (((from_bitField0_ & 0x00000040) != 0)) {
1075 result.solutionHint_ = solutionHintBuilder_ ==
null
1077 : solutionHintBuilder_.build();
1078 to_bitField0_ |= 0x00000004;
1080 if (((from_bitField0_ & 0x00000080) != 0)) {
1081 assumptions_.makeImmutable();
1082 result.assumptions_ = assumptions_;
1084 if (((from_bitField0_ & 0x00000100) != 0)) {
1085 result.symmetry_ = symmetryBuilder_ ==
null
1087 : symmetryBuilder_.build();
1088 to_bitField0_ |= 0x00000008;
1090 result.bitField0_ |= to_bitField0_;
1094 public Builder
mergeFrom(com.google.protobuf.Message other) {
1095 if (other instanceof com.google.ortools.sat.CpModelProto) {
1096 return mergeFrom((com.google.ortools.sat.CpModelProto)other);
1098 super.mergeFrom(other);
1103 public Builder
mergeFrom(com.google.ortools.sat.CpModelProto other) {
1104 if (other == com.google.ortools.sat.CpModelProto.getDefaultInstance())
return this;
1105 if (!other.getName().isEmpty()) {
1106 name_ = other.name_;
1107 bitField0_ |= 0x00000001;
1110 if (variablesBuilder_ ==
null) {
1111 if (!other.variables_.isEmpty()) {
1112 if (variables_.isEmpty()) {
1113 variables_ = other.variables_;
1114 bitField0_ = (bitField0_ & ~0x00000002);
1116 ensureVariablesIsMutable();
1117 variables_.addAll(other.variables_);
1122 if (!other.variables_.isEmpty()) {
1123 if (variablesBuilder_.isEmpty()) {
1124 variablesBuilder_.dispose();
1125 variablesBuilder_ =
null;
1126 variables_ = other.variables_;
1127 bitField0_ = (bitField0_ & ~0x00000002);
1129 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1130 internalGetVariablesFieldBuilder() :
null;
1132 variablesBuilder_.addAllMessages(other.variables_);
1136 if (constraintsBuilder_ ==
null) {
1137 if (!other.constraints_.isEmpty()) {
1138 if (constraints_.isEmpty()) {
1139 constraints_ = other.constraints_;
1140 bitField0_ = (bitField0_ & ~0x00000004);
1142 ensureConstraintsIsMutable();
1143 constraints_.addAll(other.constraints_);
1148 if (!other.constraints_.isEmpty()) {
1149 if (constraintsBuilder_.isEmpty()) {
1150 constraintsBuilder_.dispose();
1151 constraintsBuilder_ =
null;
1152 constraints_ = other.constraints_;
1153 bitField0_ = (bitField0_ & ~0x00000004);
1154 constraintsBuilder_ =
1155 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1156 internalGetConstraintsFieldBuilder() :
null;
1158 constraintsBuilder_.addAllMessages(other.constraints_);
1162 if (other.hasObjective()) {
1165 if (other.hasFloatingPointObjective()) {
1168 if (searchStrategyBuilder_ ==
null) {
1169 if (!other.searchStrategy_.isEmpty()) {
1170 if (searchStrategy_.isEmpty()) {
1171 searchStrategy_ = other.searchStrategy_;
1172 bitField0_ = (bitField0_ & ~0x00000020);
1174 ensureSearchStrategyIsMutable();
1175 searchStrategy_.addAll(other.searchStrategy_);
1180 if (!other.searchStrategy_.isEmpty()) {
1181 if (searchStrategyBuilder_.isEmpty()) {
1182 searchStrategyBuilder_.dispose();
1183 searchStrategyBuilder_ =
null;
1184 searchStrategy_ = other.searchStrategy_;
1185 bitField0_ = (bitField0_ & ~0x00000020);
1186 searchStrategyBuilder_ =
1187 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1188 internalGetSearchStrategyFieldBuilder() :
null;
1190 searchStrategyBuilder_.addAllMessages(other.searchStrategy_);
1194 if (other.hasSolutionHint()) {
1197 if (!other.assumptions_.isEmpty()) {
1198 if (assumptions_.isEmpty()) {
1199 assumptions_ = other.assumptions_;
1200 assumptions_.makeImmutable();
1201 bitField0_ |= 0x00000080;
1203 ensureAssumptionsIsMutable();
1204 assumptions_.addAll(other.assumptions_);
1208 if (other.hasSymmetry()) {
1211 this.mergeUnknownFields(other.getUnknownFields());
1223 com.google.protobuf.CodedInputStream input,
1224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1225 throws java.io.IOException {
1226 if (extensionRegistry ==
null) {
1227 throw new java.lang.NullPointerException();
1230 boolean done =
false;
1232 int tag = input.readTag();
1238 name_ = input.readStringRequireUtf8();
1239 bitField0_ |= 0x00000001;
1245 com.google.ortools.sat.IntegerVariableProto.parser(),
1247 if (variablesBuilder_ ==
null) {
1248 ensureVariablesIsMutable();
1251 variablesBuilder_.addMessage(m);
1258 com.google.ortools.sat.ConstraintProto.parser(),
1260 if (constraintsBuilder_ ==
null) {
1261 ensureConstraintsIsMutable();
1262 constraints_.add(m);
1264 constraintsBuilder_.addMessage(m);
1270 internalGetObjectiveFieldBuilder().getBuilder(),
1272 bitField0_ |= 0x00000008;
1278 com.google.ortools.sat.DecisionStrategyProto.parser(),
1280 if (searchStrategyBuilder_ ==
null) {
1281 ensureSearchStrategyIsMutable();
1282 searchStrategy_.add(m);
1284 searchStrategyBuilder_.addMessage(m);
1290 internalGetSolutionHintFieldBuilder().getBuilder(),
1292 bitField0_ |= 0x00000040;
1296 int v = input.readInt32();
1297 ensureAssumptionsIsMutable();
1298 assumptions_.addInt(v);
1302 int length = input.readRawVarint32();
1303 int limit = input.pushLimit(length);
1304 ensureAssumptionsIsMutable();
1305 while (input.getBytesUntilLimit() > 0) {
1306 assumptions_.addInt(input.readInt32());
1308 input.popLimit(limit);
1313 internalGetSymmetryFieldBuilder().getBuilder(),
1315 bitField0_ |= 0x00000100;
1320 internalGetFloatingPointObjectiveFieldBuilder().getBuilder(),
1322 bitField0_ |= 0x00000010;
1326 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1333 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1334 throw e.unwrapIOException();
1340 private int bitField0_;
1342 private java.lang.Object name_ =
"";
1352 java.lang.Object ref = name_;
1353 if (!(ref instanceof java.lang.String)) {
1354 com.google.protobuf.ByteString bs =
1355 (com.google.protobuf.ByteString) ref;
1356 java.lang.String s = bs.toStringUtf8();
1360 return (java.lang.String) ref;
1371 public com.google.protobuf.ByteString
1373 java.lang.Object ref = name_;
1374 if (ref instanceof String) {
1375 com.google.protobuf.ByteString b =
1376 com.google.protobuf.ByteString.copyFromUtf8(
1377 (java.lang.String) ref);
1381 return (com.google.protobuf.ByteString) ref;
1394 java.lang.String value) {
1395 if (value ==
null) {
throw new NullPointerException(); }
1397 bitField0_ |= 0x00000001;
1411 bitField0_ = (bitField0_ & ~0x00000001);
1425 com.google.protobuf.ByteString value) {
1426 if (value ==
null) {
throw new NullPointerException(); }
1427 checkByteStringIsUtf8(value);
1429 bitField0_ |= 0x00000001;
1434 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_ =
1435 java.util.Collections.emptyList();
1436 private void ensureVariablesIsMutable() {
1437 if (!((bitField0_ & 0x00000002) != 0)) {
1438 variables_ =
new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(variables_);
1439 bitField0_ |= 0x00000002;
1443 private com.google.protobuf.RepeatedFieldBuilder<
1444 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder> variablesBuilder_;
1454 if (variablesBuilder_ ==
null) {
1455 return java.util.Collections.unmodifiableList(variables_);
1457 return variablesBuilder_.getMessageList();
1468 if (variablesBuilder_ ==
null) {
1469 return variables_.size();
1471 return variablesBuilder_.getCount();
1482 if (variablesBuilder_ ==
null) {
1483 return variables_.get(index);
1485 return variablesBuilder_.getMessage(index);
1496 int index, com.google.ortools.sat.IntegerVariableProto value) {
1497 if (variablesBuilder_ ==
null) {
1498 if (value ==
null) {
1499 throw new NullPointerException();
1501 ensureVariablesIsMutable();
1502 variables_.set(index, value);
1505 variablesBuilder_.setMessage(index, value);
1517 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1518 if (variablesBuilder_ ==
null) {
1519 ensureVariablesIsMutable();
1520 variables_.set(index, builderForValue.build());
1523 variablesBuilder_.setMessage(index, builderForValue.build());
1534 public Builder
addVariables(com.google.ortools.sat.IntegerVariableProto value) {
1535 if (variablesBuilder_ ==
null) {
1536 if (value ==
null) {
1537 throw new NullPointerException();
1539 ensureVariablesIsMutable();
1540 variables_.add(value);
1543 variablesBuilder_.addMessage(value);
1555 int index, com.google.ortools.sat.IntegerVariableProto value) {
1556 if (variablesBuilder_ ==
null) {
1557 if (value ==
null) {
1558 throw new NullPointerException();
1560 ensureVariablesIsMutable();
1561 variables_.add(index, value);
1564 variablesBuilder_.addMessage(index, value);
1576 com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1577 if (variablesBuilder_ ==
null) {
1578 ensureVariablesIsMutable();
1579 variables_.add(builderForValue.build());
1582 variablesBuilder_.addMessage(builderForValue.build());
1594 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1595 if (variablesBuilder_ ==
null) {
1596 ensureVariablesIsMutable();
1597 variables_.add(index, builderForValue.build());
1600 variablesBuilder_.addMessage(index, builderForValue.build());
1612 java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
1613 if (variablesBuilder_ ==
null) {
1614 ensureVariablesIsMutable();
1615 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1616 values, variables_);
1619 variablesBuilder_.addAllMessages(values);
1631 if (variablesBuilder_ ==
null) {
1632 variables_ = java.util.Collections.emptyList();
1633 bitField0_ = (bitField0_ & ~0x00000002);
1636 variablesBuilder_.clear();
1648 if (variablesBuilder_ ==
null) {
1649 ensureVariablesIsMutable();
1650 variables_.remove(index);
1653 variablesBuilder_.remove(index);
1666 return internalGetVariablesFieldBuilder().getBuilder(index);
1677 if (variablesBuilder_ ==
null) {
1678 return variables_.get(index); }
else {
1679 return variablesBuilder_.getMessageOrBuilder(index);
1689 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1691 if (variablesBuilder_ !=
null) {
1692 return variablesBuilder_.getMessageOrBuilderList();
1694 return java.util.Collections.unmodifiableList(variables_);
1705 return internalGetVariablesFieldBuilder().addBuilder(
1706 com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1717 return internalGetVariablesFieldBuilder().addBuilder(
1718 index, com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1727 public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
1729 return internalGetVariablesFieldBuilder().getBuilderList();
1731 private com.google.protobuf.RepeatedFieldBuilder<
1732 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1733 internalGetVariablesFieldBuilder() {
1734 if (variablesBuilder_ ==
null) {
1735 variablesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1736 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>(
1738 ((bitField0_ & 0x00000002) != 0),
1739 getParentForChildren(),
1743 return variablesBuilder_;
1746 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_ =
1747 java.util.Collections.emptyList();
1748 private void ensureConstraintsIsMutable() {
1749 if (!((bitField0_ & 0x00000004) != 0)) {
1750 constraints_ =
new java.util.ArrayList<com.google.ortools.sat.ConstraintProto>(constraints_);
1751 bitField0_ |= 0x00000004;
1755 private com.google.protobuf.RepeatedFieldBuilder<
1756 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder> constraintsBuilder_;
1762 if (constraintsBuilder_ ==
null) {
1763 return java.util.Collections.unmodifiableList(constraints_);
1765 return constraintsBuilder_.getMessageList();
1772 if (constraintsBuilder_ ==
null) {
1773 return constraints_.size();
1775 return constraintsBuilder_.getCount();
1782 if (constraintsBuilder_ ==
null) {
1783 return constraints_.get(index);
1785 return constraintsBuilder_.getMessage(index);
1792 int index, com.google.ortools.sat.ConstraintProto value) {
1793 if (constraintsBuilder_ ==
null) {
1794 if (value ==
null) {
1795 throw new NullPointerException();
1797 ensureConstraintsIsMutable();
1798 constraints_.set(index, value);
1801 constraintsBuilder_.setMessage(index, value);
1809 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1810 if (constraintsBuilder_ ==
null) {
1811 ensureConstraintsIsMutable();
1812 constraints_.set(index, builderForValue.build());
1815 constraintsBuilder_.setMessage(index, builderForValue.build());
1823 if (constraintsBuilder_ ==
null) {
1824 if (value ==
null) {
1825 throw new NullPointerException();
1827 ensureConstraintsIsMutable();
1828 constraints_.add(value);
1831 constraintsBuilder_.addMessage(value);
1839 int index, com.google.ortools.sat.ConstraintProto value) {
1840 if (constraintsBuilder_ ==
null) {
1841 if (value ==
null) {
1842 throw new NullPointerException();
1844 ensureConstraintsIsMutable();
1845 constraints_.add(index, value);
1848 constraintsBuilder_.addMessage(index, value);
1856 com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1857 if (constraintsBuilder_ ==
null) {
1858 ensureConstraintsIsMutable();
1859 constraints_.add(builderForValue.build());
1862 constraintsBuilder_.addMessage(builderForValue.build());
1870 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1871 if (constraintsBuilder_ ==
null) {
1872 ensureConstraintsIsMutable();
1873 constraints_.add(index, builderForValue.build());
1876 constraintsBuilder_.addMessage(index, builderForValue.build());
1884 java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto> values) {
1885 if (constraintsBuilder_ ==
null) {
1886 ensureConstraintsIsMutable();
1887 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1888 values, constraints_);
1891 constraintsBuilder_.addAllMessages(values);
1899 if (constraintsBuilder_ ==
null) {
1900 constraints_ = java.util.Collections.emptyList();
1901 bitField0_ = (bitField0_ & ~0x00000004);
1904 constraintsBuilder_.clear();
1912 if (constraintsBuilder_ ==
null) {
1913 ensureConstraintsIsMutable();
1914 constraints_.remove(index);
1917 constraintsBuilder_.remove(index);
1926 return internalGetConstraintsFieldBuilder().getBuilder(index);
1933 if (constraintsBuilder_ ==
null) {
1934 return constraints_.get(index); }
else {
1935 return constraintsBuilder_.getMessageOrBuilder(index);
1941 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
1943 if (constraintsBuilder_ !=
null) {
1944 return constraintsBuilder_.getMessageOrBuilderList();
1946 return java.util.Collections.unmodifiableList(constraints_);
1953 return internalGetConstraintsFieldBuilder().addBuilder(
1954 com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1961 return internalGetConstraintsFieldBuilder().addBuilder(
1962 index, com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1967 public java.util.List<com.google.ortools.sat.ConstraintProto.Builder>
1969 return internalGetConstraintsFieldBuilder().getBuilderList();
1971 private com.google.protobuf.RepeatedFieldBuilder<
1972 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>
1973 internalGetConstraintsFieldBuilder() {
1974 if (constraintsBuilder_ ==
null) {
1975 constraintsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1976 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>(
1978 ((bitField0_ & 0x00000004) != 0),
1979 getParentForChildren(),
1981 constraints_ =
null;
1983 return constraintsBuilder_;
1987 private com.google.protobuf.SingleFieldBuilder<
1988 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder> objectiveBuilder_;
1998 return ((bitField0_ & 0x00000008) != 0);
2009 if (objectiveBuilder_ ==
null) {
2010 return objective_ ==
null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2012 return objectiveBuilder_.getMessage();
2022 public Builder
setObjective(com.google.ortools.sat.CpObjectiveProto value) {
2023 if (objectiveBuilder_ ==
null) {
2024 if (value ==
null) {
2025 throw new NullPointerException();
2029 objectiveBuilder_.setMessage(value);
2031 bitField0_ |= 0x00000008;
2043 com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
2044 if (objectiveBuilder_ ==
null) {
2045 objective_ = builderForValue.build();
2047 objectiveBuilder_.setMessage(builderForValue.build());
2049 bitField0_ |= 0x00000008;
2061 if (objectiveBuilder_ ==
null) {
2062 if (((bitField0_ & 0x00000008) != 0) &&
2063 objective_ !=
null &&
2064 objective_ != com.google.ortools.sat.CpObjectiveProto.getDefaultInstance()) {
2070 objectiveBuilder_.mergeFrom(value);
2072 if (objective_ !=
null) {
2073 bitField0_ |= 0x00000008;
2086 bitField0_ = (bitField0_ & ~0x00000008);
2088 if (objectiveBuilder_ !=
null) {
2089 objectiveBuilder_.dispose();
2090 objectiveBuilder_ =
null;
2103 bitField0_ |= 0x00000008;
2105 return internalGetObjectiveFieldBuilder().getBuilder();
2115 if (objectiveBuilder_ !=
null) {
2116 return objectiveBuilder_.getMessageOrBuilder();
2118 return objective_ ==
null ?
2119 com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2129 private com.google.protobuf.SingleFieldBuilder<
2130 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>
2131 internalGetObjectiveFieldBuilder() {
2132 if (objectiveBuilder_ ==
null) {
2133 objectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2134 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>(
2136 getParentForChildren(),
2140 return objectiveBuilder_;
2144 private com.google.protobuf.SingleFieldBuilder<
2145 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder> floatingPointObjectiveBuilder_;
2167 return ((bitField0_ & 0x00000010) != 0);
2190 if (floatingPointObjectiveBuilder_ ==
null) {
2191 return floatingPointObjective_ ==
null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2193 return floatingPointObjectiveBuilder_.getMessage();
2216 if (floatingPointObjectiveBuilder_ ==
null) {
2217 if (value ==
null) {
2218 throw new NullPointerException();
2220 floatingPointObjective_ = value;
2222 floatingPointObjectiveBuilder_.setMessage(value);
2224 bitField0_ |= 0x00000010;
2248 com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue) {
2249 if (floatingPointObjectiveBuilder_ ==
null) {
2250 floatingPointObjective_ = builderForValue.build();
2252 floatingPointObjectiveBuilder_.setMessage(builderForValue.build());
2254 bitField0_ |= 0x00000010;
2278 if (floatingPointObjectiveBuilder_ ==
null) {
2279 if (((bitField0_ & 0x00000010) != 0) &&
2280 floatingPointObjective_ !=
null &&
2281 floatingPointObjective_ != com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance()) {
2284 floatingPointObjective_ = value;
2287 floatingPointObjectiveBuilder_.mergeFrom(value);
2289 if (floatingPointObjective_ !=
null) {
2290 bitField0_ |= 0x00000010;
2315 bitField0_ = (bitField0_ & ~0x00000010);
2316 floatingPointObjective_ =
null;
2317 if (floatingPointObjectiveBuilder_ !=
null) {
2318 floatingPointObjectiveBuilder_.dispose();
2319 floatingPointObjectiveBuilder_ =
null;
2344 bitField0_ |= 0x00000010;
2346 return internalGetFloatingPointObjectiveFieldBuilder().getBuilder();
2368 if (floatingPointObjectiveBuilder_ !=
null) {
2369 return floatingPointObjectiveBuilder_.getMessageOrBuilder();
2371 return floatingPointObjective_ ==
null ?
2372 com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2394 private com.google.protobuf.SingleFieldBuilder<
2395 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>
2396 internalGetFloatingPointObjectiveFieldBuilder() {
2397 if (floatingPointObjectiveBuilder_ ==
null) {
2398 floatingPointObjectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2399 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>(
2401 getParentForChildren(),
2403 floatingPointObjective_ =
null;
2405 return floatingPointObjectiveBuilder_;
2408 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_ =
2409 java.util.Collections.emptyList();
2410 private void ensureSearchStrategyIsMutable() {
2411 if (!((bitField0_ & 0x00000020) != 0)) {
2412 searchStrategy_ =
new java.util.ArrayList<com.google.ortools.sat.DecisionStrategyProto>(searchStrategy_);
2413 bitField0_ |= 0x00000020;
2417 private com.google.protobuf.RepeatedFieldBuilder<
2418 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder> searchStrategyBuilder_;
2436 if (searchStrategyBuilder_ ==
null) {
2437 return java.util.Collections.unmodifiableList(searchStrategy_);
2439 return searchStrategyBuilder_.getMessageList();
2458 if (searchStrategyBuilder_ ==
null) {
2459 return searchStrategy_.size();
2461 return searchStrategyBuilder_.getCount();
2480 if (searchStrategyBuilder_ ==
null) {
2481 return searchStrategy_.get(index);
2483 return searchStrategyBuilder_.getMessage(index);
2502 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2503 if (searchStrategyBuilder_ ==
null) {
2504 if (value ==
null) {
2505 throw new NullPointerException();
2507 ensureSearchStrategyIsMutable();
2508 searchStrategy_.set(index, value);
2511 searchStrategyBuilder_.setMessage(index, value);
2531 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2532 if (searchStrategyBuilder_ ==
null) {
2533 ensureSearchStrategyIsMutable();
2534 searchStrategy_.set(index, builderForValue.build());
2537 searchStrategyBuilder_.setMessage(index, builderForValue.build());
2557 if (searchStrategyBuilder_ ==
null) {
2558 if (value ==
null) {
2559 throw new NullPointerException();
2561 ensureSearchStrategyIsMutable();
2562 searchStrategy_.add(value);
2565 searchStrategyBuilder_.addMessage(value);
2585 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2586 if (searchStrategyBuilder_ ==
null) {
2587 if (value ==
null) {
2588 throw new NullPointerException();
2590 ensureSearchStrategyIsMutable();
2591 searchStrategy_.add(index, value);
2594 searchStrategyBuilder_.addMessage(index, value);
2614 com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2615 if (searchStrategyBuilder_ ==
null) {
2616 ensureSearchStrategyIsMutable();
2617 searchStrategy_.add(builderForValue.build());
2620 searchStrategyBuilder_.addMessage(builderForValue.build());
2640 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2641 if (searchStrategyBuilder_ ==
null) {
2642 ensureSearchStrategyIsMutable();
2643 searchStrategy_.add(index, builderForValue.build());
2646 searchStrategyBuilder_.addMessage(index, builderForValue.build());
2666 java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto> values) {
2667 if (searchStrategyBuilder_ ==
null) {
2668 ensureSearchStrategyIsMutable();
2669 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2670 values, searchStrategy_);
2673 searchStrategyBuilder_.addAllMessages(values);
2693 if (searchStrategyBuilder_ ==
null) {
2694 searchStrategy_ = java.util.Collections.emptyList();
2695 bitField0_ = (bitField0_ & ~0x00000020);
2698 searchStrategyBuilder_.clear();
2718 if (searchStrategyBuilder_ ==
null) {
2719 ensureSearchStrategyIsMutable();
2720 searchStrategy_.remove(index);
2723 searchStrategyBuilder_.remove(index);
2744 return internalGetSearchStrategyFieldBuilder().getBuilder(index);
2763 if (searchStrategyBuilder_ ==
null) {
2764 return searchStrategy_.get(index); }
else {
2765 return searchStrategyBuilder_.getMessageOrBuilder(index);
2783 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2785 if (searchStrategyBuilder_ !=
null) {
2786 return searchStrategyBuilder_.getMessageOrBuilderList();
2788 return java.util.Collections.unmodifiableList(searchStrategy_);
2807 return internalGetSearchStrategyFieldBuilder().addBuilder(
2808 com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2827 return internalGetSearchStrategyFieldBuilder().addBuilder(
2828 index, com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2845 public java.util.List<com.google.ortools.sat.DecisionStrategyProto.Builder>
2847 return internalGetSearchStrategyFieldBuilder().getBuilderList();
2849 private com.google.protobuf.RepeatedFieldBuilder<
2850 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2851 internalGetSearchStrategyFieldBuilder() {
2852 if (searchStrategyBuilder_ ==
null) {
2853 searchStrategyBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
2854 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>(
2856 ((bitField0_ & 0x00000020) != 0),
2857 getParentForChildren(),
2859 searchStrategy_ =
null;
2861 return searchStrategyBuilder_;
2865 private com.google.protobuf.SingleFieldBuilder<
2866 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
2886 return ((bitField0_ & 0x00000040) != 0);
2907 if (solutionHintBuilder_ ==
null) {
2908 return solutionHint_ ==
null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2910 return solutionHintBuilder_.getMessage();
2931 if (solutionHintBuilder_ ==
null) {
2932 if (value ==
null) {
2933 throw new NullPointerException();
2935 solutionHint_ = value;
2937 solutionHintBuilder_.setMessage(value);
2939 bitField0_ |= 0x00000040;
2961 com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue) {
2962 if (solutionHintBuilder_ ==
null) {
2963 solutionHint_ = builderForValue.build();
2965 solutionHintBuilder_.setMessage(builderForValue.build());
2967 bitField0_ |= 0x00000040;
2989 if (solutionHintBuilder_ ==
null) {
2990 if (((bitField0_ & 0x00000040) != 0) &&
2991 solutionHint_ !=
null &&
2992 solutionHint_ != com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance()) {
2995 solutionHint_ = value;
2998 solutionHintBuilder_.mergeFrom(value);
3000 if (solutionHint_ !=
null) {
3001 bitField0_ |= 0x00000040;
3024 bitField0_ = (bitField0_ & ~0x00000040);
3025 solutionHint_ =
null;
3026 if (solutionHintBuilder_ !=
null) {
3027 solutionHintBuilder_.dispose();
3028 solutionHintBuilder_ =
null;
3051 bitField0_ |= 0x00000040;
3053 return internalGetSolutionHintFieldBuilder().getBuilder();
3073 if (solutionHintBuilder_ !=
null) {
3074 return solutionHintBuilder_.getMessageOrBuilder();
3076 return solutionHint_ ==
null ?
3077 com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3097 private com.google.protobuf.SingleFieldBuilder<
3098 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>
3099 internalGetSolutionHintFieldBuilder() {
3100 if (solutionHintBuilder_ ==
null) {
3101 solutionHintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
3102 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>(
3104 getParentForChildren(),
3106 solutionHint_ =
null;
3108 return solutionHintBuilder_;
3111 private com.google.protobuf.Internal.IntList assumptions_ = emptyIntList();
3112 private void ensureAssumptionsIsMutable() {
3113 if (!assumptions_.isModifiable()) {
3114 assumptions_ = makeMutableCopy(assumptions_);
3116 bitField0_ |= 0x00000080;
3138 public java.util.List<java.lang.Integer>
3140 assumptions_.makeImmutable();
3141 return assumptions_;
3164 return assumptions_.size();
3188 return assumptions_.getInt(index);
3213 int index,
int value) {
3215 ensureAssumptionsIsMutable();
3216 assumptions_.setInt(index, value);
3217 bitField0_ |= 0x00000080;
3244 ensureAssumptionsIsMutable();
3245 assumptions_.addInt(value);
3246 bitField0_ |= 0x00000080;
3272 java.lang.Iterable<? extends java.lang.Integer> values) {
3273 ensureAssumptionsIsMutable();
3274 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3275 values, assumptions_);
3276 bitField0_ |= 0x00000080;
3301 assumptions_ = emptyIntList();
3302 bitField0_ = (bitField0_ & ~0x00000080);
3308 private com.google.protobuf.SingleFieldBuilder<
3309 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder> symmetryBuilder_;
3323 return ((bitField0_ & 0x00000100) != 0);
3338 if (symmetryBuilder_ ==
null) {
3339 return symmetry_ ==
null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3341 return symmetryBuilder_.getMessage();
3355 public Builder
setSymmetry(com.google.ortools.sat.SymmetryProto value) {
3356 if (symmetryBuilder_ ==
null) {
3357 if (value ==
null) {
3358 throw new NullPointerException();
3362 symmetryBuilder_.setMessage(value);
3364 bitField0_ |= 0x00000100;
3380 com.google.ortools.sat.SymmetryProto.Builder builderForValue) {
3381 if (symmetryBuilder_ ==
null) {
3382 symmetry_ = builderForValue.build();
3384 symmetryBuilder_.setMessage(builderForValue.build());
3386 bitField0_ |= 0x00000100;
3402 if (symmetryBuilder_ ==
null) {
3403 if (((bitField0_ & 0x00000100) != 0) &&
3404 symmetry_ !=
null &&
3405 symmetry_ != com.google.ortools.sat.SymmetryProto.getDefaultInstance()) {
3411 symmetryBuilder_.mergeFrom(value);
3413 if (symmetry_ !=
null) {
3414 bitField0_ |= 0x00000100;
3431 bitField0_ = (bitField0_ & ~0x00000100);
3433 if (symmetryBuilder_ !=
null) {
3434 symmetryBuilder_.dispose();
3435 symmetryBuilder_ =
null;
3452 bitField0_ |= 0x00000100;
3454 return internalGetSymmetryFieldBuilder().getBuilder();
3468 if (symmetryBuilder_ !=
null) {
3469 return symmetryBuilder_.getMessageOrBuilder();
3471 return symmetry_ ==
null ?
3472 com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3486 private com.google.protobuf.SingleFieldBuilder<
3487 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>
3488 internalGetSymmetryFieldBuilder() {
3489 if (symmetryBuilder_ ==
null) {
3490 symmetryBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
3491 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>(
3493 getParentForChildren(),
3497 return symmetryBuilder_;