6package com.google.ortools.sat;
19public final class NoOverlapConstraintProto
extends
20 com.google.protobuf.GeneratedMessage implements
23private static final long serialVersionUID = 0L;
25 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
26 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
31 NoOverlapConstraintProto.class.getName());
34 private NoOverlapConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
37 private NoOverlapConstraintProto() {
38 intervals_ = emptyIntList();
41 public static final com.google.protobuf.Descriptors.Descriptor
43 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
47 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
49 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_fieldAccessorTable
50 .ensureFieldAccessorsInitialized(
51 com.google.ortools.sat.NoOverlapConstraintProto.class, com.google.ortools.sat.NoOverlapConstraintProto.Builder.class);
55 @SuppressWarnings(
"serial")
56 private com.google.protobuf.Internal.IntList intervals_ =
63 public java.
util.List<java.lang.Integer>
72 return intervals_.size();
80 return intervals_.getInt(index);
82 private int intervalsMemoizedSerializedSize = -1;
84 private byte memoizedIsInitialized = -1;
91 memoizedIsInitialized = 1;
96 public void writeTo(com.google.protobuf.CodedOutputStream output)
97 throws java.io.IOException {
100 output.writeUInt32NoTag(10);
101 output.writeUInt32NoTag(intervalsMemoizedSerializedSize);
103 for (
int i = 0; i < intervals_.size(); i++) {
104 output.writeInt32NoTag(intervals_.getInt(i));
106 getUnknownFields().writeTo(output);
111 int size = memoizedSize;
112 if (size != -1)
return size;
117 for (
int i = 0; i < intervals_.size(); i++) {
118 dataSize += com.google.protobuf.CodedOutputStream
119 .computeInt32SizeNoTag(intervals_.getInt(i));
124 size += com.google.protobuf.CodedOutputStream
125 .computeInt32SizeNoTag(dataSize);
127 intervalsMemoizedSerializedSize = dataSize;
129 size += getUnknownFields().getSerializedSize();
135 public boolean equals(
final java.lang.Object obj) {
139 if (!(obj instanceof com.google.ortools.sat.NoOverlapConstraintProto)) {
140 return super.equals(obj);
146 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
152 if (memoizedHashCode != 0) {
153 return memoizedHashCode;
161 hash = (29 * hash) + getUnknownFields().hashCode();
162 memoizedHashCode = hash;
167 java.nio.ByteBuffer data)
168 throws com.google.protobuf.InvalidProtocolBufferException {
169 return PARSER.parseFrom(data);
172 java.nio.ByteBuffer data,
173 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
174 throws com.google.protobuf.InvalidProtocolBufferException {
175 return PARSER.parseFrom(data, extensionRegistry);
178 com.google.protobuf.ByteString data)
179 throws com.google.protobuf.InvalidProtocolBufferException {
180 return PARSER.parseFrom(data);
183 com.google.protobuf.ByteString data,
184 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
185 throws com.google.protobuf.InvalidProtocolBufferException {
186 return PARSER.parseFrom(data, extensionRegistry);
189 throws com.google.protobuf.InvalidProtocolBufferException {
190 return PARSER.parseFrom(data);
194 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
195 throws com.google.protobuf.InvalidProtocolBufferException {
196 return PARSER.parseFrom(data, extensionRegistry);
199 throws java.io.IOException {
200 return com.google.protobuf.GeneratedMessage
201 .parseWithIOException(PARSER, input);
204 java.io.InputStream input,
205 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
206 throws java.io.IOException {
207 return com.google.protobuf.GeneratedMessage
208 .parseWithIOException(PARSER, input, extensionRegistry);
212 throws java.io.IOException {
213 return com.google.protobuf.GeneratedMessage
214 .parseDelimitedWithIOException(PARSER, input);
218 java.io.InputStream input,
219 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
220 throws java.io.IOException {
221 return com.google.protobuf.GeneratedMessage
222 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
225 com.google.protobuf.CodedInputStream input)
226 throws java.io.IOException {
227 return com.google.protobuf.GeneratedMessage
228 .parseWithIOException(PARSER, input);
231 com.google.protobuf.CodedInputStream input,
232 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
233 throws java.io.IOException {
234 return com.google.protobuf.GeneratedMessage
235 .parseWithIOException(PARSER, input, extensionRegistry);
241 return DEFAULT_INSTANCE.toBuilder();
244 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
248 return this == DEFAULT_INSTANCE
254 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
269 public static final class Builder
extends
270 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
273 public static final com.google.protobuf.Descriptors.Descriptor
275 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
279 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
281 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_fieldAccessorTable
282 .ensureFieldAccessorsInitialized(
283 com.google.ortools.sat.NoOverlapConstraintProto.class, com.google.ortools.sat.NoOverlapConstraintProto.Builder.class);
292 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
300 intervals_ = emptyIntList();
305 public com.google.protobuf.Descriptors.Descriptor
307 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
312 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
319 throw newUninitializedMessageException(result);
327 if (bitField0_ != 0) { buildPartial0(result); }
332 private void buildPartial0(com.google.ortools.sat.NoOverlapConstraintProto result) {
333 int from_bitField0_ = bitField0_;
334 if (((from_bitField0_ & 0x00000001) != 0)) {
335 intervals_.makeImmutable();
336 result.intervals_ = intervals_;
341 public Builder
mergeFrom(com.google.protobuf.Message other) {
342 if (other instanceof com.google.ortools.sat.NoOverlapConstraintProto) {
343 return mergeFrom((com.google.ortools.sat.NoOverlapConstraintProto)other);
345 super.mergeFrom(other);
350 public Builder
mergeFrom(com.google.ortools.sat.NoOverlapConstraintProto other) {
351 if (other == com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance())
return this;
352 if (!other.intervals_.isEmpty()) {
353 if (intervals_.isEmpty()) {
354 intervals_ = other.intervals_;
355 intervals_.makeImmutable();
356 bitField0_ |= 0x00000001;
358 ensureIntervalsIsMutable();
359 intervals_.addAll(other.intervals_);
363 this.mergeUnknownFields(other.getUnknownFields());
375 com.google.protobuf.CodedInputStream input,
376 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
377 throws java.io.IOException {
378 if (extensionRegistry ==
null) {
379 throw new java.lang.NullPointerException();
382 boolean done =
false;
384 int tag = input.readTag();
390 int v = input.readInt32();
391 ensureIntervalsIsMutable();
392 intervals_.addInt(v);
396 int length = input.readRawVarint32();
397 int limit = input.pushLimit(length);
398 ensureIntervalsIsMutable();
399 while (input.getBytesUntilLimit() > 0) {
400 intervals_.addInt(input.readInt32());
402 input.popLimit(limit);
406 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
413 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
414 throw e.unwrapIOException();
420 private int bitField0_;
422 private com.google.protobuf.Internal.IntList intervals_ = emptyIntList();
423 private void ensureIntervalsIsMutable() {
424 if (!intervals_.isModifiable()) {
425 intervals_ = makeMutableCopy(intervals_);
427 bitField0_ |= 0x00000001;
433 public java.util.List<java.lang.Integer>
435 intervals_.makeImmutable();
443 return intervals_.size();
451 return intervals_.getInt(index);
460 int index,
int value) {
462 ensureIntervalsIsMutable();
463 intervals_.setInt(index, value);
464 bitField0_ |= 0x00000001;
475 ensureIntervalsIsMutable();
476 intervals_.addInt(value);
477 bitField0_ |= 0x00000001;
487 java.lang.Iterable<? extends java.lang.Integer> values) {
488 ensureIntervalsIsMutable();
489 com.google.protobuf.AbstractMessageLite.Builder.addAll(
491 bitField0_ |= 0x00000001;
500 intervals_ = emptyIntList();
501 bitField0_ = (bitField0_ & ~0x00000001);
512 DEFAULT_INSTANCE =
new com.google.ortools.sat.NoOverlapConstraintProto();
516 return DEFAULT_INSTANCE;
523 com.google.protobuf.CodedInputStream input,
524 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
525 throws com.google.protobuf.InvalidProtocolBufferException {
528 builder.mergeFrom(input, extensionRegistry);
529 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
530 throw e.setUnfinishedMessage(builder.buildPartial());
531 }
catch (com.google.protobuf.UninitializedMessageException e) {
532 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
533 }
catch (java.io.IOException e) {
534 throw new com.google.protobuf.InvalidProtocolBufferException(e)
535 .setUnfinishedMessage(builder.buildPartial());
537 return builder.buildPartial();
541 public static com.google.protobuf.Parser<NoOverlapConstraintProto>
parser() {
552 return DEFAULT_INSTANCE;