5package com.google.ortools.sat;
19 com.google.protobuf.GeneratedMessage implements
22private static final long serialVersionUID = 0L;
24 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
25 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
37 intervals_ = emptyIntList();
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.sat.NoOverlapConstraintProto.class, com.google.ortools.sat.NoOverlapConstraintProto.Builder.class);
54 @SuppressWarnings(
"serial")
55 private com.google.protobuf.Internal.IntList intervals_ =
62 public java.util.List<java.lang.Integer>
71 return intervals_.size();
79 return intervals_.getInt(index);
81 private int intervalsMemoizedSerializedSize = -1;
83 private byte memoizedIsInitialized = -1;
90 memoizedIsInitialized = 1;
95 public void writeTo(com.google.protobuf.CodedOutputStream output)
96 throws java.io.IOException {
99 output.writeUInt32NoTag(10);
100 output.writeUInt32NoTag(intervalsMemoizedSerializedSize);
102 for (
int i = 0; i < intervals_.size(); i++) {
103 output.writeInt32NoTag(intervals_.getInt(i));
105 getUnknownFields().writeTo(output);
110 int size = memoizedSize;
111 if (size != -1)
return size;
116 for (
int i = 0; i < intervals_.size(); i++) {
117 dataSize += com.google.protobuf.CodedOutputStream
118 .computeInt32SizeNoTag(intervals_.getInt(i));
123 size += com.google.protobuf.CodedOutputStream
124 .computeInt32SizeNoTag(dataSize);
126 intervalsMemoizedSerializedSize = dataSize;
128 size += getUnknownFields().getSerializedSize();
134 public boolean equals(
final java.lang.Object obj) {
138 if (!(obj instanceof com.google.ortools.sat.NoOverlapConstraintProto)) {
139 return super.equals(obj);
145 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
151 if (memoizedHashCode != 0) {
152 return memoizedHashCode;
160 hash = (29 * hash) + getUnknownFields().hashCode();
161 memoizedHashCode = hash;
166 java.nio.ByteBuffer data)
167 throws com.google.protobuf.InvalidProtocolBufferException {
168 return PARSER.parseFrom(data);
171 java.nio.ByteBuffer data,
172 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
173 throws com.google.protobuf.InvalidProtocolBufferException {
174 return PARSER.parseFrom(data, extensionRegistry);
177 com.google.protobuf.ByteString data)
178 throws com.google.protobuf.InvalidProtocolBufferException {
179 return PARSER.parseFrom(data);
182 com.google.protobuf.ByteString data,
183 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
184 throws com.google.protobuf.InvalidProtocolBufferException {
185 return PARSER.parseFrom(data, extensionRegistry);
188 throws com.google.protobuf.InvalidProtocolBufferException {
189 return PARSER.parseFrom(data);
193 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
194 throws com.google.protobuf.InvalidProtocolBufferException {
195 return PARSER.parseFrom(data, extensionRegistry);
198 throws java.io.IOException {
199 return com.google.protobuf.GeneratedMessage
200 .parseWithIOException(PARSER, input);
203 java.io.InputStream input,
204 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
205 throws java.io.IOException {
206 return com.google.protobuf.GeneratedMessage
207 .parseWithIOException(PARSER, input, extensionRegistry);
211 throws java.io.IOException {
212 return com.google.protobuf.GeneratedMessage
213 .parseDelimitedWithIOException(PARSER, input);
217 java.io.InputStream input,
218 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
219 throws java.io.IOException {
220 return com.google.protobuf.GeneratedMessage
221 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
224 com.google.protobuf.CodedInputStream input)
225 throws java.io.IOException {
226 return com.google.protobuf.GeneratedMessage
227 .parseWithIOException(PARSER, input);
230 com.google.protobuf.CodedInputStream input,
231 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
232 throws java.io.IOException {
233 return com.google.protobuf.GeneratedMessage
234 .parseWithIOException(PARSER, input, extensionRegistry);
247 return this == DEFAULT_INSTANCE
253 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
269 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
272 public static final com.google.protobuf.Descriptors.Descriptor
274 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
278 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
280 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_fieldAccessorTable
281 .ensureFieldAccessorsInitialized(
282 com.google.ortools.sat.NoOverlapConstraintProto.class, com.google.ortools.sat.NoOverlapConstraintProto.Builder.class);
291 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
299 intervals_ = emptyIntList();
304 public com.google.protobuf.Descriptors.Descriptor
306 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
311 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
318 throw newUninitializedMessageException(result);
326 if (bitField0_ != 0) { buildPartial0(result); }
331 private void buildPartial0(com.google.ortools.sat.NoOverlapConstraintProto result) {
332 int from_bitField0_ = bitField0_;
333 if (((from_bitField0_ & 0x00000001) != 0)) {
334 intervals_.makeImmutable();
335 result.intervals_ = intervals_;
341 if (other instanceof com.google.ortools.sat.NoOverlapConstraintProto) {
342 return mergeFrom((com.google.ortools.sat.NoOverlapConstraintProto)other);
344 super.mergeFrom(other);
350 if (other == com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance())
return this;
351 if (!other.intervals_.isEmpty()) {
352 if (intervals_.isEmpty()) {
353 intervals_ = other.intervals_;
354 intervals_.makeImmutable();
355 bitField0_ |= 0x00000001;
357 ensureIntervalsIsMutable();
358 intervals_.addAll(other.intervals_);
362 this.mergeUnknownFields(other.getUnknownFields());
374 com.google.protobuf.CodedInputStream input,
375 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
376 throws java.io.IOException {
377 if (extensionRegistry ==
null) {
378 throw new java.lang.NullPointerException();
381 boolean done =
false;
383 int tag = input.readTag();
389 int v = input.readInt32();
390 ensureIntervalsIsMutable();
391 intervals_.addInt(v);
395 int length = input.readRawVarint32();
396 int limit = input.pushLimit(length);
397 ensureIntervalsIsMutable();
398 while (input.getBytesUntilLimit() > 0) {
399 intervals_.addInt(input.readInt32());
401 input.popLimit(limit);
405 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
412 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
413 throw e.unwrapIOException();
419 private int bitField0_;
421 private com.google.protobuf.Internal.IntList intervals_ = emptyIntList();
422 private void ensureIntervalsIsMutable() {
423 if (!intervals_.isModifiable()) {
424 intervals_ = makeMutableCopy(intervals_);
426 bitField0_ |= 0x00000001;
432 public java.util.List<java.lang.Integer>
434 intervals_.makeImmutable();
442 return intervals_.size();
450 return intervals_.getInt(index);
459 int index,
int value) {
461 ensureIntervalsIsMutable();
462 intervals_.setInt(index, value);
463 bitField0_ |= 0x00000001;
474 ensureIntervalsIsMutable();
475 intervals_.addInt(value);
476 bitField0_ |= 0x00000001;
486 java.lang.Iterable<? extends java.lang.Integer> values) {
487 ensureIntervalsIsMutable();
488 com.google.protobuf.AbstractMessageLite.Builder.addAll(
490 bitField0_ |= 0x00000001;
499 intervals_ = emptyIntList();
500 bitField0_ = (bitField0_ & ~0x00000001);
511 DEFAULT_INSTANCE =
new com.google.ortools.sat.NoOverlapConstraintProto();
515 return DEFAULT_INSTANCE;
522 com.google.protobuf.CodedInputStream input,
523 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
524 throws com.google.protobuf.InvalidProtocolBufferException {
527 builder.mergeFrom(input, extensionRegistry);
528 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
529 throw e.setUnfinishedMessage(builder.buildPartial());
530 }
catch (com.google.protobuf.UninitializedMessageException e) {
531 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
532 }
catch (java.io.IOException e) {
533 throw new com.google.protobuf.InvalidProtocolBufferException(e)
534 .setUnfinishedMessage(builder.buildPartial());
536 return builder.buildPartial();
551 return DEFAULT_INSTANCE;