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