6package com.google.ortools.sat;
16@com.google.protobuf.Generated
17public final class InverseConstraintProto
extends
18 com.google.protobuf.GeneratedMessage implements
21private static final long serialVersionUID = 0L;
23 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
24 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 InverseConstraintProto.class.getName());
32 private InverseConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35 private InverseConstraintProto() {
36 fDirect_ = emptyIntList();
37 fInverse_ = emptyIntList();
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
54 @SuppressWarnings(
"serial")
55 private com.google.protobuf.Internal.IntList fDirect_ =
62 public java.
util.List<java.lang.Integer>
71 return fDirect_.size();
79 return fDirect_.getInt(index);
81 private int fDirectMemoizedSerializedSize = -1;
84 @SuppressWarnings(
"serial")
85 private com.google.protobuf.Internal.IntList fInverse_ =
92 public java.
util.List<java.lang.Integer>
101 return fInverse_.size();
109 return fInverse_.getInt(index);
111 private int fInverseMemoizedSerializedSize = -1;
113 private byte memoizedIsInitialized = -1;
120 memoizedIsInitialized = 1;
125 public void writeTo(com.google.protobuf.CodedOutputStream output)
126 throws java.io.IOException {
129 output.writeUInt32NoTag(10);
130 output.writeUInt32NoTag(fDirectMemoizedSerializedSize);
132 for (
int i = 0; i < fDirect_.size(); i++) {
133 output.writeInt32NoTag(fDirect_.getInt(i));
136 output.writeUInt32NoTag(18);
137 output.writeUInt32NoTag(fInverseMemoizedSerializedSize);
139 for (
int i = 0; i < fInverse_.size(); i++) {
140 output.writeInt32NoTag(fInverse_.getInt(i));
142 getUnknownFields().writeTo(output);
147 int size = memoizedSize;
148 if (size != -1)
return size;
153 for (
int i = 0; i < fDirect_.size(); i++) {
154 dataSize += com.google.protobuf.CodedOutputStream
155 .computeInt32SizeNoTag(fDirect_.getInt(i));
160 size += com.google.protobuf.CodedOutputStream
161 .computeInt32SizeNoTag(dataSize);
163 fDirectMemoizedSerializedSize = dataSize;
167 for (
int i = 0; i < fInverse_.size(); i++) {
168 dataSize += com.google.protobuf.CodedOutputStream
169 .computeInt32SizeNoTag(fInverse_.getInt(i));
174 size += com.google.protobuf.CodedOutputStream
175 .computeInt32SizeNoTag(dataSize);
177 fInverseMemoizedSerializedSize = dataSize;
179 size += getUnknownFields().getSerializedSize();
185 public boolean equals(
final java.lang.Object obj) {
189 if (!(obj instanceof com.google.ortools.sat.InverseConstraintProto)) {
190 return super.equals(obj);
198 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
204 if (memoizedHashCode != 0) {
205 return memoizedHashCode;
217 hash = (29 * hash) + getUnknownFields().hashCode();
218 memoizedHashCode = hash;
223 java.nio.ByteBuffer data)
224 throws com.google.protobuf.InvalidProtocolBufferException {
225 return PARSER.parseFrom(data);
228 java.nio.ByteBuffer data,
229 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
230 throws com.google.protobuf.InvalidProtocolBufferException {
231 return PARSER.parseFrom(data, extensionRegistry);
234 com.google.protobuf.ByteString data)
235 throws com.google.protobuf.InvalidProtocolBufferException {
236 return PARSER.parseFrom(data);
239 com.google.protobuf.ByteString data,
240 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
241 throws com.google.protobuf.InvalidProtocolBufferException {
242 return PARSER.parseFrom(data, extensionRegistry);
245 throws com.google.protobuf.InvalidProtocolBufferException {
246 return PARSER.parseFrom(data);
250 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
251 throws com.google.protobuf.InvalidProtocolBufferException {
252 return PARSER.parseFrom(data, extensionRegistry);
255 throws java.io.IOException {
256 return com.google.protobuf.GeneratedMessage
257 .parseWithIOException(PARSER, input);
260 java.io.InputStream input,
261 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
262 throws java.io.IOException {
263 return com.google.protobuf.GeneratedMessage
264 .parseWithIOException(PARSER, input, extensionRegistry);
268 throws java.io.IOException {
269 return com.google.protobuf.GeneratedMessage
270 .parseDelimitedWithIOException(PARSER, input);
274 java.io.InputStream input,
275 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
276 throws java.io.IOException {
277 return com.google.protobuf.GeneratedMessage
278 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
281 com.google.protobuf.CodedInputStream input)
282 throws java.io.IOException {
283 return com.google.protobuf.GeneratedMessage
284 .parseWithIOException(PARSER, input);
287 com.google.protobuf.CodedInputStream input,
288 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
289 throws java.io.IOException {
290 return com.google.protobuf.GeneratedMessage
291 .parseWithIOException(PARSER, input, extensionRegistry);
297 return DEFAULT_INSTANCE.toBuilder();
300 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
304 return this == DEFAULT_INSTANCE
310 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
322 public static final class Builder
extends
323 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
326 public static final com.google.protobuf.Descriptors.Descriptor
328 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
332 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
334 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_fieldAccessorTable
335 .ensureFieldAccessorsInitialized(
336 com.google.ortools.sat.InverseConstraintProto.class, com.google.ortools.sat.InverseConstraintProto.Builder.class);
345 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
353 fDirect_ = emptyIntList();
354 fInverse_ = emptyIntList();
359 public com.google.protobuf.Descriptors.Descriptor
361 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_InverseConstraintProto_descriptor;
366 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
373 throw newUninitializedMessageException(result);
381 if (bitField0_ != 0) { buildPartial0(result); }
386 private void buildPartial0(com.google.ortools.sat.InverseConstraintProto result) {
387 int from_bitField0_ = bitField0_;
388 if (((from_bitField0_ & 0x00000001) != 0)) {
389 fDirect_.makeImmutable();
390 result.fDirect_ = fDirect_;
392 if (((from_bitField0_ & 0x00000002) != 0)) {
393 fInverse_.makeImmutable();
394 result.fInverse_ = fInverse_;
399 public Builder
mergeFrom(com.google.protobuf.Message other) {
400 if (other instanceof com.google.ortools.sat.InverseConstraintProto) {
401 return mergeFrom((com.google.ortools.sat.InverseConstraintProto)other);
403 super.mergeFrom(other);
408 public Builder
mergeFrom(com.google.ortools.sat.InverseConstraintProto other) {
409 if (other == com.google.ortools.sat.InverseConstraintProto.getDefaultInstance())
return this;
410 if (!other.fDirect_.isEmpty()) {
411 if (fDirect_.isEmpty()) {
412 fDirect_ = other.fDirect_;
413 fDirect_.makeImmutable();
414 bitField0_ |= 0x00000001;
416 ensureFDirectIsMutable();
417 fDirect_.addAll(other.fDirect_);
421 if (!other.fInverse_.isEmpty()) {
422 if (fInverse_.isEmpty()) {
423 fInverse_ = other.fInverse_;
424 fInverse_.makeImmutable();
425 bitField0_ |= 0x00000002;
427 ensureFInverseIsMutable();
428 fInverse_.addAll(other.fInverse_);
432 this.mergeUnknownFields(other.getUnknownFields());
444 com.google.protobuf.CodedInputStream input,
445 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
446 throws java.io.IOException {
447 if (extensionRegistry ==
null) {
448 throw new java.lang.NullPointerException();
451 boolean done =
false;
453 int tag = input.readTag();
459 int v = input.readInt32();
460 ensureFDirectIsMutable();
465 int length = input.readRawVarint32();
466 int limit = input.pushLimit(length);
467 ensureFDirectIsMutable();
468 while (input.getBytesUntilLimit() > 0) {
469 fDirect_.addInt(input.readInt32());
471 input.popLimit(limit);
475 int v = input.readInt32();
476 ensureFInverseIsMutable();
481 int length = input.readRawVarint32();
482 int limit = input.pushLimit(length);
483 ensureFInverseIsMutable();
484 while (input.getBytesUntilLimit() > 0) {
485 fInverse_.addInt(input.readInt32());
487 input.popLimit(limit);
491 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
498 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
499 throw e.unwrapIOException();
505 private int bitField0_;
507 private com.google.protobuf.Internal.IntList fDirect_ = emptyIntList();
508 private void ensureFDirectIsMutable() {
509 if (!fDirect_.isModifiable()) {
510 fDirect_ = makeMutableCopy(fDirect_);
512 bitField0_ |= 0x00000001;
518 public java.util.List<java.lang.Integer>
520 fDirect_.makeImmutable();
528 return fDirect_.size();
536 return fDirect_.getInt(index);
545 int index,
int value) {
547 ensureFDirectIsMutable();
548 fDirect_.setInt(index, value);
549 bitField0_ |= 0x00000001;
560 ensureFDirectIsMutable();
561 fDirect_.addInt(value);
562 bitField0_ |= 0x00000001;
572 java.lang.Iterable<? extends java.lang.Integer> values) {
573 ensureFDirectIsMutable();
574 com.google.protobuf.AbstractMessageLite.Builder.addAll(
576 bitField0_ |= 0x00000001;
585 fDirect_ = emptyIntList();
586 bitField0_ = (bitField0_ & ~0x00000001);
591 private com.google.protobuf.Internal.IntList fInverse_ = emptyIntList();
592 private void ensureFInverseIsMutable() {
593 if (!fInverse_.isModifiable()) {
594 fInverse_ = makeMutableCopy(fInverse_);
596 bitField0_ |= 0x00000002;
602 public java.util.List<java.lang.Integer>
604 fInverse_.makeImmutable();
612 return fInverse_.size();
620 return fInverse_.getInt(index);
629 int index,
int value) {
631 ensureFInverseIsMutable();
632 fInverse_.setInt(index, value);
633 bitField0_ |= 0x00000002;
644 ensureFInverseIsMutable();
645 fInverse_.addInt(value);
646 bitField0_ |= 0x00000002;
656 java.lang.Iterable<? extends java.lang.Integer> values) {
657 ensureFInverseIsMutable();
658 com.google.protobuf.AbstractMessageLite.Builder.addAll(
660 bitField0_ |= 0x00000002;
669 fInverse_ = emptyIntList();
670 bitField0_ = (bitField0_ & ~0x00000002);
681 DEFAULT_INSTANCE =
new com.google.ortools.sat.InverseConstraintProto();
685 return DEFAULT_INSTANCE;
692 com.google.protobuf.CodedInputStream input,
693 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
694 throws com.google.protobuf.InvalidProtocolBufferException {
697 builder.mergeFrom(input, extensionRegistry);
698 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
699 throw e.setUnfinishedMessage(builder.buildPartial());
700 }
catch (com.google.protobuf.UninitializedMessageException e) {
701 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
702 }
catch (java.io.IOException e) {
703 throw new com.google.protobuf.InvalidProtocolBufferException(e)
704 .setUnfinishedMessage(builder.buildPartial());
706 return builder.buildPartial();
710 public static com.google.protobuf.Parser<InverseConstraintProto>
parser() {
721 return DEFAULT_INSTANCE;