5package com.google.ortools.sat;
15 com.google.protobuf.GeneratedMessage implements
18private static final long serialVersionUID = 0L;
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
34 constraints_ = java.util.Collections.emptyList();
36 com.google.protobuf.LazyStringArrayList.emptyList();
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.LinearBooleanProblem.class, com.google.ortools.sat.LinearBooleanProblem.Builder.class);
52 private int bitField0_;
54 @SuppressWarnings(
"serial")
55 private volatile java.lang.Object name_ = "";
66 return ((bitField0_ & 0x00000001) != 0);
78 java.lang.Object ref = name_;
79 if (ref instanceof java.lang.String) {
80 return (java.lang.String) ref;
82 com.google.protobuf.ByteString bs =
83 (com.google.protobuf.ByteString) ref;
84 java.lang.String s = bs.toStringUtf8();
85 if (bs.isValidUtf8()) {
100 public com.google.protobuf.ByteString
102 java.lang.Object ref = name_;
103 if (ref instanceof java.lang.String) {
104 com.google.protobuf.ByteString b =
105 com.google.protobuf.ByteString.copyFromUtf8(
106 (java.lang.String) ref);
110 return (com.google.protobuf.ByteString) ref;
115 private int numVariables_ = 0;
128 return ((bitField0_ & 0x00000002) != 0);
142 return numVariables_;
146 @SuppressWarnings(
"serial")
167 public java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
180 return constraints_.size();
191 return constraints_.get(index);
203 return constraints_.get(index);
219 return ((bitField0_ & 0x00000004) != 0);
232 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
244 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
248 @SuppressWarnings(
"serial")
249 private com.google.protobuf.LazyStringArrayList varNames_ =
250 com.google.protobuf.LazyStringArrayList.emptyList();
261 public com.google.protobuf.ProtocolStringList
276 return varNames_.size();
290 return varNames_.get(index);
303 public com.google.protobuf.ByteString
305 return varNames_.getByteString(index);
321 return ((bitField0_ & 0x00000008) != 0);
334 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
346 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
350 private int originalNumVariables_ = 0;
364 return ((bitField0_ & 0x00000010) != 0);
379 return originalNumVariables_;
382 private byte memoizedIsInitialized = -1;
389 memoizedIsInitialized = 1;
394 public void writeTo(com.google.protobuf.CodedOutputStream output)
395 throws java.io.IOException {
396 if (((bitField0_ & 0x00000001) != 0)) {
397 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
399 if (((bitField0_ & 0x00000002) != 0)) {
400 output.writeInt32(3, numVariables_);
402 for (
int i = 0; i < constraints_.size(); i++) {
403 output.writeMessage(4, constraints_.get(i));
405 if (((bitField0_ & 0x00000004) != 0)) {
408 for (
int i = 0; i < varNames_.size(); i++) {
409 com.google.protobuf.GeneratedMessage.writeString(output, 6, varNames_.getRaw(i));
411 if (((bitField0_ & 0x00000008) != 0)) {
414 if (((bitField0_ & 0x00000010) != 0)) {
415 output.writeInt32(8, originalNumVariables_);
417 getUnknownFields().writeTo(output);
422 int size = memoizedSize;
423 if (size != -1)
return size;
426 if (((bitField0_ & 0x00000001) != 0)) {
427 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
429 if (((bitField0_ & 0x00000002) != 0)) {
430 size += com.google.protobuf.CodedOutputStream
431 .computeInt32Size(3, numVariables_);
433 for (
int i = 0; i < constraints_.size(); i++) {
434 size += com.google.protobuf.CodedOutputStream
435 .computeMessageSize(4, constraints_.get(i));
437 if (((bitField0_ & 0x00000004) != 0)) {
438 size += com.google.protobuf.CodedOutputStream
443 for (
int i = 0; i < varNames_.size(); i++) {
444 dataSize += computeStringSizeNoTag(varNames_.getRaw(i));
449 if (((bitField0_ & 0x00000008) != 0)) {
450 size += com.google.protobuf.CodedOutputStream
453 if (((bitField0_ & 0x00000010) != 0)) {
454 size += com.google.protobuf.CodedOutputStream
455 .computeInt32Size(8, originalNumVariables_);
457 size += getUnknownFields().getSerializedSize();
463 public boolean equals(
final java.lang.Object obj) {
467 if (!(obj instanceof com.google.ortools.sat.LinearBooleanProblem)) {
468 return super.equals(obj);
501 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
507 if (memoizedHashCode != 0) {
508 return memoizedHashCode;
514 hash = (53 * hash) +
getName().hashCode();
540 hash = (29 * hash) + getUnknownFields().hashCode();
541 memoizedHashCode = hash;
546 java.nio.ByteBuffer data)
547 throws com.google.protobuf.InvalidProtocolBufferException {
548 return PARSER.parseFrom(data);
551 java.nio.ByteBuffer data,
552 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
553 throws com.google.protobuf.InvalidProtocolBufferException {
554 return PARSER.parseFrom(data, extensionRegistry);
557 com.google.protobuf.ByteString data)
558 throws com.google.protobuf.InvalidProtocolBufferException {
559 return PARSER.parseFrom(data);
562 com.google.protobuf.ByteString data,
563 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
564 throws com.google.protobuf.InvalidProtocolBufferException {
565 return PARSER.parseFrom(data, extensionRegistry);
568 throws com.google.protobuf.InvalidProtocolBufferException {
569 return PARSER.parseFrom(data);
573 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
574 throws com.google.protobuf.InvalidProtocolBufferException {
575 return PARSER.parseFrom(data, extensionRegistry);
578 throws java.io.IOException {
579 return com.google.protobuf.GeneratedMessage
580 .parseWithIOException(PARSER, input);
583 java.io.InputStream input,
584 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
585 throws java.io.IOException {
586 return com.google.protobuf.GeneratedMessage
587 .parseWithIOException(PARSER, input, extensionRegistry);
591 throws java.io.IOException {
592 return com.google.protobuf.GeneratedMessage
593 .parseDelimitedWithIOException(PARSER, input);
597 java.io.InputStream input,
598 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
599 throws java.io.IOException {
600 return com.google.protobuf.GeneratedMessage
601 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
604 com.google.protobuf.CodedInputStream input)
605 throws java.io.IOException {
606 return com.google.protobuf.GeneratedMessage
607 .parseWithIOException(PARSER, input);
610 com.google.protobuf.CodedInputStream input,
611 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
612 throws java.io.IOException {
613 return com.google.protobuf.GeneratedMessage
614 .parseWithIOException(PARSER, input, extensionRegistry);
627 return this == DEFAULT_INSTANCE
633 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
645 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
648 public static final com.google.protobuf.Descriptors.Descriptor
650 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
654 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
656 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_fieldAccessorTable
657 .ensureFieldAccessorsInitialized(
658 com.google.ortools.sat.LinearBooleanProblem.class, com.google.ortools.sat.LinearBooleanProblem.Builder.class);
663 maybeForceBuilderInitialization();
667 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
669 maybeForceBuilderInitialization();
671 private void maybeForceBuilderInitialization() {
672 if (com.google.protobuf.GeneratedMessage
673 .alwaysUseFieldBuilders) {
674 getConstraintsFieldBuilder();
675 getObjectiveFieldBuilder();
676 getAssignmentFieldBuilder();
685 if (constraintsBuilder_ ==
null) {
686 constraints_ = java.util.Collections.emptyList();
689 constraintsBuilder_.clear();
691 bitField0_ = (bitField0_ & ~0x00000004);
693 if (objectiveBuilder_ !=
null) {
694 objectiveBuilder_.dispose();
695 objectiveBuilder_ =
null;
698 com.google.protobuf.LazyStringArrayList.emptyList();
700 if (assignmentBuilder_ !=
null) {
701 assignmentBuilder_.dispose();
702 assignmentBuilder_ =
null;
704 originalNumVariables_ = 0;
709 public com.google.protobuf.Descriptors.Descriptor
711 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
716 return com.google.ortools.sat.LinearBooleanProblem.getDefaultInstance();
723 throw newUninitializedMessageException(result);
731 buildPartialRepeatedFields(result);
732 if (bitField0_ != 0) { buildPartial0(result); }
737 private void buildPartialRepeatedFields(com.google.ortools.sat.LinearBooleanProblem result) {
738 if (constraintsBuilder_ ==
null) {
739 if (((bitField0_ & 0x00000004) != 0)) {
740 constraints_ = java.util.Collections.unmodifiableList(constraints_);
741 bitField0_ = (bitField0_ & ~0x00000004);
743 result.constraints_ = constraints_;
745 result.constraints_ = constraintsBuilder_.build();
749 private void buildPartial0(com.google.ortools.sat.LinearBooleanProblem result) {
750 int from_bitField0_ = bitField0_;
751 int to_bitField0_ = 0;
752 if (((from_bitField0_ & 0x00000001) != 0)) {
753 result.name_ = name_;
754 to_bitField0_ |= 0x00000001;
756 if (((from_bitField0_ & 0x00000002) != 0)) {
757 result.numVariables_ = numVariables_;
758 to_bitField0_ |= 0x00000002;
760 if (((from_bitField0_ & 0x00000008) != 0)) {
761 result.objective_ = objectiveBuilder_ ==
null
763 : objectiveBuilder_.build();
764 to_bitField0_ |= 0x00000004;
766 if (((from_bitField0_ & 0x00000010) != 0)) {
767 varNames_.makeImmutable();
768 result.varNames_ = varNames_;
770 if (((from_bitField0_ & 0x00000020) != 0)) {
771 result.assignment_ = assignmentBuilder_ ==
null
773 : assignmentBuilder_.build();
774 to_bitField0_ |= 0x00000008;
776 if (((from_bitField0_ & 0x00000040) != 0)) {
777 result.originalNumVariables_ = originalNumVariables_;
778 to_bitField0_ |= 0x00000010;
780 result.bitField0_ |= to_bitField0_;
785 if (other instanceof com.google.ortools.sat.LinearBooleanProblem) {
786 return mergeFrom((com.google.ortools.sat.LinearBooleanProblem)other);
788 super.mergeFrom(other);
794 if (other == com.google.ortools.sat.LinearBooleanProblem.getDefaultInstance())
return this;
795 if (other.hasName()) {
797 bitField0_ |= 0x00000001;
800 if (other.hasNumVariables()) {
803 if (constraintsBuilder_ ==
null) {
804 if (!other.constraints_.isEmpty()) {
805 if (constraints_.isEmpty()) {
806 constraints_ = other.constraints_;
807 bitField0_ = (bitField0_ & ~0x00000004);
809 ensureConstraintsIsMutable();
810 constraints_.addAll(other.constraints_);
815 if (!other.constraints_.isEmpty()) {
816 if (constraintsBuilder_.isEmpty()) {
817 constraintsBuilder_.dispose();
818 constraintsBuilder_ =
null;
819 constraints_ = other.constraints_;
820 bitField0_ = (bitField0_ & ~0x00000004);
821 constraintsBuilder_ =
822 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
823 getConstraintsFieldBuilder() :
null;
825 constraintsBuilder_.addAllMessages(other.constraints_);
829 if (other.hasObjective()) {
832 if (!other.varNames_.isEmpty()) {
833 if (varNames_.isEmpty()) {
834 varNames_ = other.varNames_;
835 bitField0_ |= 0x00000010;
837 ensureVarNamesIsMutable();
838 varNames_.addAll(other.varNames_);
842 if (other.hasAssignment()) {
845 if (other.hasOriginalNumVariables()) {
848 this.mergeUnknownFields(other.getUnknownFields());
860 com.google.protobuf.CodedInputStream input,
861 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
862 throws java.io.IOException {
863 if (extensionRegistry ==
null) {
864 throw new java.lang.NullPointerException();
867 boolean done =
false;
869 int tag = input.readTag();
875 name_ = input.readBytes();
876 bitField0_ |= 0x00000001;
880 numVariables_ = input.readInt32();
881 bitField0_ |= 0x00000002;
887 com.google.ortools.sat.LinearBooleanConstraint.parser(),
889 if (constraintsBuilder_ ==
null) {
890 ensureConstraintsIsMutable();
893 constraintsBuilder_.addMessage(m);
899 getObjectiveFieldBuilder().getBuilder(),
901 bitField0_ |= 0x00000008;
905 com.google.protobuf.ByteString bs = input.readBytes();
906 ensureVarNamesIsMutable();
912 getAssignmentFieldBuilder().getBuilder(),
914 bitField0_ |= 0x00000020;
918 originalNumVariables_ = input.readInt32();
919 bitField0_ |= 0x00000040;
923 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
930 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
931 throw e.unwrapIOException();
937 private int bitField0_;
939 private java.lang.Object name_ =
"";
949 return ((bitField0_ & 0x00000001) != 0);
960 java.lang.Object ref = name_;
961 if (!(ref instanceof java.lang.String)) {
962 com.google.protobuf.ByteString bs =
963 (com.google.protobuf.ByteString) ref;
964 java.lang.String s = bs.toStringUtf8();
965 if (bs.isValidUtf8()) {
970 return (java.lang.String) ref;
981 public com.google.protobuf.ByteString
983 java.lang.Object ref = name_;
984 if (ref instanceof String) {
985 com.google.protobuf.ByteString b =
986 com.google.protobuf.ByteString.copyFromUtf8(
987 (java.lang.String) ref);
991 return (com.google.protobuf.ByteString) ref;
1004 java.lang.String value) {
1005 if (value ==
null) {
throw new NullPointerException(); }
1007 bitField0_ |= 0x00000001;
1021 bitField0_ = (bitField0_ & ~0x00000001);
1035 com.google.protobuf.ByteString value) {
1036 if (value ==
null) {
throw new NullPointerException(); }
1038 bitField0_ |= 0x00000001;
1043 private int numVariables_ ;
1056 return ((bitField0_ & 0x00000002) != 0);
1070 return numVariables_;
1085 numVariables_ = value;
1086 bitField0_ |= 0x00000002;
1101 bitField0_ = (bitField0_ & ~0x00000002);
1107 private java.util.List<com.google.ortools.sat.LinearBooleanConstraint> constraints_ =
1108 java.util.Collections.emptyList();
1109 private void ensureConstraintsIsMutable() {
1110 if (!((bitField0_ & 0x00000004) != 0)) {
1111 constraints_ =
new java.util.ArrayList<com.google.ortools.sat.LinearBooleanConstraint>(constraints_);
1112 bitField0_ |= 0x00000004;
1116 private com.google.protobuf.RepeatedFieldBuilder<
1117 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder> constraintsBuilder_;
1127 if (constraintsBuilder_ ==
null) {
1128 return java.util.Collections.unmodifiableList(constraints_);
1130 return constraintsBuilder_.getMessageList();
1141 if (constraintsBuilder_ ==
null) {
1142 return constraints_.size();
1144 return constraintsBuilder_.getCount();
1155 if (constraintsBuilder_ ==
null) {
1156 return constraints_.get(index);
1158 return constraintsBuilder_.getMessage(index);
1169 int index, com.google.ortools.sat.LinearBooleanConstraint value) {
1170 if (constraintsBuilder_ ==
null) {
1171 if (value ==
null) {
1172 throw new NullPointerException();
1174 ensureConstraintsIsMutable();
1175 constraints_.set(index, value);
1178 constraintsBuilder_.setMessage(index, value);
1190 int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1191 if (constraintsBuilder_ ==
null) {
1192 ensureConstraintsIsMutable();
1193 constraints_.set(index, builderForValue.build());
1196 constraintsBuilder_.setMessage(index, builderForValue.build());
1208 if (constraintsBuilder_ ==
null) {
1209 if (value ==
null) {
1210 throw new NullPointerException();
1212 ensureConstraintsIsMutable();
1213 constraints_.add(value);
1216 constraintsBuilder_.addMessage(value);
1228 int index, com.google.ortools.sat.LinearBooleanConstraint value) {
1229 if (constraintsBuilder_ ==
null) {
1230 if (value ==
null) {
1231 throw new NullPointerException();
1233 ensureConstraintsIsMutable();
1234 constraints_.add(index, value);
1237 constraintsBuilder_.addMessage(index, value);
1249 com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1250 if (constraintsBuilder_ ==
null) {
1251 ensureConstraintsIsMutable();
1252 constraints_.add(builderForValue.build());
1255 constraintsBuilder_.addMessage(builderForValue.build());
1267 int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1268 if (constraintsBuilder_ ==
null) {
1269 ensureConstraintsIsMutable();
1270 constraints_.add(index, builderForValue.build());
1273 constraintsBuilder_.addMessage(index, builderForValue.build());
1285 java.lang.Iterable<? extends com.google.ortools.sat.LinearBooleanConstraint> values) {
1286 if (constraintsBuilder_ ==
null) {
1287 ensureConstraintsIsMutable();
1288 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1289 values, constraints_);
1292 constraintsBuilder_.addAllMessages(values);
1304 if (constraintsBuilder_ ==
null) {
1305 constraints_ = java.util.Collections.emptyList();
1306 bitField0_ = (bitField0_ & ~0x00000004);
1309 constraintsBuilder_.clear();
1321 if (constraintsBuilder_ ==
null) {
1322 ensureConstraintsIsMutable();
1323 constraints_.remove(index);
1326 constraintsBuilder_.remove(index);
1339 return getConstraintsFieldBuilder().getBuilder(index);
1350 if (constraintsBuilder_ ==
null) {
1351 return constraints_.get(index); }
else {
1352 return constraintsBuilder_.getMessageOrBuilder(index);
1362 public java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
1364 if (constraintsBuilder_ !=
null) {
1365 return constraintsBuilder_.getMessageOrBuilderList();
1367 return java.util.Collections.unmodifiableList(constraints_);
1378 return getConstraintsFieldBuilder().addBuilder(
1379 com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance());
1390 return getConstraintsFieldBuilder().addBuilder(
1391 index, com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance());
1400 public java.util.List<com.google.ortools.sat.LinearBooleanConstraint.Builder>
1402 return getConstraintsFieldBuilder().getBuilderList();
1404 private com.google.protobuf.RepeatedFieldBuilder<
1405 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
1406 getConstraintsFieldBuilder() {
1407 if (constraintsBuilder_ ==
null) {
1408 constraintsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1409 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder>(
1411 ((bitField0_ & 0x00000004) != 0),
1412 getParentForChildren(),
1414 constraints_ =
null;
1416 return constraintsBuilder_;
1420 private com.google.protobuf.SingleFieldBuilder<
1421 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder> objectiveBuilder_;
1432 return ((bitField0_ & 0x00000008) != 0);
1444 if (objectiveBuilder_ ==
null) {
1445 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
1447 return objectiveBuilder_.getMessage();
1459 if (objectiveBuilder_ ==
null) {
1460 if (value ==
null) {
1461 throw new NullPointerException();
1465 objectiveBuilder_.setMessage(value);
1467 bitField0_ |= 0x00000008;
1480 com.google.ortools.sat.LinearObjective.Builder builderForValue) {
1481 if (objectiveBuilder_ ==
null) {
1482 objective_ = builderForValue.build();
1484 objectiveBuilder_.setMessage(builderForValue.build());
1486 bitField0_ |= 0x00000008;
1499 if (objectiveBuilder_ ==
null) {
1500 if (((bitField0_ & 0x00000008) != 0) &&
1501 objective_ !=
null &&
1502 objective_ != com.google.ortools.sat.LinearObjective.getDefaultInstance()) {
1508 objectiveBuilder_.mergeFrom(value);
1510 if (objective_ !=
null) {
1511 bitField0_ |= 0x00000008;
1525 bitField0_ = (bitField0_ & ~0x00000008);
1527 if (objectiveBuilder_ !=
null) {
1528 objectiveBuilder_.dispose();
1529 objectiveBuilder_ =
null;
1543 bitField0_ |= 0x00000008;
1545 return getObjectiveFieldBuilder().getBuilder();
1556 if (objectiveBuilder_ !=
null) {
1557 return objectiveBuilder_.getMessageOrBuilder();
1559 return objective_ ==
null ?
1560 com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
1571 private com.google.protobuf.SingleFieldBuilder<
1572 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder>
1573 getObjectiveFieldBuilder() {
1574 if (objectiveBuilder_ ==
null) {
1575 objectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1576 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder>(
1578 getParentForChildren(),
1582 return objectiveBuilder_;
1585 private com.google.protobuf.LazyStringArrayList varNames_ =
1586 com.google.protobuf.LazyStringArrayList.emptyList();
1587 private void ensureVarNamesIsMutable() {
1588 if (!varNames_.isModifiable()) {
1589 varNames_ =
new com.google.protobuf.LazyStringArrayList(varNames_);
1591 bitField0_ |= 0x00000010;
1603 public com.google.protobuf.ProtocolStringList
1605 varNames_.makeImmutable();
1619 return varNames_.size();
1633 return varNames_.get(index);
1646 public com.google.protobuf.ByteString
1648 return varNames_.getByteString(index);
1663 int index, java.lang.String value) {
1664 if (value ==
null) {
throw new NullPointerException(); }
1665 ensureVarNamesIsMutable();
1666 varNames_.set(index, value);
1667 bitField0_ |= 0x00000010;
1683 java.lang.String value) {
1684 if (value ==
null) {
throw new NullPointerException(); }
1685 ensureVarNamesIsMutable();
1686 varNames_.add(value);
1687 bitField0_ |= 0x00000010;
1703 java.lang.Iterable<java.lang.String> values) {
1704 ensureVarNamesIsMutable();
1705 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1707 bitField0_ |= 0x00000010;
1723 com.google.protobuf.LazyStringArrayList.emptyList();
1724 bitField0_ = (bitField0_ & ~0x00000010);;
1740 com.google.protobuf.ByteString value) {
1741 if (value ==
null) {
throw new NullPointerException(); }
1742 ensureVarNamesIsMutable();
1743 varNames_.add(value);
1744 bitField0_ |= 0x00000010;
1750 private com.google.protobuf.SingleFieldBuilder<
1751 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder> assignmentBuilder_;
1762 return ((bitField0_ & 0x00000020) != 0);
1774 if (assignmentBuilder_ ==
null) {
1775 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
1777 return assignmentBuilder_.getMessage();
1789 if (assignmentBuilder_ ==
null) {
1790 if (value ==
null) {
1791 throw new NullPointerException();
1793 assignment_ = value;
1795 assignmentBuilder_.setMessage(value);
1797 bitField0_ |= 0x00000020;
1810 com.google.ortools.sat.BooleanAssignment.Builder builderForValue) {
1811 if (assignmentBuilder_ ==
null) {
1812 assignment_ = builderForValue.build();
1814 assignmentBuilder_.setMessage(builderForValue.build());
1816 bitField0_ |= 0x00000020;
1829 if (assignmentBuilder_ ==
null) {
1830 if (((bitField0_ & 0x00000020) != 0) &&
1831 assignment_ !=
null &&
1832 assignment_ != com.google.ortools.sat.BooleanAssignment.getDefaultInstance()) {
1835 assignment_ = value;
1838 assignmentBuilder_.mergeFrom(value);
1840 if (assignment_ !=
null) {
1841 bitField0_ |= 0x00000020;
1855 bitField0_ = (bitField0_ & ~0x00000020);
1857 if (assignmentBuilder_ !=
null) {
1858 assignmentBuilder_.dispose();
1859 assignmentBuilder_ =
null;
1873 bitField0_ |= 0x00000020;
1875 return getAssignmentFieldBuilder().getBuilder();
1886 if (assignmentBuilder_ !=
null) {
1887 return assignmentBuilder_.getMessageOrBuilder();
1889 return assignment_ ==
null ?
1890 com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
1901 private com.google.protobuf.SingleFieldBuilder<
1902 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder>
1903 getAssignmentFieldBuilder() {
1904 if (assignmentBuilder_ ==
null) {
1905 assignmentBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1906 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder>(
1908 getParentForChildren(),
1912 return assignmentBuilder_;
1915 private int originalNumVariables_ ;
1929 return ((bitField0_ & 0x00000040) != 0);
1944 return originalNumVariables_;
1960 originalNumVariables_ = value;
1961 bitField0_ |= 0x00000040;
1977 bitField0_ = (bitField0_ & ~0x00000040);
1978 originalNumVariables_ = 0;
1989 DEFAULT_INSTANCE =
new com.google.ortools.sat.LinearBooleanProblem();
1993 return DEFAULT_INSTANCE;
2000 com.google.protobuf.CodedInputStream input,
2001 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2002 throws com.google.protobuf.InvalidProtocolBufferException {
2005 builder.mergeFrom(input, extensionRegistry);
2006 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
2007 throw e.setUnfinishedMessage(builder.buildPartial());
2008 }
catch (com.google.protobuf.UninitializedMessageException e) {
2009 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2010 }
catch (java.io.IOException e) {
2011 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2012 .setUnfinishedMessage(builder.buildPartial());
2014 return builder.buildPartial();
2029 return DEFAULT_INSTANCE;