5package com.google.ortools.sat;
15 com.google.protobuf.GeneratedMessage implements
18private static final long serialVersionUID = 0L;
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
33 exprs_ = java.util.Collections.emptyList();
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_descriptor;
42 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
44 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.sat.AllDifferentConstraintProto.class, com.google.ortools.sat.AllDifferentConstraintProto.Builder.class);
50 @SuppressWarnings(
"serial")
63 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
79 return exprs_.get(index);
87 return exprs_.get(index);
90 private byte memoizedIsInitialized = -1;
97 memoizedIsInitialized = 1;
102 public void writeTo(com.google.protobuf.CodedOutputStream output)
103 throws java.io.IOException {
104 for (
int i = 0; i < exprs_.size(); i++) {
105 output.writeMessage(1, exprs_.get(i));
107 getUnknownFields().writeTo(output);
112 int size = memoizedSize;
113 if (size != -1)
return size;
116 for (
int i = 0; i < exprs_.size(); i++) {
117 size += com.google.protobuf.CodedOutputStream
118 .computeMessageSize(1, exprs_.get(i));
120 size += getUnknownFields().getSerializedSize();
126 public boolean equals(
final java.lang.Object obj) {
130 if (!(obj instanceof com.google.ortools.sat.AllDifferentConstraintProto)) {
131 return super.equals(obj);
137 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
143 if (memoizedHashCode != 0) {
144 return memoizedHashCode;
152 hash = (29 * hash) + getUnknownFields().hashCode();
153 memoizedHashCode = hash;
158 java.nio.ByteBuffer data)
159 throws com.google.protobuf.InvalidProtocolBufferException {
160 return PARSER.parseFrom(data);
163 java.nio.ByteBuffer data,
164 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
165 throws com.google.protobuf.InvalidProtocolBufferException {
166 return PARSER.parseFrom(data, extensionRegistry);
169 com.google.protobuf.ByteString data)
170 throws com.google.protobuf.InvalidProtocolBufferException {
171 return PARSER.parseFrom(data);
174 com.google.protobuf.ByteString data,
175 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
176 throws com.google.protobuf.InvalidProtocolBufferException {
177 return PARSER.parseFrom(data, extensionRegistry);
180 throws com.google.protobuf.InvalidProtocolBufferException {
181 return PARSER.parseFrom(data);
185 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
186 throws com.google.protobuf.InvalidProtocolBufferException {
187 return PARSER.parseFrom(data, extensionRegistry);
190 throws java.io.IOException {
191 return com.google.protobuf.GeneratedMessage
192 .parseWithIOException(PARSER, input);
195 java.io.InputStream input,
196 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
197 throws java.io.IOException {
198 return com.google.protobuf.GeneratedMessage
199 .parseWithIOException(PARSER, input, extensionRegistry);
203 throws java.io.IOException {
204 return com.google.protobuf.GeneratedMessage
205 .parseDelimitedWithIOException(PARSER, input);
209 java.io.InputStream input,
210 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
211 throws java.io.IOException {
212 return com.google.protobuf.GeneratedMessage
213 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
216 com.google.protobuf.CodedInputStream input)
217 throws java.io.IOException {
218 return com.google.protobuf.GeneratedMessage
219 .parseWithIOException(PARSER, input);
222 com.google.protobuf.CodedInputStream input,
223 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
224 throws java.io.IOException {
225 return com.google.protobuf.GeneratedMessage
226 .parseWithIOException(PARSER, input, extensionRegistry);
234 public static Builder newBuilder(com.google.ortools.sat.AllDifferentConstraintProto prototype) {
239 return this == DEFAULT_INSTANCE
245 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
257 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
260 public static final com.google.protobuf.Descriptors.Descriptor
262 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_descriptor;
266 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
268 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_fieldAccessorTable
269 .ensureFieldAccessorsInitialized(
270 com.google.ortools.sat.AllDifferentConstraintProto.class, com.google.ortools.sat.AllDifferentConstraintProto.Builder.class);
279 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
287 if (exprsBuilder_ ==
null) {
288 exprs_ = java.util.Collections.emptyList();
291 exprsBuilder_.clear();
293 bitField0_ = (bitField0_ & ~0x00000001);
298 public com.google.protobuf.Descriptors.Descriptor
300 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_AllDifferentConstraintProto_descriptor;
305 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
312 throw newUninitializedMessageException(result);
320 buildPartialRepeatedFields(result);
321 if (bitField0_ != 0) { buildPartial0(result); }
326 private void buildPartialRepeatedFields(com.google.ortools.sat.AllDifferentConstraintProto result) {
327 if (exprsBuilder_ ==
null) {
328 if (((bitField0_ & 0x00000001) != 0)) {
329 exprs_ = java.util.Collections.unmodifiableList(exprs_);
330 bitField0_ = (bitField0_ & ~0x00000001);
332 result.exprs_ = exprs_;
334 result.exprs_ = exprsBuilder_.build();
338 private void buildPartial0(com.google.ortools.sat.AllDifferentConstraintProto result) {
339 int from_bitField0_ = bitField0_;
344 if (other instanceof com.google.ortools.sat.AllDifferentConstraintProto) {
345 return mergeFrom((com.google.ortools.sat.AllDifferentConstraintProto)other);
347 super.mergeFrom(other);
353 if (other == com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance())
return this;
354 if (exprsBuilder_ ==
null) {
355 if (!other.exprs_.isEmpty()) {
356 if (exprs_.isEmpty()) {
357 exprs_ = other.exprs_;
358 bitField0_ = (bitField0_ & ~0x00000001);
360 ensureExprsIsMutable();
361 exprs_.addAll(other.exprs_);
366 if (!other.exprs_.isEmpty()) {
367 if (exprsBuilder_.isEmpty()) {
368 exprsBuilder_.dispose();
369 exprsBuilder_ =
null;
370 exprs_ = other.exprs_;
371 bitField0_ = (bitField0_ & ~0x00000001);
373 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
374 getExprsFieldBuilder() :
null;
376 exprsBuilder_.addAllMessages(other.exprs_);
380 this.mergeUnknownFields(other.getUnknownFields());
392 com.google.protobuf.CodedInputStream input,
393 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
394 throws java.io.IOException {
395 if (extensionRegistry ==
null) {
396 throw new java.lang.NullPointerException();
399 boolean done =
false;
401 int tag = input.readTag();
409 com.google.ortools.sat.LinearExpressionProto.parser(),
411 if (exprsBuilder_ ==
null) {
412 ensureExprsIsMutable();
415 exprsBuilder_.addMessage(m);
420 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
427 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
428 throw e.unwrapIOException();
434 private int bitField0_;
436 private java.util.List<com.google.ortools.sat.LinearExpressionProto> exprs_ =
437 java.util.Collections.emptyList();
438 private void ensureExprsIsMutable() {
439 if (!((bitField0_ & 0x00000001) != 0)) {
440 exprs_ =
new java.util.ArrayList<com.google.ortools.sat.LinearExpressionProto>(exprs_);
441 bitField0_ |= 0x00000001;
445 private com.google.protobuf.RepeatedFieldBuilder<
446 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> exprsBuilder_;
451 public java.util.List<com.google.ortools.sat.LinearExpressionProto>
getExprsList() {
452 if (exprsBuilder_ ==
null) {
453 return java.util.Collections.unmodifiableList(exprs_);
455 return exprsBuilder_.getMessageList();
462 if (exprsBuilder_ ==
null) {
463 return exprs_.size();
465 return exprsBuilder_.getCount();
472 if (exprsBuilder_ ==
null) {
473 return exprs_.get(index);
475 return exprsBuilder_.getMessage(index);
482 int index, com.google.ortools.sat.LinearExpressionProto value) {
483 if (exprsBuilder_ ==
null) {
485 throw new NullPointerException();
487 ensureExprsIsMutable();
488 exprs_.set(index, value);
491 exprsBuilder_.setMessage(index, value);
499 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
500 if (exprsBuilder_ ==
null) {
501 ensureExprsIsMutable();
502 exprs_.set(index, builderForValue.build());
505 exprsBuilder_.setMessage(index, builderForValue.build());
513 if (exprsBuilder_ ==
null) {
515 throw new NullPointerException();
517 ensureExprsIsMutable();
521 exprsBuilder_.addMessage(value);
529 int index, com.google.ortools.sat.LinearExpressionProto value) {
530 if (exprsBuilder_ ==
null) {
532 throw new NullPointerException();
534 ensureExprsIsMutable();
535 exprs_.add(index, value);
538 exprsBuilder_.addMessage(index, value);
546 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
547 if (exprsBuilder_ ==
null) {
548 ensureExprsIsMutable();
549 exprs_.add(builderForValue.build());
552 exprsBuilder_.addMessage(builderForValue.build());
560 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
561 if (exprsBuilder_ ==
null) {
562 ensureExprsIsMutable();
563 exprs_.add(index, builderForValue.build());
566 exprsBuilder_.addMessage(index, builderForValue.build());
574 java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto> values) {
575 if (exprsBuilder_ ==
null) {
576 ensureExprsIsMutable();
577 com.google.protobuf.AbstractMessageLite.Builder.addAll(
581 exprsBuilder_.addAllMessages(values);
589 if (exprsBuilder_ ==
null) {
590 exprs_ = java.util.Collections.emptyList();
591 bitField0_ = (bitField0_ & ~0x00000001);
594 exprsBuilder_.clear();
602 if (exprsBuilder_ ==
null) {
603 ensureExprsIsMutable();
604 exprs_.remove(index);
607 exprsBuilder_.remove(index);
616 return getExprsFieldBuilder().getBuilder(index);
623 if (exprsBuilder_ ==
null) {
624 return exprs_.get(index); }
else {
625 return exprsBuilder_.getMessageOrBuilder(index);
631 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
633 if (exprsBuilder_ !=
null) {
634 return exprsBuilder_.getMessageOrBuilderList();
636 return java.util.Collections.unmodifiableList(exprs_);
643 return getExprsFieldBuilder().addBuilder(
644 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
651 return getExprsFieldBuilder().addBuilder(
652 index, com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
657 public java.util.List<com.google.ortools.sat.LinearExpressionProto.Builder>
659 return getExprsFieldBuilder().getBuilderList();
661 private com.google.protobuf.RepeatedFieldBuilder<
662 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
663 getExprsFieldBuilder() {
664 if (exprsBuilder_ ==
null) {
665 exprsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
666 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
668 ((bitField0_ & 0x00000001) != 0),
669 getParentForChildren(),
673 return exprsBuilder_;
682 DEFAULT_INSTANCE =
new com.google.ortools.sat.AllDifferentConstraintProto();
686 return DEFAULT_INSTANCE;
693 com.google.protobuf.CodedInputStream input,
694 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
695 throws com.google.protobuf.InvalidProtocolBufferException {
698 builder.mergeFrom(input, extensionRegistry);
699 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
700 throw e.setUnfinishedMessage(builder.buildPartial());
701 }
catch (com.google.protobuf.UninitializedMessageException e) {
702 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
703 }
catch (java.io.IOException e) {
704 throw new com.google.protobuf.InvalidProtocolBufferException(e)
705 .setUnfinishedMessage(builder.buildPartial());
707 return builder.buildPartial();
722 return DEFAULT_INSTANCE;