6package com.google.ortools.sat;
15@com.google.protobuf.Generated
16public final class LinearBooleanProblem
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 LinearBooleanProblem.class.getName());
31 private LinearBooleanProblem(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private LinearBooleanProblem() {
36 constraints_ = java.util.Collections.emptyList();
38 com.google.protobuf.LazyStringArrayList.emptyList();
41 public static final com.google.protobuf.Descriptors.Descriptor
43 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
47 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
49 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_fieldAccessorTable
50 .ensureFieldAccessorsInitialized(
51 com.google.ortools.sat.LinearBooleanProblem.class, com.google.ortools.sat.LinearBooleanProblem.Builder.class);
54 private int bitField0_;
56 @SuppressWarnings(
"serial")
57 private volatile java.lang.Object name_ =
"";
68 return ((bitField0_ & 0x00000001) != 0);
80 java.lang.Object ref = name_;
81 if (ref instanceof java.lang.String) {
82 return (java.lang.String) ref;
84 com.google.protobuf.ByteString bs =
85 (com.google.protobuf.ByteString) ref;
86 java.lang.String s = bs.toStringUtf8();
87 if (bs.isValidUtf8()) {
102 public com.google.protobuf.ByteString
104 java.lang.Object ref = name_;
105 if (ref instanceof java.lang.String) {
106 com.google.protobuf.ByteString b =
107 com.google.protobuf.ByteString.copyFromUtf8(
108 (java.lang.String) ref);
112 return (com.google.protobuf.ByteString) ref;
117 private int numVariables_ = 0;
130 return ((bitField0_ & 0x00000002) != 0);
144 return numVariables_;
148 @SuppressWarnings(
"serial")
169 public java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
182 return constraints_.size();
193 return constraints_.get(index);
205 return constraints_.get(index);
221 return ((bitField0_ & 0x00000004) != 0);
234 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
246 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
250 @SuppressWarnings(
"serial")
251 private com.google.protobuf.LazyStringArrayList varNames_ =
252 com.google.protobuf.LazyStringArrayList.emptyList();
263 public com.google.protobuf.ProtocolStringList
278 return varNames_.size();
292 return varNames_.get(index);
305 public com.google.protobuf.ByteString
307 return varNames_.getByteString(index);
323 return ((bitField0_ & 0x00000008) != 0);
336 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
348 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
352 private int originalNumVariables_ = 0;
366 return ((bitField0_ & 0x00000010) != 0);
381 return originalNumVariables_;
384 private byte memoizedIsInitialized = -1;
391 memoizedIsInitialized = 1;
396 public void writeTo(com.google.protobuf.CodedOutputStream output)
397 throws java.io.IOException {
398 if (((bitField0_ & 0x00000001) != 0)) {
399 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
401 if (((bitField0_ & 0x00000002) != 0)) {
402 output.writeInt32(3, numVariables_);
404 for (
int i = 0; i < constraints_.size(); i++) {
405 output.writeMessage(4, constraints_.get(i));
407 if (((bitField0_ & 0x00000004) != 0)) {
410 for (
int i = 0; i < varNames_.size(); i++) {
411 com.google.protobuf.GeneratedMessage.writeString(output, 6, varNames_.getRaw(i));
413 if (((bitField0_ & 0x00000008) != 0)) {
416 if (((bitField0_ & 0x00000010) != 0)) {
417 output.writeInt32(8, originalNumVariables_);
419 getUnknownFields().writeTo(output);
424 int size = memoizedSize;
425 if (size != -1)
return size;
428 if (((bitField0_ & 0x00000001) != 0)) {
429 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
431 if (((bitField0_ & 0x00000002) != 0)) {
432 size += com.google.protobuf.CodedOutputStream
433 .computeInt32Size(3, numVariables_);
435 for (
int i = 0; i < constraints_.size(); i++) {
436 size += com.google.protobuf.CodedOutputStream
437 .computeMessageSize(4, constraints_.get(i));
439 if (((bitField0_ & 0x00000004) != 0)) {
440 size += com.google.protobuf.CodedOutputStream
445 for (
int i = 0; i < varNames_.size(); i++) {
446 dataSize += computeStringSizeNoTag(varNames_.getRaw(i));
451 if (((bitField0_ & 0x00000008) != 0)) {
452 size += com.google.protobuf.CodedOutputStream
455 if (((bitField0_ & 0x00000010) != 0)) {
456 size += com.google.protobuf.CodedOutputStream
457 .computeInt32Size(8, originalNumVariables_);
459 size += getUnknownFields().getSerializedSize();
465 public boolean equals(
final java.lang.Object obj) {
469 if (!(obj instanceof com.google.ortools.sat.LinearBooleanProblem)) {
470 return super.equals(obj);
503 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
509 if (memoizedHashCode != 0) {
510 return memoizedHashCode;
516 hash = (53 * hash) +
getName().hashCode();
542 hash = (29 * hash) + getUnknownFields().hashCode();
543 memoizedHashCode = hash;
548 java.nio.ByteBuffer data)
549 throws com.google.protobuf.InvalidProtocolBufferException {
550 return PARSER.parseFrom(data);
553 java.nio.ByteBuffer data,
554 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
555 throws com.google.protobuf.InvalidProtocolBufferException {
556 return PARSER.parseFrom(data, extensionRegistry);
559 com.google.protobuf.ByteString data)
560 throws com.google.protobuf.InvalidProtocolBufferException {
561 return PARSER.parseFrom(data);
564 com.google.protobuf.ByteString data,
565 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
566 throws com.google.protobuf.InvalidProtocolBufferException {
567 return PARSER.parseFrom(data, extensionRegistry);
570 throws com.google.protobuf.InvalidProtocolBufferException {
571 return PARSER.parseFrom(data);
575 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
576 throws com.google.protobuf.InvalidProtocolBufferException {
577 return PARSER.parseFrom(data, extensionRegistry);
580 throws java.io.IOException {
581 return com.google.protobuf.GeneratedMessage
582 .parseWithIOException(PARSER, input);
585 java.io.InputStream input,
586 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
587 throws java.io.IOException {
588 return com.google.protobuf.GeneratedMessage
589 .parseWithIOException(PARSER, input, extensionRegistry);
593 throws java.io.IOException {
594 return com.google.protobuf.GeneratedMessage
595 .parseDelimitedWithIOException(PARSER, input);
599 java.io.InputStream input,
600 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
601 throws java.io.IOException {
602 return com.google.protobuf.GeneratedMessage
603 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
606 com.google.protobuf.CodedInputStream input)
607 throws java.io.IOException {
608 return com.google.protobuf.GeneratedMessage
609 .parseWithIOException(PARSER, input);
612 com.google.protobuf.CodedInputStream input,
613 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
614 throws java.io.IOException {
615 return com.google.protobuf.GeneratedMessage
616 .parseWithIOException(PARSER, input, extensionRegistry);
622 return DEFAULT_INSTANCE.toBuilder();
625 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
629 return this == DEFAULT_INSTANCE
635 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
646 public static final class Builder
extends
647 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
650 public static final com.google.protobuf.Descriptors.Descriptor
652 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
656 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
658 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_fieldAccessorTable
659 .ensureFieldAccessorsInitialized(
660 com.google.ortools.sat.LinearBooleanProblem.class, com.google.ortools.sat.LinearBooleanProblem.Builder.class);
665 maybeForceBuilderInitialization();
669 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
671 maybeForceBuilderInitialization();
673 private void maybeForceBuilderInitialization() {
674 if (com.google.protobuf.GeneratedMessage
675 .alwaysUseFieldBuilders) {
676 internalGetConstraintsFieldBuilder();
677 internalGetObjectiveFieldBuilder();
678 internalGetAssignmentFieldBuilder();
687 if (constraintsBuilder_ ==
null) {
688 constraints_ = java.util.Collections.emptyList();
691 constraintsBuilder_.clear();
693 bitField0_ = (bitField0_ & ~0x00000004);
695 if (objectiveBuilder_ !=
null) {
696 objectiveBuilder_.dispose();
697 objectiveBuilder_ =
null;
700 com.google.protobuf.LazyStringArrayList.emptyList();
702 if (assignmentBuilder_ !=
null) {
703 assignmentBuilder_.dispose();
704 assignmentBuilder_ =
null;
706 originalNumVariables_ = 0;
711 public com.google.protobuf.Descriptors.Descriptor
713 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanProblem_descriptor;
718 return com.google.ortools.sat.LinearBooleanProblem.getDefaultInstance();
725 throw newUninitializedMessageException(result);
733 buildPartialRepeatedFields(result);
734 if (bitField0_ != 0) { buildPartial0(result); }
739 private void buildPartialRepeatedFields(com.google.ortools.sat.LinearBooleanProblem result) {
740 if (constraintsBuilder_ ==
null) {
741 if (((bitField0_ & 0x00000004) != 0)) {
742 constraints_ = java.util.Collections.unmodifiableList(constraints_);
743 bitField0_ = (bitField0_ & ~0x00000004);
745 result.constraints_ = constraints_;
747 result.constraints_ = constraintsBuilder_.build();
751 private void buildPartial0(com.google.ortools.sat.LinearBooleanProblem result) {
752 int from_bitField0_ = bitField0_;
753 int to_bitField0_ = 0;
754 if (((from_bitField0_ & 0x00000001) != 0)) {
755 result.name_ = name_;
756 to_bitField0_ |= 0x00000001;
758 if (((from_bitField0_ & 0x00000002) != 0)) {
759 result.numVariables_ = numVariables_;
760 to_bitField0_ |= 0x00000002;
762 if (((from_bitField0_ & 0x00000008) != 0)) {
763 result.objective_ = objectiveBuilder_ ==
null
765 : objectiveBuilder_.build();
766 to_bitField0_ |= 0x00000004;
768 if (((from_bitField0_ & 0x00000010) != 0)) {
769 varNames_.makeImmutable();
770 result.varNames_ = varNames_;
772 if (((from_bitField0_ & 0x00000020) != 0)) {
773 result.assignment_ = assignmentBuilder_ ==
null
775 : assignmentBuilder_.build();
776 to_bitField0_ |= 0x00000008;
778 if (((from_bitField0_ & 0x00000040) != 0)) {
779 result.originalNumVariables_ = originalNumVariables_;
780 to_bitField0_ |= 0x00000010;
782 result.bitField0_ |= to_bitField0_;
786 public Builder
mergeFrom(com.google.protobuf.Message other) {
787 if (other instanceof com.google.ortools.sat.LinearBooleanProblem) {
788 return mergeFrom((com.google.ortools.sat.LinearBooleanProblem)other);
790 super.mergeFrom(other);
795 public Builder
mergeFrom(com.google.ortools.sat.LinearBooleanProblem other) {
796 if (other == com.google.ortools.sat.LinearBooleanProblem.getDefaultInstance())
return this;
797 if (other.hasName()) {
799 bitField0_ |= 0x00000001;
802 if (other.hasNumVariables()) {
805 if (constraintsBuilder_ ==
null) {
806 if (!other.constraints_.isEmpty()) {
807 if (constraints_.isEmpty()) {
808 constraints_ = other.constraints_;
809 bitField0_ = (bitField0_ & ~0x00000004);
811 ensureConstraintsIsMutable();
812 constraints_.addAll(other.constraints_);
817 if (!other.constraints_.isEmpty()) {
818 if (constraintsBuilder_.isEmpty()) {
819 constraintsBuilder_.dispose();
820 constraintsBuilder_ =
null;
821 constraints_ = other.constraints_;
822 bitField0_ = (bitField0_ & ~0x00000004);
823 constraintsBuilder_ =
824 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
825 internalGetConstraintsFieldBuilder() :
null;
827 constraintsBuilder_.addAllMessages(other.constraints_);
831 if (other.hasObjective()) {
834 if (!other.varNames_.isEmpty()) {
835 if (varNames_.isEmpty()) {
836 varNames_ = other.varNames_;
837 bitField0_ |= 0x00000010;
839 ensureVarNamesIsMutable();
840 varNames_.addAll(other.varNames_);
844 if (other.hasAssignment()) {
847 if (other.hasOriginalNumVariables()) {
850 this.mergeUnknownFields(other.getUnknownFields());
862 com.google.protobuf.CodedInputStream input,
863 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
864 throws java.io.IOException {
865 if (extensionRegistry ==
null) {
866 throw new java.lang.NullPointerException();
869 boolean done =
false;
871 int tag = input.readTag();
877 name_ = input.readBytes();
878 bitField0_ |= 0x00000001;
882 numVariables_ = input.readInt32();
883 bitField0_ |= 0x00000002;
889 com.google.ortools.sat.LinearBooleanConstraint.parser(),
891 if (constraintsBuilder_ ==
null) {
892 ensureConstraintsIsMutable();
895 constraintsBuilder_.addMessage(m);
901 internalGetObjectiveFieldBuilder().getBuilder(),
903 bitField0_ |= 0x00000008;
907 com.google.protobuf.ByteString bs = input.readBytes();
908 ensureVarNamesIsMutable();
914 internalGetAssignmentFieldBuilder().getBuilder(),
916 bitField0_ |= 0x00000020;
920 originalNumVariables_ = input.readInt32();
921 bitField0_ |= 0x00000040;
925 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
932 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
933 throw e.unwrapIOException();
939 private int bitField0_;
941 private java.lang.Object name_ =
"";
951 return ((bitField0_ & 0x00000001) != 0);
962 java.lang.Object ref = name_;
963 if (!(ref instanceof java.lang.String)) {
964 com.google.protobuf.ByteString bs =
965 (com.google.protobuf.ByteString) ref;
966 java.lang.String s = bs.toStringUtf8();
967 if (bs.isValidUtf8()) {
972 return (java.lang.String) ref;
983 public com.google.protobuf.ByteString
985 java.lang.Object ref = name_;
986 if (ref instanceof String) {
987 com.google.protobuf.ByteString b =
988 com.google.protobuf.ByteString.copyFromUtf8(
989 (java.lang.String) ref);
993 return (com.google.protobuf.ByteString) ref;
1006 java.lang.String value) {
1007 if (value ==
null) {
throw new NullPointerException(); }
1009 bitField0_ |= 0x00000001;
1023 bitField0_ = (bitField0_ & ~0x00000001);
1037 com.google.protobuf.ByteString value) {
1038 if (value ==
null) {
throw new NullPointerException(); }
1040 bitField0_ |= 0x00000001;
1045 private int numVariables_ ;
1058 return ((bitField0_ & 0x00000002) != 0);
1072 return numVariables_;
1087 numVariables_ = value;
1088 bitField0_ |= 0x00000002;
1103 bitField0_ = (bitField0_ & ~0x00000002);
1109 private java.util.List<com.google.ortools.sat.LinearBooleanConstraint> constraints_ =
1110 java.util.Collections.emptyList();
1111 private void ensureConstraintsIsMutable() {
1112 if (!((bitField0_ & 0x00000004) != 0)) {
1113 constraints_ =
new java.util.ArrayList<com.google.ortools.sat.LinearBooleanConstraint>(constraints_);
1114 bitField0_ |= 0x00000004;
1118 private com.google.protobuf.RepeatedFieldBuilder<
1119 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder> constraintsBuilder_;
1129 if (constraintsBuilder_ ==
null) {
1130 return java.util.Collections.unmodifiableList(constraints_);
1132 return constraintsBuilder_.getMessageList();
1143 if (constraintsBuilder_ ==
null) {
1144 return constraints_.size();
1146 return constraintsBuilder_.getCount();
1157 if (constraintsBuilder_ ==
null) {
1158 return constraints_.get(index);
1160 return constraintsBuilder_.getMessage(index);
1171 int index, com.google.ortools.sat.LinearBooleanConstraint value) {
1172 if (constraintsBuilder_ ==
null) {
1173 if (value ==
null) {
1174 throw new NullPointerException();
1176 ensureConstraintsIsMutable();
1177 constraints_.set(index, value);
1180 constraintsBuilder_.setMessage(index, value);
1192 int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1193 if (constraintsBuilder_ ==
null) {
1194 ensureConstraintsIsMutable();
1195 constraints_.set(index, builderForValue.build());
1198 constraintsBuilder_.setMessage(index, builderForValue.build());
1209 public Builder
addConstraints(com.google.ortools.sat.LinearBooleanConstraint value) {
1210 if (constraintsBuilder_ ==
null) {
1211 if (value ==
null) {
1212 throw new NullPointerException();
1214 ensureConstraintsIsMutable();
1215 constraints_.add(value);
1218 constraintsBuilder_.addMessage(value);
1230 int index, com.google.ortools.sat.LinearBooleanConstraint value) {
1231 if (constraintsBuilder_ ==
null) {
1232 if (value ==
null) {
1233 throw new NullPointerException();
1235 ensureConstraintsIsMutable();
1236 constraints_.add(index, value);
1239 constraintsBuilder_.addMessage(index, value);
1251 com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1252 if (constraintsBuilder_ ==
null) {
1253 ensureConstraintsIsMutable();
1254 constraints_.add(builderForValue.build());
1257 constraintsBuilder_.addMessage(builderForValue.build());
1269 int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue) {
1270 if (constraintsBuilder_ ==
null) {
1271 ensureConstraintsIsMutable();
1272 constraints_.add(index, builderForValue.build());
1275 constraintsBuilder_.addMessage(index, builderForValue.build());
1287 java.lang.Iterable<? extends com.google.ortools.sat.LinearBooleanConstraint> values) {
1288 if (constraintsBuilder_ ==
null) {
1289 ensureConstraintsIsMutable();
1290 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1291 values, constraints_);
1294 constraintsBuilder_.addAllMessages(values);
1306 if (constraintsBuilder_ ==
null) {
1307 constraints_ = java.util.Collections.emptyList();
1308 bitField0_ = (bitField0_ & ~0x00000004);
1311 constraintsBuilder_.clear();
1323 if (constraintsBuilder_ ==
null) {
1324 ensureConstraintsIsMutable();
1325 constraints_.remove(index);
1328 constraintsBuilder_.remove(index);
1341 return internalGetConstraintsFieldBuilder().getBuilder(index);
1352 if (constraintsBuilder_ ==
null) {
1353 return constraints_.get(index); }
else {
1354 return constraintsBuilder_.getMessageOrBuilder(index);
1364 public java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
1366 if (constraintsBuilder_ !=
null) {
1367 return constraintsBuilder_.getMessageOrBuilderList();
1369 return java.util.Collections.unmodifiableList(constraints_);
1380 return internalGetConstraintsFieldBuilder().addBuilder(
1381 com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance());
1392 return internalGetConstraintsFieldBuilder().addBuilder(
1393 index, com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance());
1402 public java.util.List<com.google.ortools.sat.LinearBooleanConstraint.Builder>
1404 return internalGetConstraintsFieldBuilder().getBuilderList();
1406 private com.google.protobuf.RepeatedFieldBuilder<
1407 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder>
1408 internalGetConstraintsFieldBuilder() {
1409 if (constraintsBuilder_ ==
null) {
1410 constraintsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1411 com.google.ortools.sat.LinearBooleanConstraint, com.google.ortools.sat.LinearBooleanConstraint.Builder, com.google.ortools.sat.LinearBooleanConstraintOrBuilder>(
1413 ((bitField0_ & 0x00000004) != 0),
1414 getParentForChildren(),
1416 constraints_ =
null;
1418 return constraintsBuilder_;
1422 private com.google.protobuf.SingleFieldBuilder<
1423 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder> objectiveBuilder_;
1434 return ((bitField0_ & 0x00000008) != 0);
1446 if (objectiveBuilder_ ==
null) {
1447 return objective_ ==
null ? com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
1449 return objectiveBuilder_.getMessage();
1460 public Builder
setObjective(com.google.ortools.sat.LinearObjective value) {
1461 if (objectiveBuilder_ ==
null) {
1462 if (value ==
null) {
1463 throw new NullPointerException();
1467 objectiveBuilder_.setMessage(value);
1469 bitField0_ |= 0x00000008;
1482 com.google.ortools.sat.LinearObjective.Builder builderForValue) {
1483 if (objectiveBuilder_ ==
null) {
1484 objective_ = builderForValue.build();
1486 objectiveBuilder_.setMessage(builderForValue.build());
1488 bitField0_ |= 0x00000008;
1501 if (objectiveBuilder_ ==
null) {
1502 if (((bitField0_ & 0x00000008) != 0) &&
1503 objective_ !=
null &&
1504 objective_ != com.google.ortools.sat.LinearObjective.getDefaultInstance()) {
1510 objectiveBuilder_.mergeFrom(value);
1512 if (objective_ !=
null) {
1513 bitField0_ |= 0x00000008;
1527 bitField0_ = (bitField0_ & ~0x00000008);
1529 if (objectiveBuilder_ !=
null) {
1530 objectiveBuilder_.dispose();
1531 objectiveBuilder_ =
null;
1545 bitField0_ |= 0x00000008;
1547 return internalGetObjectiveFieldBuilder().getBuilder();
1558 if (objectiveBuilder_ !=
null) {
1559 return objectiveBuilder_.getMessageOrBuilder();
1561 return objective_ ==
null ?
1562 com.google.ortools.sat.LinearObjective.getDefaultInstance() : objective_;
1573 private com.google.protobuf.SingleFieldBuilder<
1574 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder>
1575 internalGetObjectiveFieldBuilder() {
1576 if (objectiveBuilder_ ==
null) {
1577 objectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1578 com.google.ortools.sat.LinearObjective, com.google.ortools.sat.LinearObjective.Builder, com.google.ortools.sat.LinearObjectiveOrBuilder>(
1580 getParentForChildren(),
1584 return objectiveBuilder_;
1587 private com.google.protobuf.LazyStringArrayList varNames_ =
1588 com.google.protobuf.LazyStringArrayList.emptyList();
1589 private void ensureVarNamesIsMutable() {
1590 if (!varNames_.isModifiable()) {
1591 varNames_ =
new com.google.protobuf.LazyStringArrayList(varNames_);
1593 bitField0_ |= 0x00000010;
1605 public com.google.protobuf.ProtocolStringList
1607 varNames_.makeImmutable();
1621 return varNames_.size();
1635 return varNames_.get(index);
1648 public com.google.protobuf.ByteString
1650 return varNames_.getByteString(index);
1665 int index, java.lang.String value) {
1666 if (value ==
null) {
throw new NullPointerException(); }
1667 ensureVarNamesIsMutable();
1668 varNames_.set(index, value);
1669 bitField0_ |= 0x00000010;
1685 java.lang.String value) {
1686 if (value ==
null) {
throw new NullPointerException(); }
1687 ensureVarNamesIsMutable();
1688 varNames_.add(value);
1689 bitField0_ |= 0x00000010;
1705 java.lang.Iterable<java.lang.String> values) {
1706 ensureVarNamesIsMutable();
1707 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1709 bitField0_ |= 0x00000010;
1725 com.google.protobuf.LazyStringArrayList.emptyList();
1726 bitField0_ = (bitField0_ & ~0x00000010);;
1742 com.google.protobuf.ByteString value) {
1743 if (value ==
null) {
throw new NullPointerException(); }
1744 ensureVarNamesIsMutable();
1745 varNames_.add(value);
1746 bitField0_ |= 0x00000010;
1752 private com.google.protobuf.SingleFieldBuilder<
1753 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder> assignmentBuilder_;
1764 return ((bitField0_ & 0x00000020) != 0);
1776 if (assignmentBuilder_ ==
null) {
1777 return assignment_ ==
null ? com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
1779 return assignmentBuilder_.getMessage();
1791 if (assignmentBuilder_ ==
null) {
1792 if (value ==
null) {
1793 throw new NullPointerException();
1795 assignment_ = value;
1797 assignmentBuilder_.setMessage(value);
1799 bitField0_ |= 0x00000020;
1812 com.google.ortools.sat.BooleanAssignment.Builder builderForValue) {
1813 if (assignmentBuilder_ ==
null) {
1814 assignment_ = builderForValue.build();
1816 assignmentBuilder_.setMessage(builderForValue.build());
1818 bitField0_ |= 0x00000020;
1831 if (assignmentBuilder_ ==
null) {
1832 if (((bitField0_ & 0x00000020) != 0) &&
1833 assignment_ !=
null &&
1834 assignment_ != com.google.ortools.sat.BooleanAssignment.getDefaultInstance()) {
1837 assignment_ = value;
1840 assignmentBuilder_.mergeFrom(value);
1842 if (assignment_ !=
null) {
1843 bitField0_ |= 0x00000020;
1857 bitField0_ = (bitField0_ & ~0x00000020);
1859 if (assignmentBuilder_ !=
null) {
1860 assignmentBuilder_.dispose();
1861 assignmentBuilder_ =
null;
1875 bitField0_ |= 0x00000020;
1877 return internalGetAssignmentFieldBuilder().getBuilder();
1888 if (assignmentBuilder_ !=
null) {
1889 return assignmentBuilder_.getMessageOrBuilder();
1891 return assignment_ ==
null ?
1892 com.google.ortools.sat.BooleanAssignment.getDefaultInstance() : assignment_;
1903 private com.google.protobuf.SingleFieldBuilder<
1904 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder>
1905 internalGetAssignmentFieldBuilder() {
1906 if (assignmentBuilder_ ==
null) {
1907 assignmentBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1908 com.google.ortools.sat.BooleanAssignment, com.google.ortools.sat.BooleanAssignment.Builder, com.google.ortools.sat.BooleanAssignmentOrBuilder>(
1910 getParentForChildren(),
1914 return assignmentBuilder_;
1917 private int originalNumVariables_ ;
1931 return ((bitField0_ & 0x00000040) != 0);
1946 return originalNumVariables_;
1962 originalNumVariables_ = value;
1963 bitField0_ |= 0x00000040;
1979 bitField0_ = (bitField0_ & ~0x00000040);
1980 originalNumVariables_ = 0;
1991 DEFAULT_INSTANCE =
new com.google.ortools.sat.LinearBooleanProblem();
1995 return DEFAULT_INSTANCE;
2002 com.google.protobuf.CodedInputStream input,
2003 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2004 throws com.google.protobuf.InvalidProtocolBufferException {
2007 builder.mergeFrom(input, extensionRegistry);
2008 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
2009 throw e.setUnfinishedMessage(builder.buildPartial());
2010 }
catch (com.google.protobuf.UninitializedMessageException e) {
2011 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2012 }
catch (java.io.IOException e) {
2013 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2014 .setUnfinishedMessage(builder.buildPartial());
2016 return builder.buildPartial();
2020 public static com.google.protobuf.Parser<LinearBooleanProblem>
parser() {
2031 return DEFAULT_INSTANCE;