6package com.google.ortools.sat;
15public final class LinearBooleanProblem
extends
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
27 LinearBooleanProblem.class.getName());
30 private LinearBooleanProblem(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 private LinearBooleanProblem() {
35 constraints_ = java.util.Collections.emptyList();
37 com.google.protobuf.LazyStringArrayList.emptyList();
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.sat.LinearBooleanProblem.class, com.google.ortools.sat.LinearBooleanProblem.Builder.class);
53 private int bitField0_;
55 @SuppressWarnings(
"serial")
56 private volatile java.lang.Object name_ =
"";
67 return ((bitField0_ & 0x00000001) != 0);
79 java.lang.Object ref = name_;
80 if (ref instanceof java.lang.String) {
81 return (java.lang.String) ref;
83 com.google.protobuf.ByteString bs =
84 (com.google.protobuf.ByteString) ref;
85 java.lang.String s = bs.toStringUtf8();
86 if (bs.isValidUtf8()) {
101 public com.google.protobuf.ByteString
103 java.lang.Object ref = name_;
104 if (ref instanceof java.lang.String) {
105 com.google.protobuf.ByteString b =
106 com.google.protobuf.ByteString.copyFromUtf8(
107 (java.lang.String) ref);
111 return (com.google.protobuf.ByteString) ref;
116 private int numVariables_ = 0;
129 return ((bitField0_ & 0x00000002) != 0);
143 return numVariables_;
147 @SuppressWarnings(
"serial")
168 public java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
181 return constraints_.size();
192 return constraints_.get(index);
204 return constraints_.get(index);
220 return ((bitField0_ & 0x00000004) != 0);
233 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
245 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
249 @SuppressWarnings(
"serial")
250 private com.google.protobuf.LazyStringArrayList varNames_ =
251 com.google.protobuf.LazyStringArrayList.emptyList();
262 public com.google.protobuf.ProtocolStringList
277 return varNames_.size();
291 return varNames_.get(index);
304 public com.google.protobuf.ByteString
306 return varNames_.getByteString(index);
322 return ((bitField0_ & 0x00000008) != 0);
335 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
347 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
351 private int originalNumVariables_ = 0;
365 return ((bitField0_ & 0x00000010) != 0);
380 return originalNumVariables_;
383 private byte memoizedIsInitialized = -1;
390 memoizedIsInitialized = 1;
395 public void writeTo(com.google.protobuf.CodedOutputStream output)
396 throws java.io.IOException {
397 if (((bitField0_ & 0x00000001) != 0)) {
398 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
400 if (((bitField0_ & 0x00000002) != 0)) {
401 output.writeInt32(3, numVariables_);
403 for (
int i = 0; i < constraints_.size(); i++) {
404 output.writeMessage(4, constraints_.get(i));
406 if (((bitField0_ & 0x00000004) != 0)) {
409 for (
int i = 0; i < varNames_.size(); i++) {
410 com.google.protobuf.GeneratedMessage.writeString(output, 6, varNames_.getRaw(i));
412 if (((bitField0_ & 0x00000008) != 0)) {
415 if (((bitField0_ & 0x00000010) != 0)) {
416 output.writeInt32(8, originalNumVariables_);
418 getUnknownFields().writeTo(output);
423 int size = memoizedSize;
424 if (size != -1)
return size;
427 if (((bitField0_ & 0x00000001) != 0)) {
428 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
430 if (((bitField0_ & 0x00000002) != 0)) {
431 size += com.google.protobuf.CodedOutputStream
432 .computeInt32Size(3, numVariables_);
434 for (
int i = 0; i < constraints_.size(); i++) {
435 size += com.google.protobuf.CodedOutputStream
436 .computeMessageSize(4, constraints_.get(i));
438 if (((bitField0_ & 0x00000004) != 0)) {
439 size += com.google.protobuf.CodedOutputStream
444 for (
int i = 0; i < varNames_.size(); i++) {
445 dataSize += computeStringSizeNoTag(varNames_.getRaw(i));
450 if (((bitField0_ & 0x00000008) != 0)) {
451 size += com.google.protobuf.CodedOutputStream
454 if (((bitField0_ & 0x00000010) != 0)) {
455 size += com.google.protobuf.CodedOutputStream
456 .computeInt32Size(8, originalNumVariables_);
458 size += getUnknownFields().getSerializedSize();
464 public boolean equals(
final java.lang.Object obj) {
468 if (!(obj instanceof com.google.ortools.sat.LinearBooleanProblem)) {
469 return super.equals(obj);
502 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
508 if (memoizedHashCode != 0) {
509 return memoizedHashCode;
515 hash = (53 * hash) +
getName().hashCode();
541 hash = (29 * hash) + getUnknownFields().hashCode();
542 memoizedHashCode = hash;
547 java.nio.ByteBuffer data)
548 throws com.google.protobuf.InvalidProtocolBufferException {
549 return PARSER.parseFrom(data);
552 java.nio.ByteBuffer data,
553 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
554 throws com.google.protobuf.InvalidProtocolBufferException {
555 return PARSER.parseFrom(data, extensionRegistry);
558 com.google.protobuf.ByteString data)
559 throws com.google.protobuf.InvalidProtocolBufferException {
560 return PARSER.parseFrom(data);
563 com.google.protobuf.ByteString data,
564 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
565 throws com.google.protobuf.InvalidProtocolBufferException {
566 return PARSER.parseFrom(data, extensionRegistry);
569 throws com.google.protobuf.InvalidProtocolBufferException {
570 return PARSER.parseFrom(data);
574 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
575 throws com.google.protobuf.InvalidProtocolBufferException {
576 return PARSER.parseFrom(data, extensionRegistry);
579 throws java.io.IOException {
580 return com.google.protobuf.GeneratedMessage
581 .parseWithIOException(PARSER, input);
584 java.io.InputStream input,
585 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
586 throws java.io.IOException {
587 return com.google.protobuf.GeneratedMessage
588 .parseWithIOException(PARSER, input, extensionRegistry);
592 throws java.io.IOException {
593 return com.google.protobuf.GeneratedMessage
594 .parseDelimitedWithIOException(PARSER, input);
598 java.io.InputStream input,
599 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
600 throws java.io.IOException {
601 return com.google.protobuf.GeneratedMessage
602 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
605 com.google.protobuf.CodedInputStream input)
606 throws java.io.IOException {
607 return com.google.protobuf.GeneratedMessage
608 .parseWithIOException(PARSER, input);
611 com.google.protobuf.CodedInputStream input,
612 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
613 throws java.io.IOException {
614 return com.google.protobuf.GeneratedMessage
615 .parseWithIOException(PARSER, input, extensionRegistry);
621 return DEFAULT_INSTANCE.toBuilder();
624 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
628 return this == DEFAULT_INSTANCE
634 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
645 public static final class Builder
extends
646 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
649 public static final com.google.protobuf.Descriptors.Descriptor
651 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
655 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
657 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_fieldAccessorTable
658 .ensureFieldAccessorsInitialized(
659 com.google.ortools.sat.LinearBooleanProblem.class, com.google.ortools.sat.LinearBooleanProblem.Builder.class);
664 maybeForceBuilderInitialization();
668 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
670 maybeForceBuilderInitialization();
672 private void maybeForceBuilderInitialization() {
673 if (com.google.protobuf.GeneratedMessage
674 .alwaysUseFieldBuilders) {
675 getConstraintsFieldBuilder();
676 getObjectiveFieldBuilder();
677 getAssignmentFieldBuilder();
686 if (constraintsBuilder_ ==
null) {
687 constraints_ = java.util.Collections.emptyList();
690 constraintsBuilder_.clear();
692 bitField0_ = (bitField0_ & ~0x00000004);
694 if (objectiveBuilder_ !=
null) {
695 objectiveBuilder_.dispose();
696 objectiveBuilder_ =
null;
699 com.google.protobuf.LazyStringArrayList.emptyList();
701 if (assignmentBuilder_ !=
null) {
702 assignmentBuilder_.dispose();
703 assignmentBuilder_ =
null;
705 originalNumVariables_ = 0;
710 public com.google.protobuf.Descriptors.Descriptor
712 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
717 return com.google.ortools.sat.LinearBooleanProblem.getDefaultInstance();
724 throw newUninitializedMessageException(result);
732 buildPartialRepeatedFields(result);
733 if (bitField0_ != 0) { buildPartial0(result); }
738 private void buildPartialRepeatedFields(com.google.ortools.sat.LinearBooleanProblem result) {
739 if (constraintsBuilder_ ==
null) {
740 if (((bitField0_ & 0x00000004) != 0)) {
741 constraints_ = java.util.Collections.unmodifiableList(constraints_);
742 bitField0_ = (bitField0_ & ~0x00000004);
744 result.constraints_ = constraints_;
746 result.constraints_ = constraintsBuilder_.build();
750 private void buildPartial0(com.google.ortools.sat.LinearBooleanProblem result) {
751 int from_bitField0_ = bitField0_;
752 int to_bitField0_ = 0;
753 if (((from_bitField0_ & 0x00000001) != 0)) {
754 result.name_ = name_;
755 to_bitField0_ |= 0x00000001;
757 if (((from_bitField0_ & 0x00000002) != 0)) {
758 result.numVariables_ = numVariables_;
759 to_bitField0_ |= 0x00000002;
761 if (((from_bitField0_ & 0x00000008) != 0)) {
762 result.objective_ = objectiveBuilder_ ==
null
764 : objectiveBuilder_.build();
765 to_bitField0_ |= 0x00000004;
767 if (((from_bitField0_ & 0x00000010) != 0)) {
768 varNames_.makeImmutable();
769 result.varNames_ = varNames_;
771 if (((from_bitField0_ & 0x00000020) != 0)) {
772 result.assignment_ = assignmentBuilder_ ==
null
774 : assignmentBuilder_.build();
775 to_bitField0_ |= 0x00000008;
777 if (((from_bitField0_ & 0x00000040) != 0)) {
778 result.originalNumVariables_ = originalNumVariables_;
779 to_bitField0_ |= 0x00000010;
781 result.bitField0_ |= to_bitField0_;
785 public Builder
mergeFrom(com.google.protobuf.Message other) {
786 if (other instanceof com.google.ortools.sat.LinearBooleanProblem) {
787 return mergeFrom((com.google.ortools.sat.LinearBooleanProblem)other);
789 super.mergeFrom(other);
794 public Builder
mergeFrom(com.google.ortools.sat.LinearBooleanProblem other) {
795 if (other == com.google.ortools.sat.LinearBooleanProblem.getDefaultInstance())
return this;
796 if (other.hasName()) {
798 bitField0_ |= 0x00000001;
801 if (other.hasNumVariables()) {
804 if (constraintsBuilder_ ==
null) {
805 if (!other.constraints_.isEmpty()) {
806 if (constraints_.isEmpty()) {
807 constraints_ = other.constraints_;
808 bitField0_ = (bitField0_ & ~0x00000004);
810 ensureConstraintsIsMutable();
811 constraints_.addAll(other.constraints_);
816 if (!other.constraints_.isEmpty()) {
817 if (constraintsBuilder_.isEmpty()) {
818 constraintsBuilder_.dispose();
819 constraintsBuilder_ =
null;
820 constraints_ = other.constraints_;
821 bitField0_ = (bitField0_ & ~0x00000004);
822 constraintsBuilder_ =
823 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
824 getConstraintsFieldBuilder() :
null;
826 constraintsBuilder_.addAllMessages(other.constraints_);
830 if (other.hasObjective()) {
833 if (!other.varNames_.isEmpty()) {
834 if (varNames_.isEmpty()) {
835 varNames_ = other.varNames_;
836 bitField0_ |= 0x00000010;
838 ensureVarNamesIsMutable();
839 varNames_.addAll(other.varNames_);
843 if (other.hasAssignment()) {
846 if (other.hasOriginalNumVariables()) {
849 this.mergeUnknownFields(other.getUnknownFields());
861 com.google.protobuf.CodedInputStream input,
862 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
863 throws java.io.IOException {
864 if (extensionRegistry ==
null) {
865 throw new java.lang.NullPointerException();
868 boolean done =
false;
870 int tag = input.readTag();
876 name_ = input.readBytes();
877 bitField0_ |= 0x00000001;
881 numVariables_ = input.readInt32();
882 bitField0_ |= 0x00000002;
888 com.google.ortools.sat.LinearBooleanConstraint.parser(),
890 if (constraintsBuilder_ ==
null) {
891 ensureConstraintsIsMutable();
894 constraintsBuilder_.addMessage(m);
900 getObjectiveFieldBuilder().getBuilder(),
902 bitField0_ |= 0x00000008;
906 com.google.protobuf.ByteString bs = input.readBytes();
907 ensureVarNamesIsMutable();
913 getAssignmentFieldBuilder().getBuilder(),
915 bitField0_ |= 0x00000020;
919 originalNumVariables_ = input.readInt32();
920 bitField0_ |= 0x00000040;
924 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
931 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
932 throw e.unwrapIOException();
938 private int bitField0_;
940 private java.lang.Object name_ =
"";
950 return ((bitField0_ & 0x00000001) != 0);
961 java.lang.Object ref = name_;
962 if (!(ref instanceof java.lang.String)) {
963 com.google.protobuf.ByteString bs =
964 (com.google.protobuf.ByteString) ref;
965 java.lang.String s = bs.toStringUtf8();
966 if (bs.isValidUtf8()) {
971 return (java.lang.String) ref;
982 public com.google.protobuf.ByteString
984 java.lang.Object ref = name_;
985 if (ref instanceof String) {
986 com.google.protobuf.ByteString b =
987 com.google.protobuf.ByteString.copyFromUtf8(
988 (java.lang.String) ref);
992 return (com.google.protobuf.ByteString) ref;
1005 java.lang.String value) {
1006 if (value ==
null) {
throw new NullPointerException(); }
1008 bitField0_ |= 0x00000001;
1022 bitField0_ = (bitField0_ & ~0x00000001);
1036 com.google.protobuf.ByteString value) {
1037 if (value ==
null) {
throw new NullPointerException(); }
1039 bitField0_ |= 0x00000001;
1044 private int numVariables_ ;
1057 return ((bitField0_ & 0x00000002) != 0);
1071 return numVariables_;
1086 numVariables_ = value;
1087 bitField0_ |= 0x00000002;
1102 bitField0_ = (bitField0_ & ~0x00000002);
1108 private java.util.List<com.google.ortools.sat.LinearBooleanConstraint> constraints_ =
1109 java.util.Collections.emptyList();
1110 private void ensureConstraintsIsMutable() {
1111 if (!((bitField0_ & 0x00000004) != 0)) {
1112 constraints_ =
new java.util.ArrayList<com.google.ortools.sat.LinearBooleanConstraint>(constraints_);
1113 bitField0_ |= 0x00000004;
1117 private com.google.protobuf.RepeatedFieldBuilder<
1118 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder> constraintsBuilder_;
1128 if (constraintsBuilder_ ==
null) {
1129 return java.util.Collections.unmodifiableList(constraints_);
1131 return constraintsBuilder_.getMessageList();
1142 if (constraintsBuilder_ ==
null) {
1143 return constraints_.size();
1145 return constraintsBuilder_.getCount();
1156 if (constraintsBuilder_ ==
null) {
1157 return constraints_.get(index);
1159 return constraintsBuilder_.getMessage(index);
1170 int index, com.google.ortools.sat.LinearBooleanConstraint value) {
1171 if (constraintsBuilder_ ==
null) {
1172 if (value ==
null) {
1173 throw new NullPointerException();
1175 ensureConstraintsIsMutable();
1176 constraints_.set(index, value);
1179 constraintsBuilder_.setMessage(index, value);
1191 int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1192 if (constraintsBuilder_ ==
null) {
1193 ensureConstraintsIsMutable();
1194 constraints_.set(index, builderForValue.build());
1197 constraintsBuilder_.setMessage(index, builderForValue.build());
1208 public Builder
addConstraints(com.google.ortools.sat.LinearBooleanConstraint value) {
1209 if (constraintsBuilder_ ==
null) {
1210 if (value ==
null) {
1211 throw new NullPointerException();
1213 ensureConstraintsIsMutable();
1214 constraints_.add(value);
1217 constraintsBuilder_.addMessage(value);
1229 int index, com.google.ortools.sat.LinearBooleanConstraint value) {
1230 if (constraintsBuilder_ ==
null) {
1231 if (value ==
null) {
1232 throw new NullPointerException();
1234 ensureConstraintsIsMutable();
1235 constraints_.add(index, value);
1238 constraintsBuilder_.addMessage(index, value);
1250 com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1251 if (constraintsBuilder_ ==
null) {
1252 ensureConstraintsIsMutable();
1253 constraints_.add(builderForValue.build());
1256 constraintsBuilder_.addMessage(builderForValue.build());
1268 int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1269 if (constraintsBuilder_ ==
null) {
1270 ensureConstraintsIsMutable();
1271 constraints_.add(index, builderForValue.build());
1274 constraintsBuilder_.addMessage(index, builderForValue.build());
1286 java.lang.Iterable<? extends com.google.ortools.sat.LinearBooleanConstraint> values) {
1287 if (constraintsBuilder_ ==
null) {
1288 ensureConstraintsIsMutable();
1289 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1290 values, constraints_);
1293 constraintsBuilder_.addAllMessages(values);
1305 if (constraintsBuilder_ ==
null) {
1306 constraints_ = java.util.Collections.emptyList();
1307 bitField0_ = (bitField0_ & ~0x00000004);
1310 constraintsBuilder_.clear();
1322 if (constraintsBuilder_ ==
null) {
1323 ensureConstraintsIsMutable();
1324 constraints_.remove(index);
1327 constraintsBuilder_.remove(index);
1340 return getConstraintsFieldBuilder().getBuilder(index);
1351 if (constraintsBuilder_ ==
null) {
1352 return constraints_.get(index); }
else {
1353 return constraintsBuilder_.getMessageOrBuilder(index);
1363 public java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
1365 if (constraintsBuilder_ !=
null) {
1366 return constraintsBuilder_.getMessageOrBuilderList();
1368 return java.util.Collections.unmodifiableList(constraints_);
1379 return getConstraintsFieldBuilder().addBuilder(
1380 com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance());
1391 return getConstraintsFieldBuilder().addBuilder(
1392 index, com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance());
1401 public java.util.List<com.google.ortools.sat.LinearBooleanConstraint.Builder>
1403 return getConstraintsFieldBuilder().getBuilderList();
1405 private com.google.protobuf.RepeatedFieldBuilder<
1406 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
1407 getConstraintsFieldBuilder() {
1408 if (constraintsBuilder_ ==
null) {
1409 constraintsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1410 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder>(
1412 ((bitField0_ & 0x00000004) != 0),
1413 getParentForChildren(),
1415 constraints_ =
null;
1417 return constraintsBuilder_;
1421 private com.google.protobuf.SingleFieldBuilder<
1422 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder> objectiveBuilder_;
1433 return ((bitField0_ & 0x00000008) != 0);
1445 if (objectiveBuilder_ ==
null) {
1446 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
1448 return objectiveBuilder_.getMessage();
1459 public Builder
setObjective(com.google.ortools.sat.LinearObjective value) {
1460 if (objectiveBuilder_ ==
null) {
1461 if (value ==
null) {
1462 throw new NullPointerException();
1466 objectiveBuilder_.setMessage(value);
1468 bitField0_ |= 0x00000008;
1481 com.google.ortools.sat.LinearObjective.Builder builderForValue) {
1482 if (objectiveBuilder_ ==
null) {
1483 objective_ = builderForValue.build();
1485 objectiveBuilder_.setMessage(builderForValue.build());
1487 bitField0_ |= 0x00000008;
1500 if (objectiveBuilder_ ==
null) {
1501 if (((bitField0_ & 0x00000008) != 0) &&
1502 objective_ !=
null &&
1503 objective_ != com.google.ortools.sat.LinearObjective.getDefaultInstance()) {
1509 objectiveBuilder_.mergeFrom(value);
1511 if (objective_ !=
null) {
1512 bitField0_ |= 0x00000008;
1526 bitField0_ = (bitField0_ & ~0x00000008);
1528 if (objectiveBuilder_ !=
null) {
1529 objectiveBuilder_.dispose();
1530 objectiveBuilder_ =
null;
1544 bitField0_ |= 0x00000008;
1546 return getObjectiveFieldBuilder().getBuilder();
1557 if (objectiveBuilder_ !=
null) {
1558 return objectiveBuilder_.getMessageOrBuilder();
1560 return objective_ ==
null ?
1561 com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
1572 private com.google.protobuf.SingleFieldBuilder<
1573 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder>
1574 getObjectiveFieldBuilder() {
1575 if (objectiveBuilder_ ==
null) {
1576 objectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1577 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder>(
1579 getParentForChildren(),
1583 return objectiveBuilder_;
1586 private com.google.protobuf.LazyStringArrayList varNames_ =
1587 com.google.protobuf.LazyStringArrayList.emptyList();
1588 private void ensureVarNamesIsMutable() {
1589 if (!varNames_.isModifiable()) {
1590 varNames_ =
new com.google.protobuf.LazyStringArrayList(varNames_);
1592 bitField0_ |= 0x00000010;
1604 public com.google.protobuf.ProtocolStringList
1606 varNames_.makeImmutable();
1620 return varNames_.size();
1634 return varNames_.get(index);
1647 public com.google.protobuf.ByteString
1649 return varNames_.getByteString(index);
1664 int index, java.lang.String value) {
1665 if (value ==
null) {
throw new NullPointerException(); }
1666 ensureVarNamesIsMutable();
1667 varNames_.set(index, value);
1668 bitField0_ |= 0x00000010;
1684 java.lang.String value) {
1685 if (value ==
null) {
throw new NullPointerException(); }
1686 ensureVarNamesIsMutable();
1687 varNames_.add(value);
1688 bitField0_ |= 0x00000010;
1704 java.lang.Iterable<java.lang.String> values) {
1705 ensureVarNamesIsMutable();
1706 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1708 bitField0_ |= 0x00000010;
1724 com.google.protobuf.LazyStringArrayList.emptyList();
1725 bitField0_ = (bitField0_ & ~0x00000010);;
1741 com.google.protobuf.ByteString value) {
1742 if (value ==
null) {
throw new NullPointerException(); }
1743 ensureVarNamesIsMutable();
1744 varNames_.add(value);
1745 bitField0_ |= 0x00000010;
1751 private com.google.protobuf.SingleFieldBuilder<
1752 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder> assignmentBuilder_;
1763 return ((bitField0_ & 0x00000020) != 0);
1775 if (assignmentBuilder_ ==
null) {
1776 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
1778 return assignmentBuilder_.getMessage();
1790 if (assignmentBuilder_ ==
null) {
1791 if (value ==
null) {
1792 throw new NullPointerException();
1794 assignment_ = value;
1796 assignmentBuilder_.setMessage(value);
1798 bitField0_ |= 0x00000020;
1811 com.google.ortools.sat.BooleanAssignment.Builder builderForValue) {
1812 if (assignmentBuilder_ ==
null) {
1813 assignment_ = builderForValue.build();
1815 assignmentBuilder_.setMessage(builderForValue.build());
1817 bitField0_ |= 0x00000020;
1830 if (assignmentBuilder_ ==
null) {
1831 if (((bitField0_ & 0x00000020) != 0) &&
1832 assignment_ !=
null &&
1833 assignment_ != com.google.ortools.sat.BooleanAssignment.getDefaultInstance()) {
1836 assignment_ = value;
1839 assignmentBuilder_.mergeFrom(value);
1841 if (assignment_ !=
null) {
1842 bitField0_ |= 0x00000020;
1856 bitField0_ = (bitField0_ & ~0x00000020);
1858 if (assignmentBuilder_ !=
null) {
1859 assignmentBuilder_.dispose();
1860 assignmentBuilder_ =
null;
1874 bitField0_ |= 0x00000020;
1876 return getAssignmentFieldBuilder().getBuilder();
1887 if (assignmentBuilder_ !=
null) {
1888 return assignmentBuilder_.getMessageOrBuilder();
1890 return assignment_ ==
null ?
1891 com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
1902 private com.google.protobuf.SingleFieldBuilder<
1903 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder>
1904 getAssignmentFieldBuilder() {
1905 if (assignmentBuilder_ ==
null) {
1906 assignmentBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1907 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder>(
1909 getParentForChildren(),
1913 return assignmentBuilder_;
1916 private int originalNumVariables_ ;
1930 return ((bitField0_ & 0x00000040) != 0);
1945 return originalNumVariables_;
1961 originalNumVariables_ = value;
1962 bitField0_ |= 0x00000040;
1978 bitField0_ = (bitField0_ & ~0x00000040);
1979 originalNumVariables_ = 0;
1990 DEFAULT_INSTANCE =
new com.google.ortools.sat.LinearBooleanProblem();
1994 return DEFAULT_INSTANCE;
2001 com.google.protobuf.CodedInputStream input,
2002 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2003 throws com.google.protobuf.InvalidProtocolBufferException {
2006 builder.mergeFrom(input, extensionRegistry);
2007 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
2008 throw e.setUnfinishedMessage(builder.buildPartial());
2009 }
catch (com.google.protobuf.UninitializedMessageException e) {
2010 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2011 }
catch (java.io.IOException e) {
2012 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2013 .setUnfinishedMessage(builder.buildPartial());
2015 return builder.buildPartial();
2019 public static com.google.protobuf.Parser<LinearBooleanProblem>
parser() {
2030 return DEFAULT_INSTANCE;