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