6package com.google.ortools.sat;
23public final class NoOverlap2DConstraintProto
extends
24 com.google.protobuf.GeneratedMessage implements
27private static final long serialVersionUID = 0L;
29 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
30 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35 NoOverlap2DConstraintProto.class.getName());
38 private NoOverlap2DConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
41 private NoOverlap2DConstraintProto() {
42 xIntervals_ = emptyIntList();
43 yIntervals_ = emptyIntList();
46 public static final com.google.protobuf.Descriptors.Descriptor
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
52 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
54 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
55 .ensureFieldAccessorsInitialized(
56 com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
60 @SuppressWarnings(
"serial")
61 private com.google.protobuf.Internal.IntList xIntervals_ =
68 public java.
util.List<java.lang.Integer>
77 return xIntervals_.size();
85 return xIntervals_.getInt(index);
87 private int xIntervalsMemoizedSerializedSize = -1;
90 @SuppressWarnings(
"serial")
91 private com.google.protobuf.Internal.IntList yIntervals_ =
102 public java.
util.List<java.lang.Integer>
115 return yIntervals_.size();
127 return yIntervals_.getInt(index);
129 private int yIntervalsMemoizedSerializedSize = -1;
131 private byte memoizedIsInitialized = -1;
138 memoizedIsInitialized = 1;
143 public void writeTo(com.google.protobuf.CodedOutputStream output)
144 throws java.io.IOException {
147 output.writeUInt32NoTag(10);
148 output.writeUInt32NoTag(xIntervalsMemoizedSerializedSize);
150 for (
int i = 0; i < xIntervals_.size(); i++) {
151 output.writeInt32NoTag(xIntervals_.getInt(i));
154 output.writeUInt32NoTag(18);
155 output.writeUInt32NoTag(yIntervalsMemoizedSerializedSize);
157 for (
int i = 0; i < yIntervals_.size(); i++) {
158 output.writeInt32NoTag(yIntervals_.getInt(i));
160 getUnknownFields().writeTo(output);
165 int size = memoizedSize;
166 if (size != -1)
return size;
171 for (
int i = 0; i < xIntervals_.size(); i++) {
172 dataSize += com.google.protobuf.CodedOutputStream
173 .computeInt32SizeNoTag(xIntervals_.getInt(i));
178 size += com.google.protobuf.CodedOutputStream
179 .computeInt32SizeNoTag(dataSize);
181 xIntervalsMemoizedSerializedSize = dataSize;
185 for (
int i = 0; i < yIntervals_.size(); i++) {
186 dataSize += com.google.protobuf.CodedOutputStream
187 .computeInt32SizeNoTag(yIntervals_.getInt(i));
192 size += com.google.protobuf.CodedOutputStream
193 .computeInt32SizeNoTag(dataSize);
195 yIntervalsMemoizedSerializedSize = dataSize;
197 size += getUnknownFields().getSerializedSize();
203 public boolean equals(
final java.lang.Object obj) {
207 if (!(obj instanceof com.google.ortools.sat.NoOverlap2DConstraintProto)) {
208 return super.equals(obj);
216 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
222 if (memoizedHashCode != 0) {
223 return memoizedHashCode;
235 hash = (29 * hash) + getUnknownFields().hashCode();
236 memoizedHashCode = hash;
241 java.nio.ByteBuffer data)
242 throws com.google.protobuf.InvalidProtocolBufferException {
243 return PARSER.parseFrom(data);
246 java.nio.ByteBuffer data,
247 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
248 throws com.google.protobuf.InvalidProtocolBufferException {
249 return PARSER.parseFrom(data, extensionRegistry);
252 com.google.protobuf.ByteString data)
253 throws com.google.protobuf.InvalidProtocolBufferException {
254 return PARSER.parseFrom(data);
257 com.google.protobuf.ByteString data,
258 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
259 throws com.google.protobuf.InvalidProtocolBufferException {
260 return PARSER.parseFrom(data, extensionRegistry);
263 throws com.google.protobuf.InvalidProtocolBufferException {
264 return PARSER.parseFrom(data);
268 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
269 throws com.google.protobuf.InvalidProtocolBufferException {
270 return PARSER.parseFrom(data, extensionRegistry);
273 throws java.io.IOException {
274 return com.google.protobuf.GeneratedMessage
275 .parseWithIOException(PARSER, input);
278 java.io.InputStream input,
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessage
282 .parseWithIOException(PARSER, input, extensionRegistry);
286 throws java.io.IOException {
287 return com.google.protobuf.GeneratedMessage
288 .parseDelimitedWithIOException(PARSER, input);
292 java.io.InputStream input,
293 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294 throws java.io.IOException {
295 return com.google.protobuf.GeneratedMessage
296 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
299 com.google.protobuf.CodedInputStream input)
300 throws java.io.IOException {
301 return com.google.protobuf.GeneratedMessage
302 .parseWithIOException(PARSER, input);
305 com.google.protobuf.CodedInputStream input,
306 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
307 throws java.io.IOException {
308 return com.google.protobuf.GeneratedMessage
309 .parseWithIOException(PARSER, input, extensionRegistry);
315 return DEFAULT_INSTANCE.toBuilder();
318 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
322 return this == DEFAULT_INSTANCE
328 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
347 public static final class Builder
extends
348 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
351 public static final com.google.protobuf.Descriptors.Descriptor
353 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
357 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
359 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
360 .ensureFieldAccessorsInitialized(
361 com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
370 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
378 xIntervals_ = emptyIntList();
379 yIntervals_ = emptyIntList();
384 public com.google.protobuf.Descriptors.Descriptor
386 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
391 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
398 throw newUninitializedMessageException(result);
406 if (bitField0_ != 0) { buildPartial0(result); }
411 private void buildPartial0(com.google.ortools.sat.NoOverlap2DConstraintProto result) {
412 int from_bitField0_ = bitField0_;
413 if (((from_bitField0_ & 0x00000001) != 0)) {
414 xIntervals_.makeImmutable();
415 result.xIntervals_ = xIntervals_;
417 if (((from_bitField0_ & 0x00000002) != 0)) {
418 yIntervals_.makeImmutable();
419 result.yIntervals_ = yIntervals_;
424 public Builder
mergeFrom(com.google.protobuf.Message other) {
425 if (other instanceof com.google.ortools.sat.NoOverlap2DConstraintProto) {
426 return mergeFrom((com.google.ortools.sat.NoOverlap2DConstraintProto)other);
428 super.mergeFrom(other);
433 public Builder
mergeFrom(com.google.ortools.sat.NoOverlap2DConstraintProto other) {
434 if (other == com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance())
return this;
435 if (!other.xIntervals_.isEmpty()) {
436 if (xIntervals_.isEmpty()) {
437 xIntervals_ = other.xIntervals_;
438 xIntervals_.makeImmutable();
439 bitField0_ |= 0x00000001;
441 ensureXIntervalsIsMutable();
442 xIntervals_.addAll(other.xIntervals_);
446 if (!other.yIntervals_.isEmpty()) {
447 if (yIntervals_.isEmpty()) {
448 yIntervals_ = other.yIntervals_;
449 yIntervals_.makeImmutable();
450 bitField0_ |= 0x00000002;
452 ensureYIntervalsIsMutable();
453 yIntervals_.addAll(other.yIntervals_);
457 this.mergeUnknownFields(other.getUnknownFields());
469 com.google.protobuf.CodedInputStream input,
470 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
471 throws java.io.IOException {
472 if (extensionRegistry ==
null) {
473 throw new java.lang.NullPointerException();
476 boolean done =
false;
478 int tag = input.readTag();
484 int v = input.readInt32();
485 ensureXIntervalsIsMutable();
486 xIntervals_.addInt(v);
490 int length = input.readRawVarint32();
491 int limit = input.pushLimit(length);
492 ensureXIntervalsIsMutable();
493 while (input.getBytesUntilLimit() > 0) {
494 xIntervals_.addInt(input.readInt32());
496 input.popLimit(limit);
500 int v = input.readInt32();
501 ensureYIntervalsIsMutable();
502 yIntervals_.addInt(v);
506 int length = input.readRawVarint32();
507 int limit = input.pushLimit(length);
508 ensureYIntervalsIsMutable();
509 while (input.getBytesUntilLimit() > 0) {
510 yIntervals_.addInt(input.readInt32());
512 input.popLimit(limit);
516 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
523 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
524 throw e.unwrapIOException();
530 private int bitField0_;
532 private com.google.protobuf.Internal.IntList xIntervals_ = emptyIntList();
533 private void ensureXIntervalsIsMutable() {
534 if (!xIntervals_.isModifiable()) {
535 xIntervals_ = makeMutableCopy(xIntervals_);
537 bitField0_ |= 0x00000001;
543 public java.util.List<java.lang.Integer>
545 xIntervals_.makeImmutable();
553 return xIntervals_.size();
561 return xIntervals_.getInt(index);
570 int index,
int value) {
572 ensureXIntervalsIsMutable();
573 xIntervals_.setInt(index, value);
574 bitField0_ |= 0x00000001;
585 ensureXIntervalsIsMutable();
586 xIntervals_.addInt(value);
587 bitField0_ |= 0x00000001;
597 java.lang.Iterable<? extends java.lang.Integer> values) {
598 ensureXIntervalsIsMutable();
599 com.google.protobuf.AbstractMessageLite.Builder.addAll(
600 values, xIntervals_);
601 bitField0_ |= 0x00000001;
610 xIntervals_ = emptyIntList();
611 bitField0_ = (bitField0_ & ~0x00000001);
616 private com.google.protobuf.Internal.IntList yIntervals_ = emptyIntList();
617 private void ensureYIntervalsIsMutable() {
618 if (!yIntervals_.isModifiable()) {
619 yIntervals_ = makeMutableCopy(yIntervals_);
621 bitField0_ |= 0x00000002;
631 public java.util.List<java.lang.Integer>
633 yIntervals_.makeImmutable();
645 return yIntervals_.size();
657 return yIntervals_.getInt(index);
670 int index,
int value) {
672 ensureYIntervalsIsMutable();
673 yIntervals_.setInt(index, value);
674 bitField0_ |= 0x00000002;
689 ensureYIntervalsIsMutable();
690 yIntervals_.addInt(value);
691 bitField0_ |= 0x00000002;
705 java.lang.Iterable<? extends java.lang.Integer> values) {
706 ensureYIntervalsIsMutable();
707 com.google.protobuf.AbstractMessageLite.Builder.addAll(
708 values, yIntervals_);
709 bitField0_ |= 0x00000002;
722 yIntervals_ = emptyIntList();
723 bitField0_ = (bitField0_ & ~0x00000002);
734 DEFAULT_INSTANCE =
new com.google.ortools.sat.NoOverlap2DConstraintProto();
738 return DEFAULT_INSTANCE;
745 com.google.protobuf.CodedInputStream input,
746 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
747 throws com.google.protobuf.InvalidProtocolBufferException {
750 builder.mergeFrom(input, extensionRegistry);
751 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
752 throw e.setUnfinishedMessage(builder.buildPartial());
753 }
catch (com.google.protobuf.UninitializedMessageException e) {
754 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
755 }
catch (java.io.IOException e) {
756 throw new com.google.protobuf.InvalidProtocolBufferException(e)
757 .setUnfinishedMessage(builder.buildPartial());
759 return builder.buildPartial();
763 public static com.google.protobuf.Parser<NoOverlap2DConstraintProto>
parser() {
774 return DEFAULT_INSTANCE;