Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
LinearBooleanConstraint.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/sat/boolean_problem.proto
4// Protobuf Java Version: 4.29.3
5
6package com.google.ortools.sat;
7
18public final class LinearBooleanConstraint extends
19 com.google.protobuf.GeneratedMessage implements
20 // @@protoc_insertion_point(message_implements:operations_research.sat.LinearBooleanConstraint)
22private static final long serialVersionUID = 0L;
23 static {
24 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
25 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
26 /* major= */ 4,
27 /* minor= */ 29,
28 /* patch= */ 3,
29 /* suffix= */ "",
30 LinearBooleanConstraint.class.getName());
31 }
32 // Use LinearBooleanConstraint.newBuilder() to construct.
33 private LinearBooleanConstraint(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 super(builder);
35 }
36 private LinearBooleanConstraint() {
37 literals_ = emptyIntList();
38 coefficients_ = emptyLongList();
39 name_ = "";
40 }
41
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanConstraint_descriptor;
45 }
46
47 @java.lang.Override
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanConstraint_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.sat.LinearBooleanConstraint.class, com.google.ortools.sat.LinearBooleanConstraint.Builder.class);
53 }
54
55 private int bitField0_;
56 public static final int LITERALS_FIELD_NUMBER = 1;
57 @SuppressWarnings("serial")
58 private com.google.protobuf.Internal.IntList literals_ =
59 emptyIntList();
76 @java.lang.Override
77 public java.util.List<java.lang.Integer>
79 return literals_;
80 }
81
97 public int getLiteralsCount() {
98 return literals_.size();
99 }
100
117 public int getLiterals(int index) {
118 return literals_.getInt(index);
119 }
120
121 public static final int COEFFICIENTS_FIELD_NUMBER = 2;
122 @SuppressWarnings("serial")
123 private com.google.protobuf.Internal.LongList coefficients_ =
124 emptyLongList();
129 @java.lang.Override
130 public java.util.List<java.lang.Long>
132 return coefficients_;
133 }
134
138 public int getCoefficientsCount() {
139 return coefficients_.size();
140 }
141
146 public long getCoefficients(int index) {
147 return coefficients_.getLong(index);
148 }
149
150 public static final int LOWER_BOUND_FIELD_NUMBER = 3;
151 private long lowerBound_ = 0L;
162 @java.lang.Override
163 public boolean hasLowerBound() {
164 return ((bitField0_ & 0x00000001) != 0);
165 }
166
176 @java.lang.Override
177 public long getLowerBound() {
178 return lowerBound_;
179 }
180
181 public static final int UPPER_BOUND_FIELD_NUMBER = 4;
182 private long upperBound_ = 0L;
187 @java.lang.Override
188 public boolean hasUpperBound() {
189 return ((bitField0_ & 0x00000002) != 0);
190 }
191
195 @java.lang.Override
196 public long getUpperBound() {
197 return upperBound_;
198 }
199
200 public static final int NAME_FIELD_NUMBER = 5;
201 @SuppressWarnings("serial")
202 private volatile java.lang.Object name_ = "";
211 @java.lang.Override
212 public boolean hasName() {
213 return ((bitField0_ & 0x00000004) != 0);
214 }
215
223 @java.lang.Override
224 public java.lang.String getName() {
225 java.lang.Object ref = name_;
226 if (ref instanceof java.lang.String) {
227 return (java.lang.String) ref;
228 } else {
229 com.google.protobuf.ByteString bs =
230 (com.google.protobuf.ByteString) ref;
231 java.lang.String s = bs.toStringUtf8();
232 if (bs.isValidUtf8()) {
233 name_ = s;
234 }
235 return s;
236 }
237 }
238
246 @java.lang.Override
247 public com.google.protobuf.ByteString
249 java.lang.Object ref = name_;
250 if (ref instanceof java.lang.String) {
251 com.google.protobuf.ByteString b =
252 com.google.protobuf.ByteString.copyFromUtf8(
253 (java.lang.String) ref);
254 name_ = b;
255 return b;
256 } else {
257 return (com.google.protobuf.ByteString) ref;
258 }
259 }
260
261 private byte memoizedIsInitialized = -1;
262 @java.lang.Override
263 public final boolean isInitialized() {
264 byte isInitialized = memoizedIsInitialized;
265 if (isInitialized == 1) return true;
266 if (isInitialized == 0) return false;
267
268 memoizedIsInitialized = 1;
269 return true;
270 }
271
272 @java.lang.Override
273 public void writeTo(com.google.protobuf.CodedOutputStream output)
274 throws java.io.IOException {
275 for (int i = 0; i < literals_.size(); i++) {
276 output.writeInt32(1, literals_.getInt(i));
277 }
278 for (int i = 0; i < coefficients_.size(); i++) {
279 output.writeInt64(2, coefficients_.getLong(i));
280 }
281 if (((bitField0_ & 0x00000001) != 0)) {
282 output.writeInt64(3, lowerBound_);
283 }
284 if (((bitField0_ & 0x00000002) != 0)) {
285 output.writeInt64(4, upperBound_);
286 }
287 if (((bitField0_ & 0x00000004) != 0)) {
288 com.google.protobuf.GeneratedMessage.writeString(output, 5, name_);
289 }
290 getUnknownFields().writeTo(output);
291 }
292
293 @java.lang.Override
294 public int getSerializedSize() {
295 int size = memoizedSize;
296 if (size != -1) return size;
297
298 size = 0;
299 {
300 int dataSize = 0;
301 for (int i = 0; i < literals_.size(); i++) {
302 dataSize += com.google.protobuf.CodedOutputStream
303 .computeInt32SizeNoTag(literals_.getInt(i));
304 }
305 size += dataSize;
306 size += 1 * getLiteralsList().size();
307 }
308 {
309 int dataSize = 0;
310 for (int i = 0; i < coefficients_.size(); i++) {
311 dataSize += com.google.protobuf.CodedOutputStream
312 .computeInt64SizeNoTag(coefficients_.getLong(i));
313 }
314 size += dataSize;
315 size += 1 * getCoefficientsList().size();
316 }
317 if (((bitField0_ & 0x00000001) != 0)) {
318 size += com.google.protobuf.CodedOutputStream
319 .computeInt64Size(3, lowerBound_);
320 }
321 if (((bitField0_ & 0x00000002) != 0)) {
322 size += com.google.protobuf.CodedOutputStream
323 .computeInt64Size(4, upperBound_);
324 }
325 if (((bitField0_ & 0x00000004) != 0)) {
326 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, name_);
327 }
328 size += getUnknownFields().getSerializedSize();
329 memoizedSize = size;
330 return size;
331 }
332
333 @java.lang.Override
334 public boolean equals(final java.lang.Object obj) {
335 if (obj == this) {
336 return true;
337 }
338 if (!(obj instanceof com.google.ortools.sat.LinearBooleanConstraint)) {
339 return super.equals(obj);
340 }
341 com.google.ortools.sat.LinearBooleanConstraint other = (com.google.ortools.sat.LinearBooleanConstraint) obj;
342
343 if (!getLiteralsList()
344 .equals(other.getLiteralsList())) return false;
346 .equals(other.getCoefficientsList())) return false;
347 if (hasLowerBound() != other.hasLowerBound()) return false;
348 if (hasLowerBound()) {
349 if (getLowerBound()
350 != other.getLowerBound()) return false;
351 }
352 if (hasUpperBound() != other.hasUpperBound()) return false;
353 if (hasUpperBound()) {
354 if (getUpperBound()
355 != other.getUpperBound()) return false;
356 }
357 if (hasName() != other.hasName()) return false;
358 if (hasName()) {
359 if (!getName()
360 .equals(other.getName())) return false;
361 }
362 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
363 return true;
364 }
365
366 @java.lang.Override
367 public int hashCode() {
368 if (memoizedHashCode != 0) {
369 return memoizedHashCode;
370 }
371 int hash = 41;
372 hash = (19 * hash) + getDescriptor().hashCode();
373 if (getLiteralsCount() > 0) {
374 hash = (37 * hash) + LITERALS_FIELD_NUMBER;
375 hash = (53 * hash) + getLiteralsList().hashCode();
376 }
377 if (getCoefficientsCount() > 0) {
378 hash = (37 * hash) + COEFFICIENTS_FIELD_NUMBER;
379 hash = (53 * hash) + getCoefficientsList().hashCode();
380 }
381 if (hasLowerBound()) {
382 hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER;
383 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
384 getLowerBound());
385 }
386 if (hasUpperBound()) {
387 hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER;
388 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
389 getUpperBound());
390 }
391 if (hasName()) {
392 hash = (37 * hash) + NAME_FIELD_NUMBER;
393 hash = (53 * hash) + getName().hashCode();
394 }
395 hash = (29 * hash) + getUnknownFields().hashCode();
396 memoizedHashCode = hash;
397 return hash;
398 }
399
401 java.nio.ByteBuffer data)
402 throws com.google.protobuf.InvalidProtocolBufferException {
403 return PARSER.parseFrom(data);
404 }
406 java.nio.ByteBuffer data,
407 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
408 throws com.google.protobuf.InvalidProtocolBufferException {
409 return PARSER.parseFrom(data, extensionRegistry);
410 }
412 com.google.protobuf.ByteString data)
413 throws com.google.protobuf.InvalidProtocolBufferException {
414 return PARSER.parseFrom(data);
415 }
417 com.google.protobuf.ByteString data,
418 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
419 throws com.google.protobuf.InvalidProtocolBufferException {
420 return PARSER.parseFrom(data, extensionRegistry);
421 }
423 throws com.google.protobuf.InvalidProtocolBufferException {
424 return PARSER.parseFrom(data);
425 }
427 byte[] data,
428 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429 throws com.google.protobuf.InvalidProtocolBufferException {
430 return PARSER.parseFrom(data, extensionRegistry);
431 }
432 public static com.google.ortools.sat.LinearBooleanConstraint parseFrom(java.io.InputStream input)
433 throws java.io.IOException {
434 return com.google.protobuf.GeneratedMessage
435 .parseWithIOException(PARSER, input);
436 }
438 java.io.InputStream input,
439 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
440 throws java.io.IOException {
441 return com.google.protobuf.GeneratedMessage
442 .parseWithIOException(PARSER, input, extensionRegistry);
443 }
444
446 throws java.io.IOException {
447 return com.google.protobuf.GeneratedMessage
448 .parseDelimitedWithIOException(PARSER, input);
449 }
450
452 java.io.InputStream input,
453 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
454 throws java.io.IOException {
455 return com.google.protobuf.GeneratedMessage
456 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
457 }
459 com.google.protobuf.CodedInputStream input)
460 throws java.io.IOException {
461 return com.google.protobuf.GeneratedMessage
462 .parseWithIOException(PARSER, input);
463 }
465 com.google.protobuf.CodedInputStream input,
466 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
467 throws java.io.IOException {
468 return com.google.protobuf.GeneratedMessage
469 .parseWithIOException(PARSER, input, extensionRegistry);
470 }
471
472 @java.lang.Override
473 public Builder newBuilderForType() { return newBuilder(); }
474 public static Builder newBuilder() {
475 return DEFAULT_INSTANCE.toBuilder();
476 }
477 public static Builder newBuilder(com.google.ortools.sat.LinearBooleanConstraint prototype) {
478 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
479 }
480 @java.lang.Override
482 return this == DEFAULT_INSTANCE
483 ? new Builder() : new Builder().mergeFrom(this);
484 }
485
486 @java.lang.Override
488 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
489 Builder builder = new Builder(parent);
490 return builder;
491 }
492
502 public static final class Builder extends
503 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
504 // @@protoc_insertion_point(builder_implements:operations_research.sat.LinearBooleanConstraint)
506 public static final com.google.protobuf.Descriptors.Descriptor
508 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanConstraint_descriptor;
509 }
510
511 @java.lang.Override
512 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
514 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanConstraint_fieldAccessorTable
515 .ensureFieldAccessorsInitialized(
516 com.google.ortools.sat.LinearBooleanConstraint.class, com.google.ortools.sat.LinearBooleanConstraint.Builder.class);
517 }
518
519 // Construct using com.google.ortools.sat.LinearBooleanConstraint.newBuilder()
520 private Builder() {
521
522 }
523
524 private Builder(
525 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
526 super(parent);
527
528 }
529 @java.lang.Override
530 public Builder clear() {
531 super.clear();
532 bitField0_ = 0;
533 literals_ = emptyIntList();
534 coefficients_ = emptyLongList();
535 lowerBound_ = 0L;
536 upperBound_ = 0L;
537 name_ = "";
538 return this;
539 }
540
541 @java.lang.Override
542 public com.google.protobuf.Descriptors.Descriptor
544 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_LinearBooleanConstraint_descriptor;
545 }
546
547 @java.lang.Override
549 return com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance();
550 }
551
552 @java.lang.Override
555 if (!result.isInitialized()) {
556 throw newUninitializedMessageException(result);
557 }
558 return result;
559 }
560
561 @java.lang.Override
563 com.google.ortools.sat.LinearBooleanConstraint result = new com.google.ortools.sat.LinearBooleanConstraint(this);
564 if (bitField0_ != 0) { buildPartial0(result); }
565 onBuilt();
566 return result;
567 }
568
569 private void buildPartial0(com.google.ortools.sat.LinearBooleanConstraint result) {
570 int from_bitField0_ = bitField0_;
571 if (((from_bitField0_ & 0x00000001) != 0)) {
572 literals_.makeImmutable();
573 result.literals_ = literals_;
574 }
575 if (((from_bitField0_ & 0x00000002) != 0)) {
576 coefficients_.makeImmutable();
577 result.coefficients_ = coefficients_;
578 }
579 int to_bitField0_ = 0;
580 if (((from_bitField0_ & 0x00000004) != 0)) {
581 result.lowerBound_ = lowerBound_;
582 to_bitField0_ |= 0x00000001;
583 }
584 if (((from_bitField0_ & 0x00000008) != 0)) {
585 result.upperBound_ = upperBound_;
586 to_bitField0_ |= 0x00000002;
587 }
588 if (((from_bitField0_ & 0x00000010) != 0)) {
589 result.name_ = name_;
590 to_bitField0_ |= 0x00000004;
591 }
592 result.bitField0_ |= to_bitField0_;
593 }
594
595 @java.lang.Override
596 public Builder mergeFrom(com.google.protobuf.Message other) {
597 if (other instanceof com.google.ortools.sat.LinearBooleanConstraint) {
598 return mergeFrom((com.google.ortools.sat.LinearBooleanConstraint)other);
599 } else {
600 super.mergeFrom(other);
601 return this;
602 }
603 }
604
605 public Builder mergeFrom(com.google.ortools.sat.LinearBooleanConstraint other) {
606 if (other == com.google.ortools.sat.LinearBooleanConstraint.getDefaultInstance()) return this;
607 if (!other.literals_.isEmpty()) {
608 if (literals_.isEmpty()) {
609 literals_ = other.literals_;
610 literals_.makeImmutable();
611 bitField0_ |= 0x00000001;
612 } else {
613 ensureLiteralsIsMutable();
614 literals_.addAll(other.literals_);
615 }
616 onChanged();
617 }
618 if (!other.coefficients_.isEmpty()) {
619 if (coefficients_.isEmpty()) {
620 coefficients_ = other.coefficients_;
621 coefficients_.makeImmutable();
622 bitField0_ |= 0x00000002;
623 } else {
624 ensureCoefficientsIsMutable();
625 coefficients_.addAll(other.coefficients_);
626 }
627 onChanged();
628 }
629 if (other.hasLowerBound()) {
630 setLowerBound(other.getLowerBound());
631 }
632 if (other.hasUpperBound()) {
633 setUpperBound(other.getUpperBound());
634 }
635 if (other.hasName()) {
636 name_ = other.name_;
637 bitField0_ |= 0x00000010;
638 onChanged();
639 }
640 this.mergeUnknownFields(other.getUnknownFields());
641 onChanged();
642 return this;
643 }
644
645 @java.lang.Override
646 public final boolean isInitialized() {
647 return true;
648 }
649
650 @java.lang.Override
651 public Builder mergeFrom(
652 com.google.protobuf.CodedInputStream input,
653 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
654 throws java.io.IOException {
655 if (extensionRegistry == null) {
656 throw new java.lang.NullPointerException();
657 }
658 try {
659 boolean done = false;
660 while (!done) {
661 int tag = input.readTag();
662 switch (tag) {
663 case 0:
664 done = true;
665 break;
666 case 8: {
667 int v = input.readInt32();
668 ensureLiteralsIsMutable();
669 literals_.addInt(v);
670 break;
671 } // case 8
672 case 10: {
673 int length = input.readRawVarint32();
674 int limit = input.pushLimit(length);
675 ensureLiteralsIsMutable();
676 while (input.getBytesUntilLimit() > 0) {
677 literals_.addInt(input.readInt32());
678 }
679 input.popLimit(limit);
680 break;
681 } // case 10
682 case 16: {
683 long v = input.readInt64();
684 ensureCoefficientsIsMutable();
685 coefficients_.addLong(v);
686 break;
687 } // case 16
688 case 18: {
689 int length = input.readRawVarint32();
690 int limit = input.pushLimit(length);
691 ensureCoefficientsIsMutable();
692 while (input.getBytesUntilLimit() > 0) {
693 coefficients_.addLong(input.readInt64());
694 }
695 input.popLimit(limit);
696 break;
697 } // case 18
698 case 24: {
699 lowerBound_ = input.readInt64();
700 bitField0_ |= 0x00000004;
701 break;
702 } // case 24
703 case 32: {
704 upperBound_ = input.readInt64();
705 bitField0_ |= 0x00000008;
706 break;
707 } // case 32
708 case 42: {
709 name_ = input.readBytes();
710 bitField0_ |= 0x00000010;
711 break;
712 } // case 42
713 default: {
714 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
715 done = true; // was an endgroup tag
716 }
717 break;
718 } // default:
719 } // switch (tag)
720 } // while (!done)
721 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
722 throw e.unwrapIOException();
723 } finally {
724 onChanged();
725 } // finally
726 return this;
727 }
728 private int bitField0_;
729
730 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
731 private void ensureLiteralsIsMutable() {
732 if (!literals_.isModifiable()) {
733 literals_ = makeMutableCopy(literals_);
734 }
735 bitField0_ |= 0x00000001;
736 }
753 public java.util.List<java.lang.Integer>
755 literals_.makeImmutable();
756 return literals_;
757 }
758
774 public int getLiteralsCount() {
775 return literals_.size();
776 }
777
794 public int getLiterals(int index) {
795 return literals_.getInt(index);
796 }
797
815 public Builder setLiterals(
816 int index, int value) {
817
818 ensureLiteralsIsMutable();
819 literals_.setInt(index, value);
820 bitField0_ |= 0x00000001;
821 onChanged();
822 return this;
823 }
824
841 public Builder addLiterals(int value) {
842
843 ensureLiteralsIsMutable();
844 literals_.addInt(value);
845 bitField0_ |= 0x00000001;
846 onChanged();
847 return this;
848 }
849
866 public Builder addAllLiterals(
867 java.lang.Iterable<? extends java.lang.Integer> values) {
868 ensureLiteralsIsMutable();
869 com.google.protobuf.AbstractMessageLite.Builder.addAll(
870 values, literals_);
871 bitField0_ |= 0x00000001;
872 onChanged();
873 return this;
874 }
875
891 public Builder clearLiterals() {
892 literals_ = emptyIntList();
893 bitField0_ = (bitField0_ & ~0x00000001);
894 onChanged();
895 return this;
896 }
897
898 private com.google.protobuf.Internal.LongList coefficients_ = emptyLongList();
899 private void ensureCoefficientsIsMutable() {
900 if (!coefficients_.isModifiable()) {
901 coefficients_ = makeMutableCopy(coefficients_);
902 }
903 bitField0_ |= 0x00000002;
904 }
909 public java.util.List<java.lang.Long>
911 coefficients_.makeImmutable();
912 return coefficients_;
913 }
914
918 public int getCoefficientsCount() {
919 return coefficients_.size();
920 }
921
926 public long getCoefficients(int index) {
927 return coefficients_.getLong(index);
928 }
929
935 public Builder setCoefficients(
936 int index, long value) {
937
938 ensureCoefficientsIsMutable();
939 coefficients_.setLong(index, value);
940 bitField0_ |= 0x00000002;
941 onChanged();
942 return this;
943 }
944
949 public Builder addCoefficients(long value) {
950
951 ensureCoefficientsIsMutable();
952 coefficients_.addLong(value);
953 bitField0_ |= 0x00000002;
954 onChanged();
955 return this;
956 }
957
962 public Builder addAllCoefficients(
963 java.lang.Iterable<? extends java.lang.Long> values) {
964 ensureCoefficientsIsMutable();
965 com.google.protobuf.AbstractMessageLite.Builder.addAll(
966 values, coefficients_);
967 bitField0_ |= 0x00000002;
968 onChanged();
969 return this;
970 }
971
975 public Builder clearCoefficients() {
976 coefficients_ = emptyLongList();
977 bitField0_ = (bitField0_ & ~0x00000002);
978 onChanged();
979 return this;
980 }
981
982 private long lowerBound_ ;
993 @java.lang.Override
994 public boolean hasLowerBound() {
995 return ((bitField0_ & 0x00000004) != 0);
996 }
997
1007 @java.lang.Override
1008 public long getLowerBound() {
1009 return lowerBound_;
1010 }
1011
1022 public Builder setLowerBound(long value) {
1023
1024 lowerBound_ = value;
1025 bitField0_ |= 0x00000004;
1026 onChanged();
1027 return this;
1028 }
1029
1039 public Builder clearLowerBound() {
1040 bitField0_ = (bitField0_ & ~0x00000004);
1041 lowerBound_ = 0L;
1042 onChanged();
1043 return this;
1044 }
1045
1046 private long upperBound_ ;
1051 @java.lang.Override
1052 public boolean hasUpperBound() {
1053 return ((bitField0_ & 0x00000008) != 0);
1054 }
1055
1059 @java.lang.Override
1060 public long getUpperBound() {
1061 return upperBound_;
1062 }
1063
1068 public Builder setUpperBound(long value) {
1069
1070 upperBound_ = value;
1071 bitField0_ |= 0x00000008;
1072 onChanged();
1073 return this;
1074 }
1075
1079 public Builder clearUpperBound() {
1080 bitField0_ = (bitField0_ & ~0x00000008);
1081 upperBound_ = 0L;
1082 onChanged();
1083 return this;
1084 }
1085
1086 private java.lang.Object name_ = "";
1095 public boolean hasName() {
1096 return ((bitField0_ & 0x00000010) != 0);
1097 }
1098
1106 public java.lang.String getName() {
1107 java.lang.Object ref = name_;
1108 if (!(ref instanceof java.lang.String)) {
1109 com.google.protobuf.ByteString bs =
1110 (com.google.protobuf.ByteString) ref;
1111 java.lang.String s = bs.toStringUtf8();
1112 if (bs.isValidUtf8()) {
1113 name_ = s;
1114 }
1115 return s;
1116 } else {
1117 return (java.lang.String) ref;
1118 }
1119 }
1120
1128 public com.google.protobuf.ByteString
1130 java.lang.Object ref = name_;
1131 if (ref instanceof String) {
1132 com.google.protobuf.ByteString b =
1133 com.google.protobuf.ByteString.copyFromUtf8(
1134 (java.lang.String) ref);
1135 name_ = b;
1136 return b;
1137 } else {
1138 return (com.google.protobuf.ByteString) ref;
1139 }
1140 }
1141
1150 public Builder setName(
1151 java.lang.String value) {
1152 if (value == null) { throw new NullPointerException(); }
1153 name_ = value;
1154 bitField0_ |= 0x00000010;
1155 onChanged();
1156 return this;
1157 }
1158
1166 public Builder clearName() {
1167 name_ = getDefaultInstance().getName();
1168 bitField0_ = (bitField0_ & ~0x00000010);
1169 onChanged();
1170 return this;
1171 }
1172
1181 public Builder setNameBytes(
1182 com.google.protobuf.ByteString value) {
1183 if (value == null) { throw new NullPointerException(); }
1184 name_ = value;
1185 bitField0_ |= 0x00000010;
1186 onChanged();
1187 return this;
1188 }
1189
1190 // @@protoc_insertion_point(builder_scope:operations_research.sat.LinearBooleanConstraint)
1191 }
1192
1193 // @@protoc_insertion_point(class_scope:operations_research.sat.LinearBooleanConstraint)
1194 private static final com.google.ortools.sat.LinearBooleanConstraint DEFAULT_INSTANCE;
1195 static {
1196 DEFAULT_INSTANCE = new com.google.ortools.sat.LinearBooleanConstraint();
1197 }
1198
1200 return DEFAULT_INSTANCE;
1201 }
1202
1203 private static final com.google.protobuf.Parser<LinearBooleanConstraint>
1204 PARSER = new com.google.protobuf.AbstractParser<LinearBooleanConstraint>() {
1205 @java.lang.Override
1206 public LinearBooleanConstraint parsePartialFrom(
1207 com.google.protobuf.CodedInputStream input,
1208 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1209 throws com.google.protobuf.InvalidProtocolBufferException {
1210 Builder builder = newBuilder();
1211 try {
1212 builder.mergeFrom(input, extensionRegistry);
1213 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1214 throw e.setUnfinishedMessage(builder.buildPartial());
1215 } catch (com.google.protobuf.UninitializedMessageException e) {
1216 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1217 } catch (java.io.IOException e) {
1218 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1219 .setUnfinishedMessage(builder.buildPartial());
1220 }
1221 return builder.buildPartial();
1222 }
1223 };
1224
1225 public static com.google.protobuf.Parser<LinearBooleanConstraint> parser() {
1226 return PARSER;
1227 }
1228
1229 @java.lang.Override
1230 public com.google.protobuf.Parser<LinearBooleanConstraint> getParserForType() {
1231 return PARSER;
1232 }
1233
1234 @java.lang.Override
1236 return DEFAULT_INSTANCE;
1237 }
1238
1239}
1240
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.sat.LinearBooleanConstraint getDefaultInstanceForType()
com.google.ortools.sat.LinearBooleanConstraint buildPartial()
Builder addAllLiterals(java.lang.Iterable<? extends java.lang.Integer > values)
com.google.ortools.sat.LinearBooleanConstraint build()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder mergeFrom(com.google.ortools.sat.LinearBooleanConstraint other)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder addAllCoefficients(java.lang.Iterable<? extends java.lang.Long > values)
Builder setNameBytes(com.google.protobuf.ByteString value)
static com.google.protobuf.Parser< LinearBooleanConstraint > parser()
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(byte[] data)
static com.google.ortools.sat.LinearBooleanConstraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Integer > getLiteralsList()
com.google.protobuf.Parser< LinearBooleanConstraint > getParserForType()
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(com.google.protobuf.CodedInputStream input)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static Builder newBuilder(com.google.ortools.sat.LinearBooleanConstraint prototype)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
void writeTo(com.google.protobuf.CodedOutputStream output)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.sat.LinearBooleanConstraint getDefaultInstance()
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(java.io.InputStream input)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.LinearBooleanConstraint getDefaultInstanceForType()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.sat.LinearBooleanConstraint parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.LinearBooleanConstraint parseFrom(com.google.protobuf.ByteString data)