5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
34 fDirect_ = emptyIntList();
35 fInverse_ = emptyIntList();
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
52 @SuppressWarnings(
"serial")
53 private com.google.protobuf.Internal.IntList fDirect_ =
60 public java.util.List<java.lang.Integer>
69 return fDirect_.size();
77 return fDirect_.getInt(index);
79 private int fDirectMemoizedSerializedSize = -1;
82 @SuppressWarnings(
"serial")
83 private com.google.protobuf.Internal.IntList fInverse_ =
90 public java.util.List<java.lang.Integer>
99 return fInverse_.size();
107 return fInverse_.getInt(index);
109 private int fInverseMemoizedSerializedSize = -1;
111 private byte memoizedIsInitialized = -1;
118 memoizedIsInitialized = 1;
123 public void writeTo(com.google.protobuf.CodedOutputStream output)
124 throws java.io.IOException {
127 output.writeUInt32NoTag(10);
128 output.writeUInt32NoTag(fDirectMemoizedSerializedSize);
130 for (
int i = 0; i < fDirect_.size(); i++) {
131 output.writeInt32NoTag(fDirect_.getInt(i));
134 output.writeUInt32NoTag(18);
135 output.writeUInt32NoTag(fInverseMemoizedSerializedSize);
137 for (
int i = 0; i < fInverse_.size(); i++) {
138 output.writeInt32NoTag(fInverse_.getInt(i));
140 getUnknownFields().writeTo(output);
145 int size = memoizedSize;
146 if (size != -1)
return size;
151 for (
int i = 0; i < fDirect_.size(); i++) {
152 dataSize += com.google.protobuf.CodedOutputStream
153 .computeInt32SizeNoTag(fDirect_.getInt(i));
158 size += com.google.protobuf.CodedOutputStream
159 .computeInt32SizeNoTag(dataSize);
161 fDirectMemoizedSerializedSize = dataSize;
165 for (
int i = 0; i < fInverse_.size(); i++) {
166 dataSize += com.google.protobuf.CodedOutputStream
167 .computeInt32SizeNoTag(fInverse_.getInt(i));
172 size += com.google.protobuf.CodedOutputStream
173 .computeInt32SizeNoTag(dataSize);
175 fInverseMemoizedSerializedSize = dataSize;
177 size += getUnknownFields().getSerializedSize();
183 public boolean equals(
final java.lang.Object obj) {
187 if (!(obj instanceof com.google.ortools.sat.InverseConstraintProto)) {
188 return super.equals(obj);
196 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
202 if (memoizedHashCode != 0) {
203 return memoizedHashCode;
215 hash = (29 * hash) + getUnknownFields().hashCode();
216 memoizedHashCode = hash;
221 java.nio.ByteBuffer data)
222 throws com.google.protobuf.InvalidProtocolBufferException {
223 return PARSER.parseFrom(data);
226 java.nio.ByteBuffer data,
227 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
228 throws com.google.protobuf.InvalidProtocolBufferException {
229 return PARSER.parseFrom(data, extensionRegistry);
232 com.google.protobuf.ByteString data)
233 throws com.google.protobuf.InvalidProtocolBufferException {
234 return PARSER.parseFrom(data);
237 com.google.protobuf.ByteString data,
238 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
239 throws com.google.protobuf.InvalidProtocolBufferException {
240 return PARSER.parseFrom(data, extensionRegistry);
243 throws com.google.protobuf.InvalidProtocolBufferException {
244 return PARSER.parseFrom(data);
248 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
249 throws com.google.protobuf.InvalidProtocolBufferException {
250 return PARSER.parseFrom(data, extensionRegistry);
253 throws java.io.IOException {
254 return com.google.protobuf.GeneratedMessage
255 .parseWithIOException(PARSER, input);
258 java.io.InputStream input,
259 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
260 throws java.io.IOException {
261 return com.google.protobuf.GeneratedMessage
262 .parseWithIOException(PARSER, input, extensionRegistry);
266 throws java.io.IOException {
267 return com.google.protobuf.GeneratedMessage
268 .parseDelimitedWithIOException(PARSER, input);
272 java.io.InputStream input,
273 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
274 throws java.io.IOException {
275 return com.google.protobuf.GeneratedMessage
276 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
279 com.google.protobuf.CodedInputStream input)
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessage
282 .parseWithIOException(PARSER, input);
285 com.google.protobuf.CodedInputStream input,
286 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
287 throws java.io.IOException {
288 return com.google.protobuf.GeneratedMessage
289 .parseWithIOException(PARSER, input, extensionRegistry);
302 return this == DEFAULT_INSTANCE
308 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
321 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
324 public static final com.google.protobuf.Descriptors.Descriptor
326 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
330 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
332 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
333 .ensureFieldAccessorsInitialized(
334 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
343 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
351 fDirect_ = emptyIntList();
352 fInverse_ = emptyIntList();
357 public com.google.protobuf.Descriptors.Descriptor
359 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
364 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
371 throw newUninitializedMessageException(result);
379 if (bitField0_ != 0) { buildPartial0(result); }
384 private void buildPartial0(com.google.ortools.sat.InverseConstraintProto result) {
385 int from_bitField0_ = bitField0_;
386 if (((from_bitField0_ & 0x00000001) != 0)) {
387 fDirect_.makeImmutable();
388 result.fDirect_ = fDirect_;
390 if (((from_bitField0_ & 0x00000002) != 0)) {
391 fInverse_.makeImmutable();
392 result.fInverse_ = fInverse_;
398 if (other instanceof com.google.ortools.sat.InverseConstraintProto) {
399 return mergeFrom((com.google.ortools.sat.InverseConstraintProto)other);
401 super.mergeFrom(other);
407 if (other == com.google.ortools.sat.InverseConstraintProto.getDefaultInstance())
return this;
408 if (!other.fDirect_.isEmpty()) {
409 if (fDirect_.isEmpty()) {
410 fDirect_ = other.fDirect_;
411 fDirect_.makeImmutable();
412 bitField0_ |= 0x00000001;
414 ensureFDirectIsMutable();
415 fDirect_.addAll(other.fDirect_);
419 if (!other.fInverse_.isEmpty()) {
420 if (fInverse_.isEmpty()) {
421 fInverse_ = other.fInverse_;
422 fInverse_.makeImmutable();
423 bitField0_ |= 0x00000002;
425 ensureFInverseIsMutable();
426 fInverse_.addAll(other.fInverse_);
430 this.mergeUnknownFields(other.getUnknownFields());
442 com.google.protobuf.CodedInputStream input,
443 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
444 throws java.io.IOException {
445 if (extensionRegistry ==
null) {
446 throw new java.lang.NullPointerException();
449 boolean done =
false;
451 int tag = input.readTag();
457 int v = input.readInt32();
458 ensureFDirectIsMutable();
463 int length = input.readRawVarint32();
464 int limit = input.pushLimit(length);
465 ensureFDirectIsMutable();
466 while (input.getBytesUntilLimit() > 0) {
467 fDirect_.addInt(input.readInt32());
469 input.popLimit(limit);
473 int v = input.readInt32();
474 ensureFInverseIsMutable();
479 int length = input.readRawVarint32();
480 int limit = input.pushLimit(length);
481 ensureFInverseIsMutable();
482 while (input.getBytesUntilLimit() > 0) {
483 fInverse_.addInt(input.readInt32());
485 input.popLimit(limit);
489 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
496 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
497 throw e.unwrapIOException();
503 private int bitField0_;
505 private com.google.protobuf.Internal.IntList fDirect_ = emptyIntList();
506 private void ensureFDirectIsMutable() {
507 if (!fDirect_.isModifiable()) {
508 fDirect_ = makeMutableCopy(fDirect_);
510 bitField0_ |= 0x00000001;
516 public java.util.List<java.lang.Integer>
518 fDirect_.makeImmutable();
526 return fDirect_.size();
534 return fDirect_.getInt(index);
543 int index,
int value) {
545 ensureFDirectIsMutable();
546 fDirect_.setInt(index, value);
547 bitField0_ |= 0x00000001;
558 ensureFDirectIsMutable();
559 fDirect_.addInt(value);
560 bitField0_ |= 0x00000001;
570 java.lang.Iterable<? extends java.lang.Integer> values) {
571 ensureFDirectIsMutable();
572 com.google.protobuf.AbstractMessageLite.Builder.addAll(
574 bitField0_ |= 0x00000001;
583 fDirect_ = emptyIntList();
584 bitField0_ = (bitField0_ & ~0x00000001);
589 private com.google.protobuf.Internal.IntList fInverse_ = emptyIntList();
590 private void ensureFInverseIsMutable() {
591 if (!fInverse_.isModifiable()) {
592 fInverse_ = makeMutableCopy(fInverse_);
594 bitField0_ |= 0x00000002;
600 public java.util.List<java.lang.Integer>
602 fInverse_.makeImmutable();
610 return fInverse_.size();
618 return fInverse_.getInt(index);
627 int index,
int value) {
629 ensureFInverseIsMutable();
630 fInverse_.setInt(index, value);
631 bitField0_ |= 0x00000002;
642 ensureFInverseIsMutable();
643 fInverse_.addInt(value);
644 bitField0_ |= 0x00000002;
654 java.lang.Iterable<? extends java.lang.Integer> values) {
655 ensureFInverseIsMutable();
656 com.google.protobuf.AbstractMessageLite.Builder.addAll(
658 bitField0_ |= 0x00000002;
667 fInverse_ = emptyIntList();
668 bitField0_ = (bitField0_ & ~0x00000002);
679 DEFAULT_INSTANCE =
new com.google.ortools.sat.InverseConstraintProto();
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;