5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
25 fDirect_ = emptyIntList();
26 fInverse_ = emptyIntList();
30 @SuppressWarnings({
"unused"})
32 UnusedPrivateParameter unused) {
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
42 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
44 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
50 @SuppressWarnings(
"serial")
51 private com.google.protobuf.Internal.IntList fDirect_ =
58 public java.util.List<java.lang.Integer>
67 return fDirect_.size();
75 return fDirect_.getInt(index);
77 private int fDirectMemoizedSerializedSize = -1;
80 @SuppressWarnings(
"serial")
81 private com.google.protobuf.Internal.IntList fInverse_ =
88 public java.util.List<java.lang.Integer>
97 return fInverse_.size();
105 return fInverse_.getInt(index);
107 private int fInverseMemoizedSerializedSize = -1;
109 private byte memoizedIsInitialized = -1;
116 memoizedIsInitialized = 1;
121 public void writeTo(com.google.protobuf.CodedOutputStream output)
122 throws java.io.IOException {
125 output.writeUInt32NoTag(10);
126 output.writeUInt32NoTag(fDirectMemoizedSerializedSize);
128 for (
int i = 0; i < fDirect_.size(); i++) {
129 output.writeInt32NoTag(fDirect_.getInt(i));
132 output.writeUInt32NoTag(18);
133 output.writeUInt32NoTag(fInverseMemoizedSerializedSize);
135 for (
int i = 0; i < fInverse_.size(); i++) {
136 output.writeInt32NoTag(fInverse_.getInt(i));
138 getUnknownFields().writeTo(output);
143 int size = memoizedSize;
144 if (size != -1)
return size;
149 for (
int i = 0; i < fDirect_.size(); i++) {
150 dataSize += com.google.protobuf.CodedOutputStream
151 .computeInt32SizeNoTag(fDirect_.getInt(i));
156 size += com.google.protobuf.CodedOutputStream
157 .computeInt32SizeNoTag(dataSize);
159 fDirectMemoizedSerializedSize = dataSize;
163 for (
int i = 0; i < fInverse_.size(); i++) {
164 dataSize += com.google.protobuf.CodedOutputStream
165 .computeInt32SizeNoTag(fInverse_.getInt(i));
170 size += com.google.protobuf.CodedOutputStream
171 .computeInt32SizeNoTag(dataSize);
173 fInverseMemoizedSerializedSize = dataSize;
175 size += getUnknownFields().getSerializedSize();
181 public boolean equals(
final java.lang.Object obj) {
185 if (!(obj instanceof com.google.ortools.sat.InverseConstraintProto)) {
186 return super.equals(obj);
194 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
200 if (memoizedHashCode != 0) {
201 return memoizedHashCode;
213 hash = (29 * hash) + getUnknownFields().hashCode();
214 memoizedHashCode = hash;
219 java.nio.ByteBuffer data)
220 throws com.google.protobuf.InvalidProtocolBufferException {
221 return PARSER.parseFrom(data);
224 java.nio.ByteBuffer data,
225 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
226 throws com.google.protobuf.InvalidProtocolBufferException {
227 return PARSER.parseFrom(data, extensionRegistry);
230 com.google.protobuf.ByteString data)
231 throws com.google.protobuf.InvalidProtocolBufferException {
232 return PARSER.parseFrom(data);
235 com.google.protobuf.ByteString data,
236 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
237 throws com.google.protobuf.InvalidProtocolBufferException {
238 return PARSER.parseFrom(data, extensionRegistry);
241 throws com.google.protobuf.InvalidProtocolBufferException {
242 return PARSER.parseFrom(data);
246 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
247 throws com.google.protobuf.InvalidProtocolBufferException {
248 return PARSER.parseFrom(data, extensionRegistry);
251 throws java.io.IOException {
252 return com.google.protobuf.GeneratedMessageV3
253 .parseWithIOException(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 .parseWithIOException(PARSER, input, extensionRegistry);
264 throws java.io.IOException {
265 return com.google.protobuf.GeneratedMessageV3
266 .parseDelimitedWithIOException(PARSER, input);
270 java.io.InputStream input,
271 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
272 throws java.io.IOException {
273 return com.google.protobuf.GeneratedMessageV3
274 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
277 com.google.protobuf.CodedInputStream input)
278 throws java.io.IOException {
279 return com.google.protobuf.GeneratedMessageV3
280 .parseWithIOException(PARSER, input);
283 com.google.protobuf.CodedInputStream input,
284 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
285 throws java.io.IOException {
286 return com.google.protobuf.GeneratedMessageV3
287 .parseWithIOException(PARSER, input, extensionRegistry);
300 return this == DEFAULT_INSTANCE
306 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
319 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
322 public static final com.google.protobuf.Descriptors.Descriptor
324 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
328 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
330 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
331 .ensureFieldAccessorsInitialized(
332 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
341 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
349 fDirect_ = emptyIntList();
350 fInverse_ = emptyIntList();
355 public com.google.protobuf.Descriptors.Descriptor
357 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
362 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
369 throw newUninitializedMessageException(result);
377 if (bitField0_ != 0) { buildPartial0(result); }
382 private void buildPartial0(com.google.ortools.sat.InverseConstraintProto result) {
383 int from_bitField0_ = bitField0_;
384 if (((from_bitField0_ & 0x00000001) != 0)) {
385 fDirect_.makeImmutable();
386 result.fDirect_ = fDirect_;
388 if (((from_bitField0_ & 0x00000002) != 0)) {
389 fInverse_.makeImmutable();
390 result.fInverse_ = fInverse_;
396 return super.
clone();
400 com.google.protobuf.Descriptors.FieldDescriptor field,
401 java.lang.Object value) {
402 return super.
setField(field, value);
406 com.google.protobuf.Descriptors.FieldDescriptor field) {
411 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
416 com.google.protobuf.Descriptors.FieldDescriptor field,
417 int index, java.lang.Object value) {
422 com.google.protobuf.Descriptors.FieldDescriptor field,
423 java.lang.Object value) {
428 if (other instanceof com.google.ortools.sat.InverseConstraintProto) {
429 return mergeFrom((com.google.ortools.sat.InverseConstraintProto)other);
431 super.mergeFrom(other);
437 if (other == com.google.ortools.sat.InverseConstraintProto.getDefaultInstance())
return this;
438 if (!other.fDirect_.isEmpty()) {
439 if (fDirect_.isEmpty()) {
440 fDirect_ = other.fDirect_;
441 fDirect_.makeImmutable();
442 bitField0_ |= 0x00000001;
444 ensureFDirectIsMutable();
445 fDirect_.addAll(other.fDirect_);
449 if (!other.fInverse_.isEmpty()) {
450 if (fInverse_.isEmpty()) {
451 fInverse_ = other.fInverse_;
452 fInverse_.makeImmutable();
453 bitField0_ |= 0x00000002;
455 ensureFInverseIsMutable();
456 fInverse_.addAll(other.fInverse_);
472 com.google.protobuf.CodedInputStream input,
473 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
474 throws java.io.IOException {
475 if (extensionRegistry ==
null) {
476 throw new java.lang.NullPointerException();
479 boolean done =
false;
481 int tag = input.readTag();
487 int v = input.readInt32();
488 ensureFDirectIsMutable();
493 int length = input.readRawVarint32();
494 int limit = input.pushLimit(length);
495 ensureFDirectIsMutable();
496 while (input.getBytesUntilLimit() > 0) {
497 fDirect_.addInt(input.readInt32());
499 input.popLimit(limit);
503 int v = input.readInt32();
504 ensureFInverseIsMutable();
509 int length = input.readRawVarint32();
510 int limit = input.pushLimit(length);
511 ensureFInverseIsMutable();
512 while (input.getBytesUntilLimit() > 0) {
513 fInverse_.addInt(input.readInt32());
515 input.popLimit(limit);
519 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
526 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
527 throw e.unwrapIOException();
533 private int bitField0_;
535 private com.google.protobuf.Internal.IntList fDirect_ = emptyIntList();
536 private void ensureFDirectIsMutable() {
537 if (!fDirect_.isModifiable()) {
538 fDirect_ = makeMutableCopy(fDirect_);
540 bitField0_ |= 0x00000001;
546 public java.util.List<java.lang.Integer>
548 fDirect_.makeImmutable();
556 return fDirect_.size();
564 return fDirect_.getInt(index);
573 int index,
int value) {
575 ensureFDirectIsMutable();
576 fDirect_.setInt(index, value);
577 bitField0_ |= 0x00000001;
588 ensureFDirectIsMutable();
589 fDirect_.addInt(value);
590 bitField0_ |= 0x00000001;
600 java.lang.Iterable<? extends java.lang.Integer> values) {
601 ensureFDirectIsMutable();
602 com.google.protobuf.AbstractMessageLite.Builder.addAll(
604 bitField0_ |= 0x00000001;
613 fDirect_ = emptyIntList();
614 bitField0_ = (bitField0_ & ~0x00000001);
619 private com.google.protobuf.Internal.IntList fInverse_ = emptyIntList();
620 private void ensureFInverseIsMutable() {
621 if (!fInverse_.isModifiable()) {
622 fInverse_ = makeMutableCopy(fInverse_);
624 bitField0_ |= 0x00000002;
630 public java.util.List<java.lang.Integer>
632 fInverse_.makeImmutable();
640 return fInverse_.size();
648 return fInverse_.getInt(index);
657 int index,
int value) {
659 ensureFInverseIsMutable();
660 fInverse_.setInt(index, value);
661 bitField0_ |= 0x00000002;
672 ensureFInverseIsMutable();
673 fInverse_.addInt(value);
674 bitField0_ |= 0x00000002;
684 java.lang.Iterable<? extends java.lang.Integer> values) {
685 ensureFInverseIsMutable();
686 com.google.protobuf.AbstractMessageLite.Builder.addAll(
688 bitField0_ |= 0x00000002;
697 fInverse_ = emptyIntList();
698 bitField0_ = (bitField0_ & ~0x00000002);
704 final com.google.protobuf.UnknownFieldSet unknownFields) {
710 final com.google.protobuf.UnknownFieldSet unknownFields) {
721 DEFAULT_INSTANCE =
new com.google.ortools.sat.InverseConstraintProto();
725 return DEFAULT_INSTANCE;
732 com.google.protobuf.CodedInputStream input,
733 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
734 throws com.google.protobuf.InvalidProtocolBufferException {
737 builder.mergeFrom(input, extensionRegistry);
738 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
739 throw e.setUnfinishedMessage(builder.buildPartial());
740 }
catch (com.google.protobuf.UninitializedMessageException e) {
741 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
742 }
catch (java.io.IOException e) {
743 throw new com.google.protobuf.InvalidProtocolBufferException(e)
744 .setUnfinishedMessage(builder.buildPartial());
746 return builder.buildPartial();
761 return DEFAULT_INSTANCE;