5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
25 vars_ = emptyIntList();
29 @SuppressWarnings({
"unused"})
31 UnusedPrivateParameter unused) {
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ElementConstraintProto_descriptor;
41 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
43 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ElementConstraintProto_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.sat.ElementConstraintProto.class, com.google.ortools.sat.ElementConstraintProto.Builder.class);
49 private int index_ = 0;
60 private int target_ = 0;
71 @SuppressWarnings(
"serial")
72 private com.google.protobuf.Internal.IntList vars_ =
79 public java.util.List<java.lang.Integer>
96 return vars_.getInt(index);
98 private int varsMemoizedSerializedSize = -1;
100 private byte memoizedIsInitialized = -1;
107 memoizedIsInitialized = 1;
112 public void writeTo(com.google.protobuf.CodedOutputStream output)
113 throws java.io.IOException {
116 output.writeInt32(1, index_);
119 output.writeInt32(2, target_);
122 output.writeUInt32NoTag(26);
123 output.writeUInt32NoTag(varsMemoizedSerializedSize);
125 for (
int i = 0; i < vars_.size(); i++) {
126 output.writeInt32NoTag(vars_.getInt(i));
128 getUnknownFields().writeTo(output);
133 int size = memoizedSize;
134 if (size != -1)
return size;
138 size += com.google.protobuf.CodedOutputStream
139 .computeInt32Size(1, index_);
142 size += com.google.protobuf.CodedOutputStream
143 .computeInt32Size(2, target_);
147 for (
int i = 0; i < vars_.size(); i++) {
148 dataSize += com.google.protobuf.CodedOutputStream
149 .computeInt32SizeNoTag(vars_.getInt(i));
154 size += com.google.protobuf.CodedOutputStream
155 .computeInt32SizeNoTag(dataSize);
157 varsMemoizedSerializedSize = dataSize;
159 size += getUnknownFields().getSerializedSize();
165 public boolean equals(
final java.lang.Object obj) {
169 if (!(obj instanceof com.google.ortools.sat.ElementConstraintProto)) {
170 return super.equals(obj);
180 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
186 if (memoizedHashCode != 0) {
187 return memoizedHashCode;
199 hash = (29 * hash) + getUnknownFields().hashCode();
200 memoizedHashCode = hash;
205 java.nio.ByteBuffer data)
206 throws com.google.protobuf.InvalidProtocolBufferException {
207 return PARSER.parseFrom(data);
210 java.nio.ByteBuffer data,
211 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
212 throws com.google.protobuf.InvalidProtocolBufferException {
213 return PARSER.parseFrom(data, extensionRegistry);
216 com.google.protobuf.ByteString data)
217 throws com.google.protobuf.InvalidProtocolBufferException {
218 return PARSER.parseFrom(data);
221 com.google.protobuf.ByteString data,
222 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
223 throws com.google.protobuf.InvalidProtocolBufferException {
224 return PARSER.parseFrom(data, extensionRegistry);
227 throws com.google.protobuf.InvalidProtocolBufferException {
228 return PARSER.parseFrom(data);
232 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
233 throws com.google.protobuf.InvalidProtocolBufferException {
234 return PARSER.parseFrom(data, extensionRegistry);
237 throws java.io.IOException {
238 return com.google.protobuf.GeneratedMessageV3
239 .parseWithIOException(PARSER, input);
242 java.io.InputStream input,
243 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
244 throws java.io.IOException {
245 return com.google.protobuf.GeneratedMessageV3
246 .parseWithIOException(PARSER, input, extensionRegistry);
250 throws java.io.IOException {
251 return com.google.protobuf.GeneratedMessageV3
252 .parseDelimitedWithIOException(PARSER, input);
256 java.io.InputStream input,
257 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
258 throws java.io.IOException {
259 return com.google.protobuf.GeneratedMessageV3
260 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
263 com.google.protobuf.CodedInputStream input)
264 throws java.io.IOException {
265 return com.google.protobuf.GeneratedMessageV3
266 .parseWithIOException(PARSER, input);
269 com.google.protobuf.CodedInputStream input,
270 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
271 throws java.io.IOException {
272 return com.google.protobuf.GeneratedMessageV3
273 .parseWithIOException(PARSER, input, extensionRegistry);
286 return this == DEFAULT_INSTANCE
292 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
305 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
308 public static final com.google.protobuf.Descriptors.Descriptor
310 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ElementConstraintProto_descriptor;
314 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
316 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ElementConstraintProto_fieldAccessorTable
317 .ensureFieldAccessorsInitialized(
318 com.google.ortools.sat.ElementConstraintProto.class, com.google.ortools.sat.ElementConstraintProto.Builder.class);
327 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
337 vars_ = emptyIntList();
342 public com.google.protobuf.Descriptors.Descriptor
344 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ElementConstraintProto_descriptor;
349 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
356 throw newUninitializedMessageException(result);
364 if (bitField0_ != 0) { buildPartial0(result); }
369 private void buildPartial0(com.google.ortools.sat.ElementConstraintProto result) {
370 int from_bitField0_ = bitField0_;
371 if (((from_bitField0_ & 0x00000001) != 0)) {
372 result.index_ = index_;
374 if (((from_bitField0_ & 0x00000002) != 0)) {
375 result.target_ = target_;
377 if (((from_bitField0_ & 0x00000004) != 0)) {
378 vars_.makeImmutable();
379 result.vars_ = vars_;
385 return super.
clone();
389 com.google.protobuf.Descriptors.FieldDescriptor field,
390 java.lang.Object value) {
391 return super.
setField(field, value);
395 com.google.protobuf.Descriptors.FieldDescriptor field) {
400 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
405 com.google.protobuf.Descriptors.FieldDescriptor field,
406 int index, java.lang.Object value) {
411 com.google.protobuf.Descriptors.FieldDescriptor field,
412 java.lang.Object value) {
417 if (other instanceof com.google.ortools.sat.ElementConstraintProto) {
418 return mergeFrom((com.google.ortools.sat.ElementConstraintProto)other);
420 super.mergeFrom(other);
426 if (other == com.google.ortools.sat.ElementConstraintProto.getDefaultInstance())
return this;
427 if (other.getIndex() != 0) {
430 if (other.getTarget() != 0) {
433 if (!other.vars_.isEmpty()) {
434 if (vars_.isEmpty()) {
436 vars_.makeImmutable();
437 bitField0_ |= 0x00000004;
439 ensureVarsIsMutable();
440 vars_.addAll(other.vars_);
456 com.google.protobuf.CodedInputStream input,
457 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
458 throws java.io.IOException {
459 if (extensionRegistry ==
null) {
460 throw new java.lang.NullPointerException();
463 boolean done =
false;
465 int tag = input.readTag();
471 index_ = input.readInt32();
472 bitField0_ |= 0x00000001;
476 target_ = input.readInt32();
477 bitField0_ |= 0x00000002;
481 int v = input.readInt32();
482 ensureVarsIsMutable();
487 int length = input.readRawVarint32();
488 int limit = input.pushLimit(length);
489 ensureVarsIsMutable();
490 while (input.getBytesUntilLimit() > 0) {
491 vars_.addInt(input.readInt32());
493 input.popLimit(limit);
497 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
504 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
505 throw e.unwrapIOException();
511 private int bitField0_;
530 bitField0_ |= 0x00000001;
539 bitField0_ = (bitField0_ & ~0x00000001);
545 private int target_ ;
562 bitField0_ |= 0x00000002;
571 bitField0_ = (bitField0_ & ~0x00000002);
577 private com.google.protobuf.Internal.IntList vars_ = emptyIntList();
578 private void ensureVarsIsMutable() {
579 if (!vars_.isModifiable()) {
580 vars_ = makeMutableCopy(vars_);
582 bitField0_ |= 0x00000004;
588 public java.util.List<java.lang.Integer>
590 vars_.makeImmutable();
606 return vars_.getInt(index);
615 int index,
int value) {
617 ensureVarsIsMutable();
618 vars_.setInt(index, value);
619 bitField0_ |= 0x00000004;
630 ensureVarsIsMutable();
632 bitField0_ |= 0x00000004;
642 java.lang.Iterable<? extends java.lang.Integer> values) {
643 ensureVarsIsMutable();
644 com.google.protobuf.AbstractMessageLite.Builder.addAll(
646 bitField0_ |= 0x00000004;
655 vars_ = emptyIntList();
656 bitField0_ = (bitField0_ & ~0x00000004);
662 final com.google.protobuf.UnknownFieldSet unknownFields) {
668 final com.google.protobuf.UnknownFieldSet unknownFields) {
679 DEFAULT_INSTANCE =
new com.google.ortools.sat.ElementConstraintProto();
683 return DEFAULT_INSTANCE;
690 com.google.protobuf.CodedInputStream input,
691 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
692 throws com.google.protobuf.InvalidProtocolBufferException {
695 builder.mergeFrom(input, extensionRegistry);
696 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
697 throw e.setUnfinishedMessage(builder.buildPartial());
698 }
catch (com.google.protobuf.UninitializedMessageException e) {
699 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
700 }
catch (java.io.IOException e) {
701 throw new com.google.protobuf.InvalidProtocolBufferException(e)
702 .setUnfinishedMessage(builder.buildPartial());
704 return builder.buildPartial();
719 return DEFAULT_INSTANCE;