5package com.google.ortools.sat;
11 com.google.protobuf.GeneratedMessage implements
14private static final long serialVersionUID = 0L;
16 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
17 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 exprs_ = java.util.Collections.emptyList();
32 public static final com.google.protobuf.Descriptors.Descriptor
34 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_LinearArgumentProto_descriptor;
38 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
40 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_LinearArgumentProto_fieldAccessorTable
41 .ensureFieldAccessorsInitialized(
42 com.google.ortools.sat.LinearArgumentProto.class, com.google.ortools.sat.LinearArgumentProto.Builder.class);
45 private int bitField0_;
54 return ((bitField0_ & 0x00000001) != 0);
62 return target_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : target_;
69 return target_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : target_;
73 @SuppressWarnings(
"serial")
86 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
102 return exprs_.get(index);
110 return exprs_.get(index);
113 private byte memoizedIsInitialized = -1;
120 memoizedIsInitialized = 1;
125 public void writeTo(com.google.protobuf.CodedOutputStream output)
126 throws java.io.IOException {
127 if (((bitField0_ & 0x00000001) != 0)) {
130 for (
int i = 0; i < exprs_.size(); i++) {
131 output.writeMessage(2, exprs_.get(i));
133 getUnknownFields().writeTo(output);
138 int size = memoizedSize;
139 if (size != -1)
return size;
142 if (((bitField0_ & 0x00000001) != 0)) {
143 size += com.google.protobuf.CodedOutputStream
146 for (
int i = 0; i < exprs_.size(); i++) {
147 size += com.google.protobuf.CodedOutputStream
148 .computeMessageSize(2, exprs_.get(i));
150 size += getUnknownFields().getSerializedSize();
156 public boolean equals(
final java.lang.Object obj) {
160 if (!(obj instanceof com.google.ortools.sat.LinearArgumentProto)) {
161 return super.equals(obj);
172 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
178 if (memoizedHashCode != 0) {
179 return memoizedHashCode;
191 hash = (29 * hash) + getUnknownFields().hashCode();
192 memoizedHashCode = hash;
197 java.nio.ByteBuffer data)
198 throws com.google.protobuf.InvalidProtocolBufferException {
199 return PARSER.parseFrom(data);
202 java.nio.ByteBuffer data,
203 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
204 throws com.google.protobuf.InvalidProtocolBufferException {
205 return PARSER.parseFrom(data, extensionRegistry);
208 com.google.protobuf.ByteString data)
209 throws com.google.protobuf.InvalidProtocolBufferException {
210 return PARSER.parseFrom(data);
213 com.google.protobuf.ByteString data,
214 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
215 throws com.google.protobuf.InvalidProtocolBufferException {
216 return PARSER.parseFrom(data, extensionRegistry);
219 throws com.google.protobuf.InvalidProtocolBufferException {
220 return PARSER.parseFrom(data);
224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
225 throws com.google.protobuf.InvalidProtocolBufferException {
226 return PARSER.parseFrom(data, extensionRegistry);
229 throws java.io.IOException {
230 return com.google.protobuf.GeneratedMessage
231 .parseWithIOException(PARSER, input);
234 java.io.InputStream input,
235 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
236 throws java.io.IOException {
237 return com.google.protobuf.GeneratedMessage
238 .parseWithIOException(PARSER, input, extensionRegistry);
242 throws java.io.IOException {
243 return com.google.protobuf.GeneratedMessage
244 .parseDelimitedWithIOException(PARSER, input);
248 java.io.InputStream input,
249 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250 throws java.io.IOException {
251 return com.google.protobuf.GeneratedMessage
252 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
255 com.google.protobuf.CodedInputStream input)
256 throws java.io.IOException {
257 return com.google.protobuf.GeneratedMessage
258 .parseWithIOException(PARSER, input);
261 com.google.protobuf.CodedInputStream input,
262 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
263 throws java.io.IOException {
264 return com.google.protobuf.GeneratedMessage
265 .parseWithIOException(PARSER, input, extensionRegistry);
278 return this == DEFAULT_INSTANCE
284 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
292 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
295 public static final com.google.protobuf.Descriptors.Descriptor
297 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_LinearArgumentProto_descriptor;
301 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
303 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_LinearArgumentProto_fieldAccessorTable
304 .ensureFieldAccessorsInitialized(
305 com.google.ortools.sat.LinearArgumentProto.class, com.google.ortools.sat.LinearArgumentProto.Builder.class);
310 maybeForceBuilderInitialization();
314 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
316 maybeForceBuilderInitialization();
318 private void maybeForceBuilderInitialization() {
319 if (com.google.protobuf.GeneratedMessage
320 .alwaysUseFieldBuilders) {
321 getTargetFieldBuilder();
322 getExprsFieldBuilder();
330 if (targetBuilder_ !=
null) {
331 targetBuilder_.dispose();
332 targetBuilder_ =
null;
334 if (exprsBuilder_ ==
null) {
335 exprs_ = java.util.Collections.emptyList();
338 exprsBuilder_.clear();
340 bitField0_ = (bitField0_ & ~0x00000002);
345 public com.google.protobuf.Descriptors.Descriptor
347 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_LinearArgumentProto_descriptor;
352 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
359 throw newUninitializedMessageException(result);
367 buildPartialRepeatedFields(result);
368 if (bitField0_ != 0) { buildPartial0(result); }
373 private void buildPartialRepeatedFields(com.google.ortools.sat.LinearArgumentProto result) {
374 if (exprsBuilder_ ==
null) {
375 if (((bitField0_ & 0x00000002) != 0)) {
376 exprs_ = java.util.Collections.unmodifiableList(exprs_);
377 bitField0_ = (bitField0_ & ~0x00000002);
379 result.exprs_ = exprs_;
381 result.exprs_ = exprsBuilder_.build();
385 private void buildPartial0(com.google.ortools.sat.LinearArgumentProto result) {
386 int from_bitField0_ = bitField0_;
387 int to_bitField0_ = 0;
388 if (((from_bitField0_ & 0x00000001) != 0)) {
389 result.target_ = targetBuilder_ ==
null
391 : targetBuilder_.build();
392 to_bitField0_ |= 0x00000001;
394 result.bitField0_ |= to_bitField0_;
399 if (other instanceof com.google.ortools.sat.LinearArgumentProto) {
400 return mergeFrom((com.google.ortools.sat.LinearArgumentProto)other);
402 super.mergeFrom(other);
408 if (other == com.google.ortools.sat.LinearArgumentProto.getDefaultInstance())
return this;
409 if (other.hasTarget()) {
412 if (exprsBuilder_ ==
null) {
413 if (!other.exprs_.isEmpty()) {
414 if (exprs_.isEmpty()) {
415 exprs_ = other.exprs_;
416 bitField0_ = (bitField0_ & ~0x00000002);
418 ensureExprsIsMutable();
419 exprs_.addAll(other.exprs_);
424 if (!other.exprs_.isEmpty()) {
425 if (exprsBuilder_.isEmpty()) {
426 exprsBuilder_.dispose();
427 exprsBuilder_ =
null;
428 exprs_ = other.exprs_;
429 bitField0_ = (bitField0_ & ~0x00000002);
431 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
432 getExprsFieldBuilder() :
null;
434 exprsBuilder_.addAllMessages(other.exprs_);
438 this.mergeUnknownFields(other.getUnknownFields());
450 com.google.protobuf.CodedInputStream input,
451 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
452 throws java.io.IOException {
453 if (extensionRegistry ==
null) {
454 throw new java.lang.NullPointerException();
457 boolean done =
false;
459 int tag = input.readTag();
466 getTargetFieldBuilder().getBuilder(),
468 bitField0_ |= 0x00000001;
474 com.google.ortools.sat.LinearExpressionProto.parser(),
476 if (exprsBuilder_ ==
null) {
477 ensureExprsIsMutable();
480 exprsBuilder_.addMessage(m);
485 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
492 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
493 throw e.unwrapIOException();
499 private int bitField0_;
502 private com.google.protobuf.SingleFieldBuilder<
503 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> targetBuilder_;
509 return ((bitField0_ & 0x00000001) != 0);
516 if (targetBuilder_ ==
null) {
517 return target_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : target_;
519 return targetBuilder_.getMessage();
526 if (targetBuilder_ ==
null) {
528 throw new NullPointerException();
532 targetBuilder_.setMessage(value);
534 bitField0_ |= 0x00000001;
542 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
543 if (targetBuilder_ ==
null) {
544 target_ = builderForValue.build();
546 targetBuilder_.setMessage(builderForValue.build());
548 bitField0_ |= 0x00000001;
556 if (targetBuilder_ ==
null) {
557 if (((bitField0_ & 0x00000001) != 0) &&
559 target_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
565 targetBuilder_.mergeFrom(value);
567 if (target_ !=
null) {
568 bitField0_ |= 0x00000001;
577 bitField0_ = (bitField0_ & ~0x00000001);
579 if (targetBuilder_ !=
null) {
580 targetBuilder_.dispose();
581 targetBuilder_ =
null;
590 bitField0_ |= 0x00000001;
592 return getTargetFieldBuilder().getBuilder();
598 if (targetBuilder_ !=
null) {
599 return targetBuilder_.getMessageOrBuilder();
601 return target_ ==
null ?
602 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : target_;
608 private com.google.protobuf.SingleFieldBuilder<
609 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
610 getTargetFieldBuilder() {
611 if (targetBuilder_ ==
null) {
612 targetBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
613 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
615 getParentForChildren(),
619 return targetBuilder_;
622 private java.util.List<com.google.ortools.sat.LinearExpressionProto> exprs_ =
623 java.util.Collections.emptyList();
624 private void ensureExprsIsMutable() {
625 if (!((bitField0_ & 0x00000002) != 0)) {
626 exprs_ =
new java.util.ArrayList<com.google.ortools.sat.LinearExpressionProto>(exprs_);
627 bitField0_ |= 0x00000002;
631 private com.google.protobuf.RepeatedFieldBuilder<
632 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> exprsBuilder_;
637 public java.util.List<com.google.ortools.sat.LinearExpressionProto>
getExprsList() {
638 if (exprsBuilder_ ==
null) {
639 return java.util.Collections.unmodifiableList(exprs_);
641 return exprsBuilder_.getMessageList();
648 if (exprsBuilder_ ==
null) {
649 return exprs_.size();
651 return exprsBuilder_.getCount();
658 if (exprsBuilder_ ==
null) {
659 return exprs_.get(index);
661 return exprsBuilder_.getMessage(index);
668 int index, com.google.ortools.sat.LinearExpressionProto value) {
669 if (exprsBuilder_ ==
null) {
671 throw new NullPointerException();
673 ensureExprsIsMutable();
674 exprs_.set(index, value);
677 exprsBuilder_.setMessage(index, value);
685 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
686 if (exprsBuilder_ ==
null) {
687 ensureExprsIsMutable();
688 exprs_.set(index, builderForValue.build());
691 exprsBuilder_.setMessage(index, builderForValue.build());
699 if (exprsBuilder_ ==
null) {
701 throw new NullPointerException();
703 ensureExprsIsMutable();
707 exprsBuilder_.addMessage(value);
715 int index, com.google.ortools.sat.LinearExpressionProto value) {
716 if (exprsBuilder_ ==
null) {
718 throw new NullPointerException();
720 ensureExprsIsMutable();
721 exprs_.add(index, value);
724 exprsBuilder_.addMessage(index, value);
732 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
733 if (exprsBuilder_ ==
null) {
734 ensureExprsIsMutable();
735 exprs_.add(builderForValue.build());
738 exprsBuilder_.addMessage(builderForValue.build());
746 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
747 if (exprsBuilder_ ==
null) {
748 ensureExprsIsMutable();
749 exprs_.add(index, builderForValue.build());
752 exprsBuilder_.addMessage(index, builderForValue.build());
760 java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto> values) {
761 if (exprsBuilder_ ==
null) {
762 ensureExprsIsMutable();
763 com.google.protobuf.AbstractMessageLite.Builder.addAll(
767 exprsBuilder_.addAllMessages(values);
775 if (exprsBuilder_ ==
null) {
776 exprs_ = java.util.Collections.emptyList();
777 bitField0_ = (bitField0_ & ~0x00000002);
780 exprsBuilder_.clear();
788 if (exprsBuilder_ ==
null) {
789 ensureExprsIsMutable();
790 exprs_.remove(index);
793 exprsBuilder_.remove(index);
802 return getExprsFieldBuilder().getBuilder(index);
809 if (exprsBuilder_ ==
null) {
810 return exprs_.get(index); }
else {
811 return exprsBuilder_.getMessageOrBuilder(index);
817 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
819 if (exprsBuilder_ !=
null) {
820 return exprsBuilder_.getMessageOrBuilderList();
822 return java.util.Collections.unmodifiableList(exprs_);
829 return getExprsFieldBuilder().addBuilder(
830 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
837 return getExprsFieldBuilder().addBuilder(
838 index, com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
843 public java.util.List<com.google.ortools.sat.LinearExpressionProto.Builder>
845 return getExprsFieldBuilder().getBuilderList();
847 private com.google.protobuf.RepeatedFieldBuilder<
848 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
849 getExprsFieldBuilder() {
850 if (exprsBuilder_ ==
null) {
851 exprsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
852 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
854 ((bitField0_ & 0x00000002) != 0),
855 getParentForChildren(),
859 return exprsBuilder_;
868 DEFAULT_INSTANCE =
new com.google.ortools.sat.LinearArgumentProto();
872 return DEFAULT_INSTANCE;
879 com.google.protobuf.CodedInputStream input,
880 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
881 throws com.google.protobuf.InvalidProtocolBufferException {
884 builder.mergeFrom(input, extensionRegistry);
885 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
886 throw e.setUnfinishedMessage(builder.buildPartial());
887 }
catch (com.google.protobuf.UninitializedMessageException e) {
888 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
889 }
catch (java.io.IOException e) {
890 throw new com.google.protobuf.InvalidProtocolBufferException(e)
891 .setUnfinishedMessage(builder.buildPartial());
893 return builder.buildPartial();
908 return DEFAULT_INSTANCE;