4 package com.google.ortools.sat;
17 com.google.protobuf.GeneratedMessageV3 implements
20 private static final long serialVersionUID = 0L;
26 intervals_ = emptyIntList();
27 demands_ = emptyIntList();
31 @SuppressWarnings({
"unused"})
33 UnusedPrivateParameter unused) {
38 public final com.
google.protobuf.UnknownFieldSet
40 return this.unknownFields;
43 com.
google.protobuf.CodedInputStream input,
44 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
45 throws com.
google.protobuf.InvalidProtocolBufferException {
47 if (extensionRegistry ==
null) {
48 throw new java.lang.NullPointerException();
50 int mutable_bitField0_ = 0;
51 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
52 com.
google.protobuf.UnknownFieldSet.newBuilder();
56 int tag = input.readTag();
63 capacity_ = input.readInt32();
67 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
68 intervals_ = newIntList();
69 mutable_bitField0_ |= 0x00000001;
71 intervals_.addInt(input.readInt32());
75 int length = input.readRawVarint32();
76 int limit = input.pushLimit(length);
77 if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
78 intervals_ = newIntList();
79 mutable_bitField0_ |= 0x00000001;
81 while (input.getBytesUntilLimit() > 0) {
82 intervals_.addInt(input.readInt32());
84 input.popLimit(limit);
88 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
89 demands_ = newIntList();
90 mutable_bitField0_ |= 0x00000002;
92 demands_.addInt(input.readInt32());
96 int length = input.readRawVarint32();
97 int limit = input.pushLimit(length);
98 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
99 demands_ = newIntList();
100 mutable_bitField0_ |= 0x00000002;
102 while (input.getBytesUntilLimit() > 0) {
103 demands_.addInt(input.readInt32());
105 input.popLimit(limit);
109 if (!parseUnknownField(
110 input, unknownFields, extensionRegistry, tag)) {
117 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
118 throw e.setUnfinishedMessage(
this);
119 }
catch (java.io.IOException e) {
120 throw new com.
google.protobuf.InvalidProtocolBufferException(
121 e).setUnfinishedMessage(
this);
123 if (((mutable_bitField0_ & 0x00000001) != 0)) {
124 intervals_.makeImmutable();
126 if (((mutable_bitField0_ & 0x00000002) != 0)) {
127 demands_.makeImmutable();
129 this.unknownFields = unknownFields.build();
130 makeExtensionsImmutable();
133 public static final com.
google.protobuf.Descriptors.Descriptor
139 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
142 .ensureFieldAccessorsInitialized(
147 private int capacity_;
156 private com.
google.protobuf.Internal.IntList intervals_;
160 public java.util.List<java.lang.Integer>
168 return intervals_.size();
174 return intervals_.getInt(index);
176 private int intervalsMemoizedSerializedSize = -1;
179 private com.
google.protobuf.Internal.IntList demands_;
187 public java.util.List<java.lang.Integer>
199 return demands_.size();
209 return demands_.getInt(index);
211 private int demandsMemoizedSerializedSize = -1;
213 private byte memoizedIsInitialized = -1;
220 memoizedIsInitialized = 1;
226 throws java.io.IOException {
228 if (capacity_ != 0) {
229 output.writeInt32(1, capacity_);
232 output.writeUInt32NoTag(18);
233 output.writeUInt32NoTag(intervalsMemoizedSerializedSize);
235 for (
int i = 0; i < intervals_.size(); i++) {
236 output.writeInt32NoTag(intervals_.getInt(i));
239 output.writeUInt32NoTag(26);
240 output.writeUInt32NoTag(demandsMemoizedSerializedSize);
242 for (
int i = 0; i < demands_.size(); i++) {
243 output.writeInt32NoTag(demands_.getInt(i));
245 unknownFields.writeTo(output);
250 int size = memoizedSize;
251 if (size != -1)
return size;
254 if (capacity_ != 0) {
255 size +=
com.
google.protobuf.CodedOutputStream
256 .computeInt32Size(1, capacity_);
260 for (
int i = 0; i < intervals_.size(); i++) {
261 dataSize +=
com.
google.protobuf.CodedOutputStream
262 .computeInt32SizeNoTag(intervals_.getInt(i));
267 size +=
com.
google.protobuf.CodedOutputStream
268 .computeInt32SizeNoTag(dataSize);
270 intervalsMemoizedSerializedSize = dataSize;
274 for (
int i = 0; i < demands_.size(); i++) {
275 dataSize +=
com.
google.protobuf.CodedOutputStream
276 .computeInt32SizeNoTag(demands_.getInt(i));
281 size +=
com.
google.protobuf.CodedOutputStream
282 .computeInt32SizeNoTag(dataSize);
284 demandsMemoizedSerializedSize = dataSize;
286 size += unknownFields.getSerializedSize();
292 public boolean equals(
final java.lang.Object obj) {
297 return super.equals(obj);
302 != other.getCapacity())
return false;
304 .equals(other.getIntervalsList()))
return false;
306 .equals(other.getDemandsList()))
return false;
307 if (!unknownFields.equals(other.unknownFields))
return false;
313 if (memoizedHashCode != 0) {
314 return memoizedHashCode;
328 hash = (29 * hash) + unknownFields.hashCode();
329 memoizedHashCode = hash;
334 java.nio.ByteBuffer data)
335 throws com.
google.protobuf.InvalidProtocolBufferException {
336 return PARSER.parseFrom(data);
339 java.nio.ByteBuffer data,
340 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
341 throws com.
google.protobuf.InvalidProtocolBufferException {
342 return PARSER.parseFrom(data, extensionRegistry);
346 throws com.
google.protobuf.InvalidProtocolBufferException {
347 return PARSER.parseFrom(data);
351 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
352 throws com.
google.protobuf.InvalidProtocolBufferException {
353 return PARSER.parseFrom(data, extensionRegistry);
356 throws com.
google.protobuf.InvalidProtocolBufferException {
357 return PARSER.parseFrom(data);
361 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
362 throws com.
google.protobuf.InvalidProtocolBufferException {
363 return PARSER.parseFrom(data, extensionRegistry);
366 throws java.io.IOException {
367 return com.
google.protobuf.GeneratedMessageV3
368 .parseWithIOException(PARSER, input);
371 java.io.InputStream input,
372 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
373 throws java.io.IOException {
374 return com.
google.protobuf.GeneratedMessageV3
375 .parseWithIOException(PARSER, input, extensionRegistry);
378 throws java.io.IOException {
379 return com.
google.protobuf.GeneratedMessageV3
380 .parseDelimitedWithIOException(PARSER, input);
383 java.io.InputStream input,
384 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
385 throws java.io.IOException {
386 return com.
google.protobuf.GeneratedMessageV3
387 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
390 com.
google.protobuf.CodedInputStream input)
391 throws java.io.IOException {
392 return com.
google.protobuf.GeneratedMessageV3
393 .parseWithIOException(PARSER, input);
396 com.
google.protobuf.CodedInputStream input,
397 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
398 throws java.io.IOException {
399 return com.
google.protobuf.GeneratedMessageV3
400 .parseWithIOException(PARSER, input, extensionRegistry);
413 return this == DEFAULT_INSTANCE
419 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
434 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
437 public static final com.
google.protobuf.Descriptors.Descriptor
443 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
446 .ensureFieldAccessorsInitialized(
452 maybeForceBuilderInitialization();
456 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
458 maybeForceBuilderInitialization();
460 private void maybeForceBuilderInitialization() {
461 if (
com.
google.protobuf.GeneratedMessageV3
462 .alwaysUseFieldBuilders) {
470 intervals_ = emptyIntList();
471 bitField0_ = (bitField0_ & ~0x00000001);
472 demands_ = emptyIntList();
473 bitField0_ = (bitField0_ & ~0x00000002);
478 public com.
google.protobuf.Descriptors.Descriptor
491 if (!result.isInitialized()) {
492 throw newUninitializedMessageException(result);
500 int from_bitField0_ = bitField0_;
501 result.capacity_ = capacity_;
502 if (((bitField0_ & 0x00000001) != 0)) {
503 intervals_.makeImmutable();
504 bitField0_ = (bitField0_ & ~0x00000001);
506 result.intervals_ = intervals_;
507 if (((bitField0_ & 0x00000002) != 0)) {
508 demands_.makeImmutable();
509 bitField0_ = (bitField0_ & ~0x00000002);
511 result.demands_ = demands_;
518 return super.
clone();
522 com.
google.protobuf.Descriptors.FieldDescriptor field,
523 java.lang.Object value) {
524 return super.
setField(field, value);
528 com.
google.protobuf.Descriptors.FieldDescriptor field) {
533 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
538 com.
google.protobuf.Descriptors.FieldDescriptor field,
539 int index, java.lang.Object value) {
544 com.
google.protobuf.Descriptors.FieldDescriptor field,
545 java.lang.Object value) {
553 super.mergeFrom(other);
560 if (other.getCapacity() != 0) {
563 if (!other.intervals_.isEmpty()) {
564 if (intervals_.isEmpty()) {
565 intervals_ = other.intervals_;
566 bitField0_ = (bitField0_ & ~0x00000001);
568 ensureIntervalsIsMutable();
569 intervals_.addAll(other.intervals_);
573 if (!other.demands_.isEmpty()) {
574 if (demands_.isEmpty()) {
575 demands_ = other.demands_;
576 bitField0_ = (bitField0_ & ~0x00000002);
578 ensureDemandsIsMutable();
579 demands_.addAll(other.demands_);
595 com.
google.protobuf.CodedInputStream input,
596 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
597 throws java.io.IOException {
600 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
601 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
603 throw e.unwrapIOException();
605 if (parsedMessage !=
null) {
611 private int bitField0_;
613 private int capacity_ ;
639 private com.
google.protobuf.Internal.IntList intervals_ = emptyIntList();
640 private void ensureIntervalsIsMutable() {
641 if (!((bitField0_ & 0x00000001) != 0)) {
642 intervals_ = mutableCopy(intervals_);
643 bitField0_ |= 0x00000001;
649 public java.util.List<java.lang.Integer>
651 return ((bitField0_ & 0x00000001) != 0) ?
652 java.util.Collections.unmodifiableList(intervals_) : intervals_;
658 return intervals_.size();
664 return intervals_.getInt(index);
670 int index,
int value) {
671 ensureIntervalsIsMutable();
672 intervals_.setInt(index, value);
680 ensureIntervalsIsMutable();
681 intervals_.addInt(value);
689 java.lang.Iterable<? extends java.lang.Integer> values) {
690 ensureIntervalsIsMutable();
691 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
700 intervals_ = emptyIntList();
701 bitField0_ = (bitField0_ & ~0x00000001);
706 private com.
google.protobuf.Internal.IntList demands_ = emptyIntList();
707 private void ensureDemandsIsMutable() {
708 if (!((bitField0_ & 0x00000002) != 0)) {
709 demands_ = mutableCopy(demands_);
710 bitField0_ |= 0x00000002;
720 public java.util.List<java.lang.Integer>
722 return ((bitField0_ & 0x00000002) != 0) ?
723 java.util.Collections.unmodifiableList(demands_) : demands_;
733 return demands_.size();
743 return demands_.getInt(index);
753 int index,
int value) {
754 ensureDemandsIsMutable();
755 demands_.setInt(index, value);
767 ensureDemandsIsMutable();
768 demands_.addInt(value);
780 java.lang.Iterable<? extends java.lang.Integer> values) {
781 ensureDemandsIsMutable();
782 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
795 demands_ = emptyIntList();
796 bitField0_ = (bitField0_ & ~0x00000002);
802 final com.
google.protobuf.UnknownFieldSet unknownFields) {
808 final com.
google.protobuf.UnknownFieldSet unknownFields) {
823 return DEFAULT_INSTANCE;
830 com.
google.protobuf.CodedInputStream input,
831 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
832 throws com.
google.protobuf.InvalidProtocolBufferException {
848 return DEFAULT_INSTANCE;