6package com.google.ortools.sat;
23@com.google.protobuf.Generated
24public final class NoOverlap2DConstraintProto
extends
25 com.google.protobuf.GeneratedMessage implements
28private static final long serialVersionUID = 0L;
30 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
31 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
36 NoOverlap2DConstraintProto.class.getName());
39 private NoOverlap2DConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
42 private NoOverlap2DConstraintProto() {
43 xIntervals_ = emptyIntList();
44 yIntervals_ = emptyIntList();
47 public static final com.google.protobuf.Descriptors.Descriptor
49 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
53 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
55 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
56 .ensureFieldAccessorsInitialized(
57 com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
61 @SuppressWarnings(
"serial")
62 private com.google.protobuf.Internal.IntList xIntervals_ =
69 public java.
util.List<java.lang.Integer>
78 return xIntervals_.size();
86 return xIntervals_.getInt(index);
88 private int xIntervalsMemoizedSerializedSize = -1;
91 @SuppressWarnings(
"serial")
92 private com.google.protobuf.Internal.IntList yIntervals_ =
103 public java.
util.List<java.lang.Integer>
116 return yIntervals_.size();
128 return yIntervals_.getInt(index);
130 private int yIntervalsMemoizedSerializedSize = -1;
132 private byte memoizedIsInitialized = -1;
139 memoizedIsInitialized = 1;
144 public void writeTo(com.google.protobuf.CodedOutputStream output)
145 throws java.io.IOException {
148 output.writeUInt32NoTag(10);
149 output.writeUInt32NoTag(xIntervalsMemoizedSerializedSize);
151 for (
int i = 0; i < xIntervals_.size(); i++) {
152 output.writeInt32NoTag(xIntervals_.getInt(i));
155 output.writeUInt32NoTag(18);
156 output.writeUInt32NoTag(yIntervalsMemoizedSerializedSize);
158 for (
int i = 0; i < yIntervals_.size(); i++) {
159 output.writeInt32NoTag(yIntervals_.getInt(i));
161 getUnknownFields().writeTo(output);
166 int size = memoizedSize;
167 if (size != -1)
return size;
172 for (
int i = 0; i < xIntervals_.size(); i++) {
173 dataSize += com.google.protobuf.CodedOutputStream
174 .computeInt32SizeNoTag(xIntervals_.getInt(i));
179 size += com.google.protobuf.CodedOutputStream
180 .computeInt32SizeNoTag(dataSize);
182 xIntervalsMemoizedSerializedSize = dataSize;
186 for (
int i = 0; i < yIntervals_.size(); i++) {
187 dataSize += com.google.protobuf.CodedOutputStream
188 .computeInt32SizeNoTag(yIntervals_.getInt(i));
193 size += com.google.protobuf.CodedOutputStream
194 .computeInt32SizeNoTag(dataSize);
196 yIntervalsMemoizedSerializedSize = dataSize;
198 size += getUnknownFields().getSerializedSize();
204 public boolean equals(
final java.lang.Object obj) {
208 if (!(obj instanceof com.google.ortools.sat.NoOverlap2DConstraintProto)) {
209 return super.equals(obj);
217 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
223 if (memoizedHashCode != 0) {
224 return memoizedHashCode;
236 hash = (29 * hash) + getUnknownFields().hashCode();
237 memoizedHashCode = hash;
242 java.nio.ByteBuffer data)
243 throws com.google.protobuf.InvalidProtocolBufferException {
244 return PARSER.parseFrom(data);
247 java.nio.ByteBuffer data,
248 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
249 throws com.google.protobuf.InvalidProtocolBufferException {
250 return PARSER.parseFrom(data, extensionRegistry);
253 com.google.protobuf.ByteString data)
254 throws com.google.protobuf.InvalidProtocolBufferException {
255 return PARSER.parseFrom(data);
258 com.google.protobuf.ByteString data,
259 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
260 throws com.google.protobuf.InvalidProtocolBufferException {
261 return PARSER.parseFrom(data, extensionRegistry);
264 throws com.google.protobuf.InvalidProtocolBufferException {
265 return PARSER.parseFrom(data);
269 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
270 throws com.google.protobuf.InvalidProtocolBufferException {
271 return PARSER.parseFrom(data, extensionRegistry);
274 throws java.io.IOException {
275 return com.google.protobuf.GeneratedMessage
276 .parseWithIOException(PARSER, input);
279 java.io.InputStream input,
280 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281 throws java.io.IOException {
282 return com.google.protobuf.GeneratedMessage
283 .parseWithIOException(PARSER, input, extensionRegistry);
287 throws java.io.IOException {
288 return com.google.protobuf.GeneratedMessage
289 .parseDelimitedWithIOException(PARSER, input);
293 java.io.InputStream input,
294 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
295 throws java.io.IOException {
296 return com.google.protobuf.GeneratedMessage
297 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
300 com.google.protobuf.CodedInputStream input)
301 throws java.io.IOException {
302 return com.google.protobuf.GeneratedMessage
303 .parseWithIOException(PARSER, input);
306 com.google.protobuf.CodedInputStream input,
307 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
308 throws java.io.IOException {
309 return com.google.protobuf.GeneratedMessage
310 .parseWithIOException(PARSER, input, extensionRegistry);
316 return DEFAULT_INSTANCE.toBuilder();
319 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
323 return this == DEFAULT_INSTANCE
329 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
348 public static final class Builder
extends
349 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
352 public static final com.google.protobuf.Descriptors.Descriptor
354 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
358 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
360 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_fieldAccessorTable
361 .ensureFieldAccessorsInitialized(
362 com.google.ortools.sat.NoOverlap2DConstraintProto.class, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder.class);
371 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
379 xIntervals_ = emptyIntList();
380 yIntervals_ = emptyIntList();
385 public com.google.protobuf.Descriptors.Descriptor
387 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlap2DConstraintProto_descriptor;
392 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
399 throw newUninitializedMessageException(result);
407 if (bitField0_ != 0) { buildPartial0(result); }
412 private void buildPartial0(com.google.ortools.sat.NoOverlap2DConstraintProto result) {
413 int from_bitField0_ = bitField0_;
414 if (((from_bitField0_ & 0x00000001) != 0)) {
415 xIntervals_.makeImmutable();
416 result.xIntervals_ = xIntervals_;
418 if (((from_bitField0_ & 0x00000002) != 0)) {
419 yIntervals_.makeImmutable();
420 result.yIntervals_ = yIntervals_;
425 public Builder
mergeFrom(com.google.protobuf.Message other) {
426 if (other instanceof com.google.ortools.sat.NoOverlap2DConstraintProto) {
427 return mergeFrom((com.google.ortools.sat.NoOverlap2DConstraintProto)other);
429 super.mergeFrom(other);
434 public Builder
mergeFrom(com.google.ortools.sat.NoOverlap2DConstraintProto other) {
435 if (other == com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance())
return this;
436 if (!other.xIntervals_.isEmpty()) {
437 if (xIntervals_.isEmpty()) {
438 xIntervals_ = other.xIntervals_;
439 xIntervals_.makeImmutable();
440 bitField0_ |= 0x00000001;
442 ensureXIntervalsIsMutable();
443 xIntervals_.addAll(other.xIntervals_);
447 if (!other.yIntervals_.isEmpty()) {
448 if (yIntervals_.isEmpty()) {
449 yIntervals_ = other.yIntervals_;
450 yIntervals_.makeImmutable();
451 bitField0_ |= 0x00000002;
453 ensureYIntervalsIsMutable();
454 yIntervals_.addAll(other.yIntervals_);
458 this.mergeUnknownFields(other.getUnknownFields());
470 com.google.protobuf.CodedInputStream input,
471 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
472 throws java.io.IOException {
473 if (extensionRegistry ==
null) {
474 throw new java.lang.NullPointerException();
477 boolean done =
false;
479 int tag = input.readTag();
485 int v = input.readInt32();
486 ensureXIntervalsIsMutable();
487 xIntervals_.addInt(v);
491 int length = input.readRawVarint32();
492 int limit = input.pushLimit(length);
493 ensureXIntervalsIsMutable();
494 while (input.getBytesUntilLimit() > 0) {
495 xIntervals_.addInt(input.readInt32());
497 input.popLimit(limit);
501 int v = input.readInt32();
502 ensureYIntervalsIsMutable();
503 yIntervals_.addInt(v);
507 int length = input.readRawVarint32();
508 int limit = input.pushLimit(length);
509 ensureYIntervalsIsMutable();
510 while (input.getBytesUntilLimit() > 0) {
511 yIntervals_.addInt(input.readInt32());
513 input.popLimit(limit);
517 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
524 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
525 throw e.unwrapIOException();
531 private int bitField0_;
533 private com.google.protobuf.Internal.IntList xIntervals_ = emptyIntList();
534 private void ensureXIntervalsIsMutable() {
535 if (!xIntervals_.isModifiable()) {
536 xIntervals_ = makeMutableCopy(xIntervals_);
538 bitField0_ |= 0x00000001;
544 public java.util.List<java.lang.Integer>
546 xIntervals_.makeImmutable();
554 return xIntervals_.size();
562 return xIntervals_.getInt(index);
571 int index,
int value) {
573 ensureXIntervalsIsMutable();
574 xIntervals_.setInt(index, value);
575 bitField0_ |= 0x00000001;
586 ensureXIntervalsIsMutable();
587 xIntervals_.addInt(value);
588 bitField0_ |= 0x00000001;
598 java.lang.Iterable<? extends java.lang.Integer> values) {
599 ensureXIntervalsIsMutable();
600 com.google.protobuf.AbstractMessageLite.Builder.addAll(
601 values, xIntervals_);
602 bitField0_ |= 0x00000001;
611 xIntervals_ = emptyIntList();
612 bitField0_ = (bitField0_ & ~0x00000001);
617 private com.google.protobuf.Internal.IntList yIntervals_ = emptyIntList();
618 private void ensureYIntervalsIsMutable() {
619 if (!yIntervals_.isModifiable()) {
620 yIntervals_ = makeMutableCopy(yIntervals_);
622 bitField0_ |= 0x00000002;
632 public java.util.List<java.lang.Integer>
634 yIntervals_.makeImmutable();
646 return yIntervals_.size();
658 return yIntervals_.getInt(index);
671 int index,
int value) {
673 ensureYIntervalsIsMutable();
674 yIntervals_.setInt(index, value);
675 bitField0_ |= 0x00000002;
690 ensureYIntervalsIsMutable();
691 yIntervals_.addInt(value);
692 bitField0_ |= 0x00000002;
706 java.lang.Iterable<? extends java.lang.Integer> values) {
707 ensureYIntervalsIsMutable();
708 com.google.protobuf.AbstractMessageLite.Builder.addAll(
709 values, yIntervals_);
710 bitField0_ |= 0x00000002;
723 yIntervals_ = emptyIntList();
724 bitField0_ = (bitField0_ & ~0x00000002);
735 DEFAULT_INSTANCE =
new com.google.ortools.sat.NoOverlap2DConstraintProto();
739 return DEFAULT_INSTANCE;
746 com.google.protobuf.CodedInputStream input,
747 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
748 throws com.google.protobuf.InvalidProtocolBufferException {
751 builder.mergeFrom(input, extensionRegistry);
752 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
753 throw e.setUnfinishedMessage(builder.buildPartial());
754 }
catch (com.google.protobuf.UninitializedMessageException e) {
755 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
756 }
catch (java.io.IOException e) {
757 throw new com.google.protobuf.InvalidProtocolBufferException(e)
758 .setUnfinishedMessage(builder.buildPartial());
760 return builder.buildPartial();
764 public static com.google.protobuf.Parser<NoOverlap2DConstraintProto>
parser() {
775 return DEFAULT_INSTANCE;