5package com.google.ortools.sat;
23 com.google.protobuf.GeneratedMessage implements
26private static final long serialVersionUID = 0L;
28 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
29 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
41 xIntervals_ = emptyIntList();
42 yIntervals_ = emptyIntList();
45 public static final com.google.protobuf.Descriptors.Descriptor
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
51 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
53 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
54 .ensureFieldAccessorsInitialized(
55 com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
59 @SuppressWarnings(
"serial")
60 private com.google.protobuf.Internal.IntList xIntervals_ =
67 public java.util.List<java.lang.Integer>
76 return xIntervals_.size();
84 return xIntervals_.getInt(index);
86 private int xIntervalsMemoizedSerializedSize = -1;
89 @SuppressWarnings(
"serial")
90 private com.google.protobuf.Internal.IntList yIntervals_ =
101 public java.util.List<java.lang.Integer>
114 return yIntervals_.size();
126 return yIntervals_.getInt(index);
128 private int yIntervalsMemoizedSerializedSize = -1;
130 private byte memoizedIsInitialized = -1;
137 memoizedIsInitialized = 1;
142 public void writeTo(com.google.protobuf.CodedOutputStream output)
143 throws java.io.IOException {
146 output.writeUInt32NoTag(10);
147 output.writeUInt32NoTag(xIntervalsMemoizedSerializedSize);
149 for (
int i = 0; i < xIntervals_.size(); i++) {
150 output.writeInt32NoTag(xIntervals_.getInt(i));
153 output.writeUInt32NoTag(18);
154 output.writeUInt32NoTag(yIntervalsMemoizedSerializedSize);
156 for (
int i = 0; i < yIntervals_.size(); i++) {
157 output.writeInt32NoTag(yIntervals_.getInt(i));
159 getUnknownFields().writeTo(output);
164 int size = memoizedSize;
165 if (size != -1)
return size;
170 for (
int i = 0; i < xIntervals_.size(); i++) {
171 dataSize += com.google.protobuf.CodedOutputStream
172 .computeInt32SizeNoTag(xIntervals_.getInt(i));
177 size += com.google.protobuf.CodedOutputStream
178 .computeInt32SizeNoTag(dataSize);
180 xIntervalsMemoizedSerializedSize = dataSize;
184 for (
int i = 0; i < yIntervals_.size(); i++) {
185 dataSize += com.google.protobuf.CodedOutputStream
186 .computeInt32SizeNoTag(yIntervals_.getInt(i));
191 size += com.google.protobuf.CodedOutputStream
192 .computeInt32SizeNoTag(dataSize);
194 yIntervalsMemoizedSerializedSize = dataSize;
196 size += getUnknownFields().getSerializedSize();
202 public boolean equals(
final java.lang.Object obj) {
206 if (!(obj instanceof com.google.ortools.sat.NoOverlap2DConstraintProto)) {
207 return super.equals(obj);
215 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
221 if (memoizedHashCode != 0) {
222 return memoizedHashCode;
234 hash = (29 * hash) + getUnknownFields().hashCode();
235 memoizedHashCode = hash;
240 java.nio.ByteBuffer data)
241 throws com.google.protobuf.InvalidProtocolBufferException {
242 return PARSER.parseFrom(data);
245 java.nio.ByteBuffer data,
246 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
247 throws com.google.protobuf.InvalidProtocolBufferException {
248 return PARSER.parseFrom(data, extensionRegistry);
251 com.google.protobuf.ByteString data)
252 throws com.google.protobuf.InvalidProtocolBufferException {
253 return PARSER.parseFrom(data);
256 com.google.protobuf.ByteString data,
257 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
258 throws com.google.protobuf.InvalidProtocolBufferException {
259 return PARSER.parseFrom(data, extensionRegistry);
262 throws com.google.protobuf.InvalidProtocolBufferException {
263 return PARSER.parseFrom(data);
267 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268 throws com.google.protobuf.InvalidProtocolBufferException {
269 return PARSER.parseFrom(data, extensionRegistry);
272 throws java.io.IOException {
273 return com.google.protobuf.GeneratedMessage
274 .parseWithIOException(PARSER, input);
277 java.io.InputStream input,
278 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
279 throws java.io.IOException {
280 return com.google.protobuf.GeneratedMessage
281 .parseWithIOException(PARSER, input, extensionRegistry);
285 throws java.io.IOException {
286 return com.google.protobuf.GeneratedMessage
287 .parseDelimitedWithIOException(PARSER, input);
291 java.io.InputStream input,
292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293 throws java.io.IOException {
294 return com.google.protobuf.GeneratedMessage
295 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
298 com.google.protobuf.CodedInputStream input)
299 throws java.io.IOException {
300 return com.google.protobuf.GeneratedMessage
301 .parseWithIOException(PARSER, input);
304 com.google.protobuf.CodedInputStream input,
305 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
306 throws java.io.IOException {
307 return com.google.protobuf.GeneratedMessage
308 .parseWithIOException(PARSER, input, extensionRegistry);
321 return this == DEFAULT_INSTANCE
327 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
347 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
350 public static final com.google.protobuf.Descriptors.Descriptor
352 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
356 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
358 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
359 .ensureFieldAccessorsInitialized(
360 com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
369 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
377 xIntervals_ = emptyIntList();
378 yIntervals_ = emptyIntList();
383 public com.google.protobuf.Descriptors.Descriptor
385 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
390 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
397 throw newUninitializedMessageException(result);
405 if (bitField0_ != 0) { buildPartial0(result); }
410 private void buildPartial0(com.google.ortools.sat.NoOverlap2DConstraintProto result) {
411 int from_bitField0_ = bitField0_;
412 if (((from_bitField0_ & 0x00000001) != 0)) {
413 xIntervals_.makeImmutable();
414 result.xIntervals_ = xIntervals_;
416 if (((from_bitField0_ & 0x00000002) != 0)) {
417 yIntervals_.makeImmutable();
418 result.yIntervals_ = yIntervals_;
424 if (other instanceof com.google.ortools.sat.NoOverlap2DConstraintProto) {
425 return mergeFrom((com.google.ortools.sat.NoOverlap2DConstraintProto)other);
427 super.mergeFrom(other);
433 if (other == com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance())
return this;
434 if (!other.xIntervals_.isEmpty()) {
435 if (xIntervals_.isEmpty()) {
436 xIntervals_ = other.xIntervals_;
437 xIntervals_.makeImmutable();
438 bitField0_ |= 0x00000001;
440 ensureXIntervalsIsMutable();
441 xIntervals_.addAll(other.xIntervals_);
445 if (!other.yIntervals_.isEmpty()) {
446 if (yIntervals_.isEmpty()) {
447 yIntervals_ = other.yIntervals_;
448 yIntervals_.makeImmutable();
449 bitField0_ |= 0x00000002;
451 ensureYIntervalsIsMutable();
452 yIntervals_.addAll(other.yIntervals_);
456 this.mergeUnknownFields(other.getUnknownFields());
468 com.google.protobuf.CodedInputStream input,
469 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
470 throws java.io.IOException {
471 if (extensionRegistry ==
null) {
472 throw new java.lang.NullPointerException();
475 boolean done =
false;
477 int tag = input.readTag();
483 int v = input.readInt32();
484 ensureXIntervalsIsMutable();
485 xIntervals_.addInt(v);
489 int length = input.readRawVarint32();
490 int limit = input.pushLimit(length);
491 ensureXIntervalsIsMutable();
492 while (input.getBytesUntilLimit() > 0) {
493 xIntervals_.addInt(input.readInt32());
495 input.popLimit(limit);
499 int v = input.readInt32();
500 ensureYIntervalsIsMutable();
501 yIntervals_.addInt(v);
505 int length = input.readRawVarint32();
506 int limit = input.pushLimit(length);
507 ensureYIntervalsIsMutable();
508 while (input.getBytesUntilLimit() > 0) {
509 yIntervals_.addInt(input.readInt32());
511 input.popLimit(limit);
515 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
522 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
523 throw e.unwrapIOException();
529 private int bitField0_;
531 private com.google.protobuf.Internal.IntList xIntervals_ = emptyIntList();
532 private void ensureXIntervalsIsMutable() {
533 if (!xIntervals_.isModifiable()) {
534 xIntervals_ = makeMutableCopy(xIntervals_);
536 bitField0_ |= 0x00000001;
542 public java.util.List<java.lang.Integer>
544 xIntervals_.makeImmutable();
552 return xIntervals_.size();
560 return xIntervals_.getInt(index);
569 int index,
int value) {
571 ensureXIntervalsIsMutable();
572 xIntervals_.setInt(index, value);
573 bitField0_ |= 0x00000001;
584 ensureXIntervalsIsMutable();
585 xIntervals_.addInt(value);
586 bitField0_ |= 0x00000001;
596 java.lang.Iterable<? extends java.lang.Integer> values) {
597 ensureXIntervalsIsMutable();
598 com.google.protobuf.AbstractMessageLite.Builder.addAll(
599 values, xIntervals_);
600 bitField0_ |= 0x00000001;
609 xIntervals_ = emptyIntList();
610 bitField0_ = (bitField0_ & ~0x00000001);
615 private com.google.protobuf.Internal.IntList yIntervals_ = emptyIntList();
616 private void ensureYIntervalsIsMutable() {
617 if (!yIntervals_.isModifiable()) {
618 yIntervals_ = makeMutableCopy(yIntervals_);
620 bitField0_ |= 0x00000002;
630 public java.util.List<java.lang.Integer>
632 yIntervals_.makeImmutable();
644 return yIntervals_.size();
656 return yIntervals_.getInt(index);
669 int index,
int value) {
671 ensureYIntervalsIsMutable();
672 yIntervals_.setInt(index, value);
673 bitField0_ |= 0x00000002;
688 ensureYIntervalsIsMutable();
689 yIntervals_.addInt(value);
690 bitField0_ |= 0x00000002;
704 java.lang.Iterable<? extends java.lang.Integer> values) {
705 ensureYIntervalsIsMutable();
706 com.google.protobuf.AbstractMessageLite.Builder.addAll(
707 values, yIntervals_);
708 bitField0_ |= 0x00000002;
721 yIntervals_ = emptyIntList();
722 bitField0_ = (bitField0_ & ~0x00000002);
733 DEFAULT_INSTANCE =
new com.google.ortools.sat.NoOverlap2DConstraintProto();
737 return DEFAULT_INSTANCE;
744 com.google.protobuf.CodedInputStream input,
745 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
746 throws com.google.protobuf.InvalidProtocolBufferException {
749 builder.mergeFrom(input, extensionRegistry);
750 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
751 throw e.setUnfinishedMessage(builder.buildPartial());
752 }
catch (com.google.protobuf.UninitializedMessageException e) {
753 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
754 }
catch (java.io.IOException e) {
755 throw new com.google.protobuf.InvalidProtocolBufferException(e)
756 .setUnfinishedMessage(builder.buildPartial());
758 return builder.buildPartial();
773 return DEFAULT_INSTANCE;