6package com.google.ortools.sat;
19@com.google.protobuf.Generated
20public final class NoOverlapConstraintProto
extends
21 com.google.protobuf.GeneratedMessage implements
24private static final long serialVersionUID = 0L;
26 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
27 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
32 NoOverlapConstraintProto.class.getName());
35 private NoOverlapConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
38 private NoOverlapConstraintProto() {
39 intervals_ = emptyIntList();
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.sat.NoOverlapConstraintProto.class, com.google.ortools.sat.NoOverlapConstraintProto.Builder.class);
56 @SuppressWarnings(
"serial")
57 private com.google.protobuf.Internal.IntList intervals_ =
64 public java.
util.List<java.lang.Integer>
73 return intervals_.size();
81 return intervals_.getInt(index);
83 private int intervalsMemoizedSerializedSize = -1;
85 private byte memoizedIsInitialized = -1;
92 memoizedIsInitialized = 1;
97 public void writeTo(com.google.protobuf.CodedOutputStream output)
98 throws java.io.IOException {
101 output.writeUInt32NoTag(10);
102 output.writeUInt32NoTag(intervalsMemoizedSerializedSize);
104 for (
int i = 0; i < intervals_.size(); i++) {
105 output.writeInt32NoTag(intervals_.getInt(i));
107 getUnknownFields().writeTo(output);
112 int size = memoizedSize;
113 if (size != -1)
return size;
118 for (
int i = 0; i < intervals_.size(); i++) {
119 dataSize += com.google.protobuf.CodedOutputStream
120 .computeInt32SizeNoTag(intervals_.getInt(i));
125 size += com.google.protobuf.CodedOutputStream
126 .computeInt32SizeNoTag(dataSize);
128 intervalsMemoizedSerializedSize = dataSize;
130 size += getUnknownFields().getSerializedSize();
136 public boolean equals(
final java.lang.Object obj) {
140 if (!(obj instanceof com.google.ortools.sat.NoOverlapConstraintProto)) {
141 return super.equals(obj);
147 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
153 if (memoizedHashCode != 0) {
154 return memoizedHashCode;
162 hash = (29 * hash) + getUnknownFields().hashCode();
163 memoizedHashCode = hash;
168 java.nio.ByteBuffer data)
169 throws com.google.protobuf.InvalidProtocolBufferException {
170 return PARSER.parseFrom(data);
173 java.nio.ByteBuffer data,
174 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
175 throws com.google.protobuf.InvalidProtocolBufferException {
176 return PARSER.parseFrom(data, extensionRegistry);
179 com.google.protobuf.ByteString data)
180 throws com.google.protobuf.InvalidProtocolBufferException {
181 return PARSER.parseFrom(data);
184 com.google.protobuf.ByteString data,
185 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
186 throws com.google.protobuf.InvalidProtocolBufferException {
187 return PARSER.parseFrom(data, extensionRegistry);
190 throws com.google.protobuf.InvalidProtocolBufferException {
191 return PARSER.parseFrom(data);
195 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
196 throws com.google.protobuf.InvalidProtocolBufferException {
197 return PARSER.parseFrom(data, extensionRegistry);
200 throws java.io.IOException {
201 return com.google.protobuf.GeneratedMessage
202 .parseWithIOException(PARSER, input);
205 java.io.InputStream input,
206 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
207 throws java.io.IOException {
208 return com.google.protobuf.GeneratedMessage
209 .parseWithIOException(PARSER, input, extensionRegistry);
213 throws java.io.IOException {
214 return com.google.protobuf.GeneratedMessage
215 .parseDelimitedWithIOException(PARSER, input);
219 java.io.InputStream input,
220 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
221 throws java.io.IOException {
222 return com.google.protobuf.GeneratedMessage
223 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
226 com.google.protobuf.CodedInputStream input)
227 throws java.io.IOException {
228 return com.google.protobuf.GeneratedMessage
229 .parseWithIOException(PARSER, input);
232 com.google.protobuf.CodedInputStream input,
233 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
234 throws java.io.IOException {
235 return com.google.protobuf.GeneratedMessage
236 .parseWithIOException(PARSER, input, extensionRegistry);
242 return DEFAULT_INSTANCE.toBuilder();
245 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
249 return this == DEFAULT_INSTANCE
255 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
270 public static final class Builder
extends
271 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
274 public static final com.google.protobuf.Descriptors.Descriptor
276 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
280 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
282 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_fieldAccessorTable
283 .ensureFieldAccessorsInitialized(
284 com.google.ortools.sat.NoOverlapConstraintProto.class, com.google.ortools.sat.NoOverlapConstraintProto.Builder.class);
293 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
301 intervals_ = emptyIntList();
306 public com.google.protobuf.Descriptors.Descriptor
308 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_NoOverlapConstraintProto_descriptor;
313 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
320 throw newUninitializedMessageException(result);
328 if (bitField0_ != 0) { buildPartial0(result); }
333 private void buildPartial0(com.google.ortools.sat.NoOverlapConstraintProto result) {
334 int from_bitField0_ = bitField0_;
335 if (((from_bitField0_ & 0x00000001) != 0)) {
336 intervals_.makeImmutable();
337 result.intervals_ = intervals_;
342 public Builder
mergeFrom(com.google.protobuf.Message other) {
343 if (other instanceof com.google.ortools.sat.NoOverlapConstraintProto) {
344 return mergeFrom((com.google.ortools.sat.NoOverlapConstraintProto)other);
346 super.mergeFrom(other);
351 public Builder
mergeFrom(com.google.ortools.sat.NoOverlapConstraintProto other) {
352 if (other == com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance())
return this;
353 if (!other.intervals_.isEmpty()) {
354 if (intervals_.isEmpty()) {
355 intervals_ = other.intervals_;
356 intervals_.makeImmutable();
357 bitField0_ |= 0x00000001;
359 ensureIntervalsIsMutable();
360 intervals_.addAll(other.intervals_);
364 this.mergeUnknownFields(other.getUnknownFields());
376 com.google.protobuf.CodedInputStream input,
377 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
378 throws java.io.IOException {
379 if (extensionRegistry ==
null) {
380 throw new java.lang.NullPointerException();
383 boolean done =
false;
385 int tag = input.readTag();
391 int v = input.readInt32();
392 ensureIntervalsIsMutable();
393 intervals_.addInt(v);
397 int length = input.readRawVarint32();
398 int limit = input.pushLimit(length);
399 ensureIntervalsIsMutable();
400 while (input.getBytesUntilLimit() > 0) {
401 intervals_.addInt(input.readInt32());
403 input.popLimit(limit);
407 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
414 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
415 throw e.unwrapIOException();
421 private int bitField0_;
423 private com.google.protobuf.Internal.IntList intervals_ = emptyIntList();
424 private void ensureIntervalsIsMutable() {
425 if (!intervals_.isModifiable()) {
426 intervals_ = makeMutableCopy(intervals_);
428 bitField0_ |= 0x00000001;
434 public java.util.List<java.lang.Integer>
436 intervals_.makeImmutable();
444 return intervals_.size();
452 return intervals_.getInt(index);
461 int index,
int value) {
463 ensureIntervalsIsMutable();
464 intervals_.setInt(index, value);
465 bitField0_ |= 0x00000001;
476 ensureIntervalsIsMutable();
477 intervals_.addInt(value);
478 bitField0_ |= 0x00000001;
488 java.lang.Iterable<? extends java.lang.Integer> values) {
489 ensureIntervalsIsMutable();
490 com.google.protobuf.AbstractMessageLite.Builder.addAll(
492 bitField0_ |= 0x00000001;
501 intervals_ = emptyIntList();
502 bitField0_ = (bitField0_ & ~0x00000001);
513 DEFAULT_INSTANCE =
new com.google.ortools.sat.NoOverlapConstraintProto();
517 return DEFAULT_INSTANCE;
524 com.google.protobuf.CodedInputStream input,
525 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
526 throws com.google.protobuf.InvalidProtocolBufferException {
529 builder.mergeFrom(input, extensionRegistry);
530 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
531 throw e.setUnfinishedMessage(builder.buildPartial());
532 }
catch (com.google.protobuf.UninitializedMessageException e) {
533 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
534 }
catch (java.io.IOException e) {
535 throw new com.google.protobuf.InvalidProtocolBufferException(e)
536 .setUnfinishedMessage(builder.buildPartial());
538 return builder.buildPartial();
542 public static com.google.protobuf.Parser<NoOverlapConstraintProto>
parser() {
553 return DEFAULT_INSTANCE;