5package com.google.ortools.sat;
15 com.google.protobuf.GeneratedMessageV3 implements
18private static final long serialVersionUID = 0L;
24 exprs_ = java.util.Collections.emptyList();
28 @SuppressWarnings({
"unused"})
30 UnusedPrivateParameter unused) {
34 public static final com.google.protobuf.Descriptors.Descriptor
36 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_descriptor;
40 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
42 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_fieldAccessorTable
43 .ensureFieldAccessorsInitialized(
44 com.google.ortools.sat.AllDifferentConstraintProto.class, com.google.ortools.sat.AllDifferentConstraintProto.Builder.class);
48 @SuppressWarnings(
"serial")
61 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
77 return exprs_.get(index);
85 return exprs_.get(index);
88 private byte memoizedIsInitialized = -1;
95 memoizedIsInitialized = 1;
100 public void writeTo(com.google.protobuf.CodedOutputStream output)
101 throws java.io.IOException {
102 for (
int i = 0; i < exprs_.size(); i++) {
103 output.writeMessage(1, exprs_.get(i));
105 getUnknownFields().writeTo(output);
110 int size = memoizedSize;
111 if (size != -1)
return size;
114 for (
int i = 0; i < exprs_.size(); i++) {
115 size += com.google.protobuf.CodedOutputStream
116 .computeMessageSize(1, exprs_.get(i));
118 size += getUnknownFields().getSerializedSize();
124 public boolean equals(
final java.lang.Object obj) {
128 if (!(obj instanceof com.google.ortools.sat.AllDifferentConstraintProto)) {
129 return super.equals(obj);
135 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
141 if (memoizedHashCode != 0) {
142 return memoizedHashCode;
150 hash = (29 * hash) + getUnknownFields().hashCode();
151 memoizedHashCode = hash;
156 java.nio.ByteBuffer data)
157 throws com.google.protobuf.InvalidProtocolBufferException {
158 return PARSER.parseFrom(data);
161 java.nio.ByteBuffer data,
162 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
163 throws com.google.protobuf.InvalidProtocolBufferException {
164 return PARSER.parseFrom(data, extensionRegistry);
167 com.google.protobuf.ByteString data)
168 throws com.google.protobuf.InvalidProtocolBufferException {
169 return PARSER.parseFrom(data);
172 com.google.protobuf.ByteString data,
173 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
174 throws com.google.protobuf.InvalidProtocolBufferException {
175 return PARSER.parseFrom(data, extensionRegistry);
178 throws com.google.protobuf.InvalidProtocolBufferException {
179 return PARSER.parseFrom(data);
183 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
184 throws com.google.protobuf.InvalidProtocolBufferException {
185 return PARSER.parseFrom(data, extensionRegistry);
188 throws java.io.IOException {
189 return com.google.protobuf.GeneratedMessageV3
190 .parseWithIOException(PARSER, input);
193 java.io.InputStream input,
194 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
195 throws java.io.IOException {
196 return com.google.protobuf.GeneratedMessageV3
197 .parseWithIOException(PARSER, input, extensionRegistry);
201 throws java.io.IOException {
202 return com.google.protobuf.GeneratedMessageV3
203 .parseDelimitedWithIOException(PARSER, input);
207 java.io.InputStream input,
208 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
209 throws java.io.IOException {
210 return com.google.protobuf.GeneratedMessageV3
211 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
214 com.google.protobuf.CodedInputStream input)
215 throws java.io.IOException {
216 return com.google.protobuf.GeneratedMessageV3
217 .parseWithIOException(PARSER, input);
220 com.google.protobuf.CodedInputStream input,
221 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
222 throws java.io.IOException {
223 return com.google.protobuf.GeneratedMessageV3
224 .parseWithIOException(PARSER, input, extensionRegistry);
232 public static Builder newBuilder(com.google.ortools.sat.AllDifferentConstraintProto prototype) {
237 return this == DEFAULT_INSTANCE
243 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
255 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
258 public static final com.google.protobuf.Descriptors.Descriptor
260 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_descriptor;
264 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
266 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_fieldAccessorTable
267 .ensureFieldAccessorsInitialized(
268 com.google.ortools.sat.AllDifferentConstraintProto.class, com.google.ortools.sat.AllDifferentConstraintProto.Builder.class);
277 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
285 if (exprsBuilder_ ==
null) {
286 exprs_ = java.util.Collections.emptyList();
289 exprsBuilder_.clear();
291 bitField0_ = (bitField0_ & ~0x00000001);
296 public com.google.protobuf.Descriptors.Descriptor
298 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_descriptor;
303 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
310 throw newUninitializedMessageException(result);
318 buildPartialRepeatedFields(result);
319 if (bitField0_ != 0) { buildPartial0(result); }
324 private void buildPartialRepeatedFields(com.google.ortools.sat.AllDifferentConstraintProto result) {
325 if (exprsBuilder_ ==
null) {
326 if (((bitField0_ & 0x00000001) != 0)) {
327 exprs_ = java.util.Collections.unmodifiableList(exprs_);
328 bitField0_ = (bitField0_ & ~0x00000001);
330 result.exprs_ = exprs_;
332 result.exprs_ = exprsBuilder_.build();
336 private void buildPartial0(com.google.ortools.sat.AllDifferentConstraintProto result) {
337 int from_bitField0_ = bitField0_;
342 return super.
clone();
346 com.google.protobuf.Descriptors.FieldDescriptor field,
347 java.lang.Object value) {
348 return super.
setField(field, value);
352 com.google.protobuf.Descriptors.FieldDescriptor field) {
357 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
362 com.google.protobuf.Descriptors.FieldDescriptor field,
363 int index, java.lang.Object value) {
368 com.google.protobuf.Descriptors.FieldDescriptor field,
369 java.lang.Object value) {
374 if (other instanceof com.google.ortools.sat.AllDifferentConstraintProto) {
375 return mergeFrom((com.google.ortools.sat.AllDifferentConstraintProto)other);
377 super.mergeFrom(other);
383 if (other == com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance())
return this;
384 if (exprsBuilder_ ==
null) {
385 if (!other.exprs_.isEmpty()) {
386 if (exprs_.isEmpty()) {
387 exprs_ = other.exprs_;
388 bitField0_ = (bitField0_ & ~0x00000001);
390 ensureExprsIsMutable();
391 exprs_.addAll(other.exprs_);
396 if (!other.exprs_.isEmpty()) {
397 if (exprsBuilder_.isEmpty()) {
398 exprsBuilder_.dispose();
399 exprsBuilder_ =
null;
400 exprs_ = other.exprs_;
401 bitField0_ = (bitField0_ & ~0x00000001);
403 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
404 getExprsFieldBuilder() :
null;
406 exprsBuilder_.addAllMessages(other.exprs_);
422 com.google.protobuf.CodedInputStream input,
423 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
424 throws java.io.IOException {
425 if (extensionRegistry ==
null) {
426 throw new java.lang.NullPointerException();
429 boolean done =
false;
431 int tag = input.readTag();
439 com.google.ortools.sat.LinearExpressionProto.parser(),
441 if (exprsBuilder_ ==
null) {
442 ensureExprsIsMutable();
445 exprsBuilder_.addMessage(m);
450 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
457 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
458 throw e.unwrapIOException();
464 private int bitField0_;
466 private java.util.List<com.google.ortools.sat.LinearExpressionProto> exprs_ =
467 java.util.Collections.emptyList();
468 private void ensureExprsIsMutable() {
469 if (!((bitField0_ & 0x00000001) != 0)) {
470 exprs_ =
new java.util.ArrayList<com.google.ortools.sat.LinearExpressionProto>(exprs_);
471 bitField0_ |= 0x00000001;
475 private com.google.protobuf.RepeatedFieldBuilderV3<
476 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> exprsBuilder_;
481 public java.util.List<com.google.ortools.sat.LinearExpressionProto>
getExprsList() {
482 if (exprsBuilder_ ==
null) {
483 return java.util.Collections.unmodifiableList(exprs_);
485 return exprsBuilder_.getMessageList();
492 if (exprsBuilder_ ==
null) {
493 return exprs_.size();
495 return exprsBuilder_.getCount();
502 if (exprsBuilder_ ==
null) {
503 return exprs_.get(index);
505 return exprsBuilder_.getMessage(index);
512 int index, com.google.ortools.sat.LinearExpressionProto value) {
513 if (exprsBuilder_ ==
null) {
515 throw new NullPointerException();
517 ensureExprsIsMutable();
518 exprs_.set(index, value);
521 exprsBuilder_.setMessage(index, value);
529 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
530 if (exprsBuilder_ ==
null) {
531 ensureExprsIsMutable();
532 exprs_.set(index, builderForValue.build());
535 exprsBuilder_.setMessage(index, builderForValue.build());
543 if (exprsBuilder_ ==
null) {
545 throw new NullPointerException();
547 ensureExprsIsMutable();
551 exprsBuilder_.addMessage(value);
559 int index, com.google.ortools.sat.LinearExpressionProto value) {
560 if (exprsBuilder_ ==
null) {
562 throw new NullPointerException();
564 ensureExprsIsMutable();
565 exprs_.add(index, value);
568 exprsBuilder_.addMessage(index, value);
576 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
577 if (exprsBuilder_ ==
null) {
578 ensureExprsIsMutable();
579 exprs_.add(builderForValue.build());
582 exprsBuilder_.addMessage(builderForValue.build());
590 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
591 if (exprsBuilder_ ==
null) {
592 ensureExprsIsMutable();
593 exprs_.add(index, builderForValue.build());
596 exprsBuilder_.addMessage(index, builderForValue.build());
604 java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto> values) {
605 if (exprsBuilder_ ==
null) {
606 ensureExprsIsMutable();
607 com.google.protobuf.AbstractMessageLite.Builder.addAll(
611 exprsBuilder_.addAllMessages(values);
619 if (exprsBuilder_ ==
null) {
620 exprs_ = java.util.Collections.emptyList();
621 bitField0_ = (bitField0_ & ~0x00000001);
624 exprsBuilder_.clear();
632 if (exprsBuilder_ ==
null) {
633 ensureExprsIsMutable();
634 exprs_.remove(index);
637 exprsBuilder_.remove(index);
646 return getExprsFieldBuilder().getBuilder(index);
653 if (exprsBuilder_ ==
null) {
654 return exprs_.get(index); }
else {
655 return exprsBuilder_.getMessageOrBuilder(index);
661 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
663 if (exprsBuilder_ !=
null) {
664 return exprsBuilder_.getMessageOrBuilderList();
666 return java.util.Collections.unmodifiableList(exprs_);
673 return getExprsFieldBuilder().addBuilder(
674 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
681 return getExprsFieldBuilder().addBuilder(
682 index, com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
687 public java.util.List<com.google.ortools.sat.LinearExpressionProto.Builder>
689 return getExprsFieldBuilder().getBuilderList();
691 private com.google.protobuf.RepeatedFieldBuilderV3<
692 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
693 getExprsFieldBuilder() {
694 if (exprsBuilder_ ==
null) {
695 exprsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
696 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
698 ((bitField0_ & 0x00000001) != 0),
699 getParentForChildren(),
703 return exprsBuilder_;
707 final com.google.protobuf.UnknownFieldSet unknownFields) {
713 final com.google.protobuf.UnknownFieldSet unknownFields) {
724 DEFAULT_INSTANCE =
new com.google.ortools.sat.AllDifferentConstraintProto();
728 return DEFAULT_INSTANCE;
735 com.google.protobuf.CodedInputStream input,
736 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
737 throws com.google.protobuf.InvalidProtocolBufferException {
740 builder.mergeFrom(input, extensionRegistry);
741 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
742 throw e.setUnfinishedMessage(builder.buildPartial());
743 }
catch (com.google.protobuf.UninitializedMessageException e) {
744 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
745 }
catch (java.io.IOException e) {
746 throw new com.google.protobuf.InvalidProtocolBufferException(e)
747 .setUnfinishedMessage(builder.buildPartial());
749 return builder.buildPartial();
764 return DEFAULT_INSTANCE;