6package com.google.ortools.sat;
16public final class InverseConstraintProto
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 InverseConstraintProto.class.getName());
31 private InverseConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private InverseConstraintProto() {
35 fDirect_ = emptyIntList();
36 fInverse_ = emptyIntList();
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
53 @SuppressWarnings(
"serial")
54 private com.google.protobuf.Internal.IntList fDirect_ =
61 public java.
util.List<java.lang.Integer>
70 return fDirect_.size();
78 return fDirect_.getInt(index);
80 private int fDirectMemoizedSerializedSize = -1;
83 @SuppressWarnings(
"serial")
84 private com.google.protobuf.Internal.IntList fInverse_ =
91 public java.
util.List<java.lang.Integer>
100 return fInverse_.size();
108 return fInverse_.getInt(index);
110 private int fInverseMemoizedSerializedSize = -1;
112 private byte memoizedIsInitialized = -1;
119 memoizedIsInitialized = 1;
124 public void writeTo(com.google.protobuf.CodedOutputStream output)
125 throws java.io.IOException {
128 output.writeUInt32NoTag(10);
129 output.writeUInt32NoTag(fDirectMemoizedSerializedSize);
131 for (
int i = 0; i < fDirect_.size(); i++) {
132 output.writeInt32NoTag(fDirect_.getInt(i));
135 output.writeUInt32NoTag(18);
136 output.writeUInt32NoTag(fInverseMemoizedSerializedSize);
138 for (
int i = 0; i < fInverse_.size(); i++) {
139 output.writeInt32NoTag(fInverse_.getInt(i));
141 getUnknownFields().writeTo(output);
146 int size = memoizedSize;
147 if (size != -1)
return size;
152 for (
int i = 0; i < fDirect_.size(); i++) {
153 dataSize += com.google.protobuf.CodedOutputStream
154 .computeInt32SizeNoTag(fDirect_.getInt(i));
159 size += com.google.protobuf.CodedOutputStream
160 .computeInt32SizeNoTag(dataSize);
162 fDirectMemoizedSerializedSize = dataSize;
166 for (
int i = 0; i < fInverse_.size(); i++) {
167 dataSize += com.google.protobuf.CodedOutputStream
168 .computeInt32SizeNoTag(fInverse_.getInt(i));
173 size += com.google.protobuf.CodedOutputStream
174 .computeInt32SizeNoTag(dataSize);
176 fInverseMemoizedSerializedSize = dataSize;
178 size += getUnknownFields().getSerializedSize();
184 public boolean equals(
final java.lang.Object obj) {
188 if (!(obj instanceof com.google.ortools.sat.InverseConstraintProto)) {
189 return super.equals(obj);
197 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
203 if (memoizedHashCode != 0) {
204 return memoizedHashCode;
216 hash = (29 * hash) + getUnknownFields().hashCode();
217 memoizedHashCode = hash;
222 java.nio.ByteBuffer data)
223 throws com.google.protobuf.InvalidProtocolBufferException {
224 return PARSER.parseFrom(data);
227 java.nio.ByteBuffer data,
228 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
229 throws com.google.protobuf.InvalidProtocolBufferException {
230 return PARSER.parseFrom(data, extensionRegistry);
233 com.google.protobuf.ByteString data)
234 throws com.google.protobuf.InvalidProtocolBufferException {
235 return PARSER.parseFrom(data);
238 com.google.protobuf.ByteString data,
239 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
240 throws com.google.protobuf.InvalidProtocolBufferException {
241 return PARSER.parseFrom(data, extensionRegistry);
244 throws com.google.protobuf.InvalidProtocolBufferException {
245 return PARSER.parseFrom(data);
249 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250 throws com.google.protobuf.InvalidProtocolBufferException {
251 return PARSER.parseFrom(data, extensionRegistry);
254 throws java.io.IOException {
255 return com.google.protobuf.GeneratedMessage
256 .parseWithIOException(PARSER, input);
259 java.io.InputStream input,
260 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
261 throws java.io.IOException {
262 return com.google.protobuf.GeneratedMessage
263 .parseWithIOException(PARSER, input, extensionRegistry);
267 throws java.io.IOException {
268 return com.google.protobuf.GeneratedMessage
269 .parseDelimitedWithIOException(PARSER, input);
273 java.io.InputStream input,
274 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
275 throws java.io.IOException {
276 return com.google.protobuf.GeneratedMessage
277 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
280 com.google.protobuf.CodedInputStream input)
281 throws java.io.IOException {
282 return com.google.protobuf.GeneratedMessage
283 .parseWithIOException(PARSER, input);
286 com.google.protobuf.CodedInputStream input,
287 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
288 throws java.io.IOException {
289 return com.google.protobuf.GeneratedMessage
290 .parseWithIOException(PARSER, input, extensionRegistry);
296 return DEFAULT_INSTANCE.toBuilder();
299 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
303 return this == DEFAULT_INSTANCE
309 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
321 public static final class Builder
extends
322 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
325 public static final com.google.protobuf.Descriptors.Descriptor
327 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
331 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
333 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
334 .ensureFieldAccessorsInitialized(
335 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
344 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
352 fDirect_ = emptyIntList();
353 fInverse_ = emptyIntList();
358 public com.google.protobuf.Descriptors.Descriptor
360 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
365 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
372 throw newUninitializedMessageException(result);
380 if (bitField0_ != 0) { buildPartial0(result); }
385 private void buildPartial0(com.google.ortools.sat.InverseConstraintProto result) {
386 int from_bitField0_ = bitField0_;
387 if (((from_bitField0_ & 0x00000001) != 0)) {
388 fDirect_.makeImmutable();
389 result.fDirect_ = fDirect_;
391 if (((from_bitField0_ & 0x00000002) != 0)) {
392 fInverse_.makeImmutable();
393 result.fInverse_ = fInverse_;
398 public Builder
mergeFrom(com.google.protobuf.Message other) {
399 if (other instanceof com.google.ortools.sat.InverseConstraintProto) {
400 return mergeFrom((com.google.ortools.sat.InverseConstraintProto)other);
402 super.mergeFrom(other);
407 public Builder
mergeFrom(com.google.ortools.sat.InverseConstraintProto other) {
408 if (other == com.google.ortools.sat.InverseConstraintProto.getDefaultInstance())
return this;
409 if (!other.fDirect_.isEmpty()) {
410 if (fDirect_.isEmpty()) {
411 fDirect_ = other.fDirect_;
412 fDirect_.makeImmutable();
413 bitField0_ |= 0x00000001;
415 ensureFDirectIsMutable();
416 fDirect_.addAll(other.fDirect_);
420 if (!other.fInverse_.isEmpty()) {
421 if (fInverse_.isEmpty()) {
422 fInverse_ = other.fInverse_;
423 fInverse_.makeImmutable();
424 bitField0_ |= 0x00000002;
426 ensureFInverseIsMutable();
427 fInverse_.addAll(other.fInverse_);
431 this.mergeUnknownFields(other.getUnknownFields());
443 com.google.protobuf.CodedInputStream input,
444 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
445 throws java.io.IOException {
446 if (extensionRegistry ==
null) {
447 throw new java.lang.NullPointerException();
450 boolean done =
false;
452 int tag = input.readTag();
458 int v = input.readInt32();
459 ensureFDirectIsMutable();
464 int length = input.readRawVarint32();
465 int limit = input.pushLimit(length);
466 ensureFDirectIsMutable();
467 while (input.getBytesUntilLimit() > 0) {
468 fDirect_.addInt(input.readInt32());
470 input.popLimit(limit);
474 int v = input.readInt32();
475 ensureFInverseIsMutable();
480 int length = input.readRawVarint32();
481 int limit = input.pushLimit(length);
482 ensureFInverseIsMutable();
483 while (input.getBytesUntilLimit() > 0) {
484 fInverse_.addInt(input.readInt32());
486 input.popLimit(limit);
490 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
497 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
498 throw e.unwrapIOException();
504 private int bitField0_;
506 private com.google.protobuf.Internal.IntList fDirect_ = emptyIntList();
507 private void ensureFDirectIsMutable() {
508 if (!fDirect_.isModifiable()) {
509 fDirect_ = makeMutableCopy(fDirect_);
511 bitField0_ |= 0x00000001;
517 public java.util.List<java.lang.Integer>
519 fDirect_.makeImmutable();
527 return fDirect_.size();
535 return fDirect_.getInt(index);
544 int index,
int value) {
546 ensureFDirectIsMutable();
547 fDirect_.setInt(index, value);
548 bitField0_ |= 0x00000001;
559 ensureFDirectIsMutable();
560 fDirect_.addInt(value);
561 bitField0_ |= 0x00000001;
571 java.lang.Iterable<? extends java.lang.Integer> values) {
572 ensureFDirectIsMutable();
573 com.google.protobuf.AbstractMessageLite.Builder.addAll(
575 bitField0_ |= 0x00000001;
584 fDirect_ = emptyIntList();
585 bitField0_ = (bitField0_ & ~0x00000001);
590 private com.google.protobuf.Internal.IntList fInverse_ = emptyIntList();
591 private void ensureFInverseIsMutable() {
592 if (!fInverse_.isModifiable()) {
593 fInverse_ = makeMutableCopy(fInverse_);
595 bitField0_ |= 0x00000002;
601 public java.util.List<java.lang.Integer>
603 fInverse_.makeImmutable();
611 return fInverse_.size();
619 return fInverse_.getInt(index);
628 int index,
int value) {
630 ensureFInverseIsMutable();
631 fInverse_.setInt(index, value);
632 bitField0_ |= 0x00000002;
643 ensureFInverseIsMutable();
644 fInverse_.addInt(value);
645 bitField0_ |= 0x00000002;
655 java.lang.Iterable<? extends java.lang.Integer> values) {
656 ensureFInverseIsMutable();
657 com.google.protobuf.AbstractMessageLite.Builder.addAll(
659 bitField0_ |= 0x00000002;
668 fInverse_ = emptyIntList();
669 bitField0_ = (bitField0_ & ~0x00000002);
680 DEFAULT_INSTANCE =
new com.google.ortools.sat.InverseConstraintProto();
684 return DEFAULT_INSTANCE;
691 com.google.protobuf.CodedInputStream input,
692 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
693 throws com.google.protobuf.InvalidProtocolBufferException {
696 builder.mergeFrom(input, extensionRegistry);
697 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
698 throw e.setUnfinishedMessage(builder.buildPartial());
699 }
catch (com.google.protobuf.UninitializedMessageException e) {
700 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
701 }
catch (java.io.IOException e) {
702 throw new com.google.protobuf.InvalidProtocolBufferException(e)
703 .setUnfinishedMessage(builder.buildPartial());
705 return builder.buildPartial();
709 public static com.google.protobuf.Parser<InverseConstraintProto>
parser() {
720 return DEFAULT_INSTANCE;