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 public final com.
google.protobuf.UnknownFieldSet
33 return this.unknownFields;
36 com.
google.protobuf.CodedInputStream input,
37 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
38 throws com.
google.protobuf.InvalidProtocolBufferException {
40 if (extensionRegistry ==
null) {
41 throw new java.lang.NullPointerException();
43 int mutable_bitField0_ = 0;
44 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
45 com.
google.protobuf.UnknownFieldSet.newBuilder();
49 int tag = input.readTag();
56 capacity_ = input.readInt32();
60 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
61 intervals_ = newIntList();
62 mutable_bitField0_ |= 0x00000002;
64 intervals_.addInt(input.readInt32());
68 int length = input.readRawVarint32();
69 int limit = input.pushLimit(length);
70 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
71 intervals_ = newIntList();
72 mutable_bitField0_ |= 0x00000002;
74 while (input.getBytesUntilLimit() > 0) {
75 intervals_.addInt(input.readInt32());
77 input.popLimit(limit);
81 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
82 demands_ = newIntList();
83 mutable_bitField0_ |= 0x00000004;
85 demands_.addInt(input.readInt32());
89 int length = input.readRawVarint32();
90 int limit = input.pushLimit(length);
91 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
92 demands_ = newIntList();
93 mutable_bitField0_ |= 0x00000004;
95 while (input.getBytesUntilLimit() > 0) {
96 demands_.addInt(input.readInt32());
98 input.popLimit(limit);
102 if (!parseUnknownField(
103 input, unknownFields, extensionRegistry, tag)) {
110 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
111 throw e.setUnfinishedMessage(
this);
112 }
catch (java.io.IOException e) {
113 throw new com.
google.protobuf.InvalidProtocolBufferException(
114 e).setUnfinishedMessage(
this);
116 if (((mutable_bitField0_ & 0x00000002) != 0)) {
117 intervals_.makeImmutable();
119 if (((mutable_bitField0_ & 0x00000004) != 0)) {
120 demands_.makeImmutable();
122 this.unknownFields = unknownFields.build();
123 makeExtensionsImmutable();
126 public static final com.
google.protobuf.Descriptors.Descriptor
132 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
135 .ensureFieldAccessorsInitialized(
139 private int bitField0_;
141 private int capacity_;
150 private com.
google.protobuf.Internal.IntList intervals_;
154 public java.util.List<java.lang.Integer>
162 return intervals_.size();
168 return intervals_.getInt(index);
170 private int intervalsMemoizedSerializedSize = -1;
173 private com.
google.protobuf.Internal.IntList demands_;
181 public java.util.List<java.lang.Integer>
193 return demands_.size();
203 return demands_.getInt(index);
205 private int demandsMemoizedSerializedSize = -1;
207 private byte memoizedIsInitialized = -1;
214 memoizedIsInitialized = 1;
220 throws java.io.IOException {
222 if (capacity_ != 0) {
223 output.writeInt32(1, capacity_);
226 output.writeUInt32NoTag(18);
227 output.writeUInt32NoTag(intervalsMemoizedSerializedSize);
229 for (
int i = 0; i < intervals_.size(); i++) {
230 output.writeInt32NoTag(intervals_.getInt(i));
233 output.writeUInt32NoTag(26);
234 output.writeUInt32NoTag(demandsMemoizedSerializedSize);
236 for (
int i = 0; i < demands_.size(); i++) {
237 output.writeInt32NoTag(demands_.getInt(i));
239 unknownFields.writeTo(output);
244 int size = memoizedSize;
245 if (size != -1)
return size;
248 if (capacity_ != 0) {
249 size +=
com.
google.protobuf.CodedOutputStream
250 .computeInt32Size(1, capacity_);
254 for (
int i = 0; i < intervals_.size(); i++) {
255 dataSize +=
com.
google.protobuf.CodedOutputStream
256 .computeInt32SizeNoTag(intervals_.getInt(i));
261 size +=
com.
google.protobuf.CodedOutputStream
262 .computeInt32SizeNoTag(dataSize);
264 intervalsMemoizedSerializedSize = dataSize;
268 for (
int i = 0; i < demands_.size(); i++) {
269 dataSize +=
com.
google.protobuf.CodedOutputStream
270 .computeInt32SizeNoTag(demands_.getInt(i));
275 size +=
com.
google.protobuf.CodedOutputStream
276 .computeInt32SizeNoTag(dataSize);
278 demandsMemoizedSerializedSize = dataSize;
280 size += unknownFields.getSerializedSize();
286 public boolean equals(
final java.lang.Object obj) {
291 return super.equals(obj);
296 != other.getCapacity())
return false;
298 .equals(other.getIntervalsList()))
return false;
300 .equals(other.getDemandsList()))
return false;
301 if (!unknownFields.equals(other.unknownFields))
return false;
307 if (memoizedHashCode != 0) {
308 return memoizedHashCode;
322 hash = (29 * hash) + unknownFields.hashCode();
323 memoizedHashCode = hash;
328 java.nio.ByteBuffer data)
329 throws com.
google.protobuf.InvalidProtocolBufferException {
330 return PARSER.parseFrom(data);
333 java.nio.ByteBuffer data,
334 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
335 throws com.
google.protobuf.InvalidProtocolBufferException {
336 return PARSER.parseFrom(data, extensionRegistry);
340 throws com.
google.protobuf.InvalidProtocolBufferException {
341 return PARSER.parseFrom(data);
345 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
346 throws com.
google.protobuf.InvalidProtocolBufferException {
347 return PARSER.parseFrom(data, extensionRegistry);
350 throws com.
google.protobuf.InvalidProtocolBufferException {
351 return PARSER.parseFrom(data);
355 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
356 throws com.
google.protobuf.InvalidProtocolBufferException {
357 return PARSER.parseFrom(data, extensionRegistry);
360 throws java.io.IOException {
361 return com.
google.protobuf.GeneratedMessageV3
362 .parseWithIOException(PARSER, input);
365 java.io.InputStream input,
366 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
367 throws java.io.IOException {
368 return com.
google.protobuf.GeneratedMessageV3
369 .parseWithIOException(PARSER, input, extensionRegistry);
372 throws java.io.IOException {
373 return com.
google.protobuf.GeneratedMessageV3
374 .parseDelimitedWithIOException(PARSER, input);
377 java.io.InputStream input,
378 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
379 throws java.io.IOException {
380 return com.
google.protobuf.GeneratedMessageV3
381 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
384 com.
google.protobuf.CodedInputStream input)
385 throws java.io.IOException {
386 return com.
google.protobuf.GeneratedMessageV3
387 .parseWithIOException(PARSER, input);
390 com.
google.protobuf.CodedInputStream input,
391 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
392 throws java.io.IOException {
393 return com.
google.protobuf.GeneratedMessageV3
394 .parseWithIOException(PARSER, input, extensionRegistry);
407 return this == DEFAULT_INSTANCE
413 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
428 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
431 public static final com.
google.protobuf.Descriptors.Descriptor
437 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
440 .ensureFieldAccessorsInitialized(
446 maybeForceBuilderInitialization();
450 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
452 maybeForceBuilderInitialization();
454 private void maybeForceBuilderInitialization() {
455 if (
com.
google.protobuf.GeneratedMessageV3
456 .alwaysUseFieldBuilders) {
464 intervals_ = emptyIntList();
465 bitField0_ = (bitField0_ & ~0x00000002);
466 demands_ = emptyIntList();
467 bitField0_ = (bitField0_ & ~0x00000004);
472 public com.
google.protobuf.Descriptors.Descriptor
485 if (!result.isInitialized()) {
486 throw newUninitializedMessageException(result);
494 int from_bitField0_ = bitField0_;
495 int to_bitField0_ = 0;
496 result.capacity_ = capacity_;
497 if (((bitField0_ & 0x00000002) != 0)) {
498 intervals_.makeImmutable();
499 bitField0_ = (bitField0_ & ~0x00000002);
501 result.intervals_ = intervals_;
502 if (((bitField0_ & 0x00000004) != 0)) {
503 demands_.makeImmutable();
504 bitField0_ = (bitField0_ & ~0x00000004);
506 result.demands_ = demands_;
507 result.bitField0_ = to_bitField0_;
514 return super.
clone();
518 com.
google.protobuf.Descriptors.FieldDescriptor field,
519 java.lang.Object value) {
520 return super.
setField(field, value);
524 com.
google.protobuf.Descriptors.FieldDescriptor field) {
529 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
534 com.
google.protobuf.Descriptors.FieldDescriptor field,
535 int index, java.lang.Object value) {
540 com.
google.protobuf.Descriptors.FieldDescriptor field,
541 java.lang.Object value) {
549 super.mergeFrom(other);
556 if (other.getCapacity() != 0) {
559 if (!other.intervals_.isEmpty()) {
560 if (intervals_.isEmpty()) {
561 intervals_ = other.intervals_;
562 bitField0_ = (bitField0_ & ~0x00000002);
564 ensureIntervalsIsMutable();
565 intervals_.addAll(other.intervals_);
569 if (!other.demands_.isEmpty()) {
570 if (demands_.isEmpty()) {
571 demands_ = other.demands_;
572 bitField0_ = (bitField0_ & ~0x00000004);
574 ensureDemandsIsMutable();
575 demands_.addAll(other.demands_);
591 com.
google.protobuf.CodedInputStream input,
592 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
593 throws java.io.IOException {
596 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
597 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
599 throw e.unwrapIOException();
601 if (parsedMessage !=
null) {
607 private int bitField0_;
609 private int capacity_ ;
635 private com.
google.protobuf.Internal.IntList intervals_ = emptyIntList();
636 private void ensureIntervalsIsMutable() {
637 if (!((bitField0_ & 0x00000002) != 0)) {
638 intervals_ = mutableCopy(intervals_);
639 bitField0_ |= 0x00000002;
645 public java.util.List<java.lang.Integer>
647 return ((bitField0_ & 0x00000002) != 0) ?
648 java.util.Collections.unmodifiableList(intervals_) : intervals_;
654 return intervals_.size();
660 return intervals_.getInt(index);
666 int index,
int value) {
667 ensureIntervalsIsMutable();
668 intervals_.setInt(index, value);
676 ensureIntervalsIsMutable();
677 intervals_.addInt(value);
685 java.lang.Iterable<? extends java.lang.Integer> values) {
686 ensureIntervalsIsMutable();
687 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
696 intervals_ = emptyIntList();
697 bitField0_ = (bitField0_ & ~0x00000002);
702 private com.
google.protobuf.Internal.IntList demands_ = emptyIntList();
703 private void ensureDemandsIsMutable() {
704 if (!((bitField0_ & 0x00000004) != 0)) {
705 demands_ = mutableCopy(demands_);
706 bitField0_ |= 0x00000004;
716 public java.util.List<java.lang.Integer>
718 return ((bitField0_ & 0x00000004) != 0) ?
719 java.util.Collections.unmodifiableList(demands_) : demands_;
729 return demands_.size();
739 return demands_.getInt(index);
749 int index,
int value) {
750 ensureDemandsIsMutable();
751 demands_.setInt(index, value);
763 ensureDemandsIsMutable();
764 demands_.addInt(value);
776 java.lang.Iterable<? extends java.lang.Integer> values) {
777 ensureDemandsIsMutable();
778 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
791 demands_ = emptyIntList();
792 bitField0_ = (bitField0_ & ~0x00000004);
798 final com.
google.protobuf.UnknownFieldSet unknownFields) {
804 final com.
google.protobuf.UnknownFieldSet unknownFields) {
819 return DEFAULT_INSTANCE;
826 com.
google.protobuf.CodedInputStream input,
827 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
828 throws com.
google.protobuf.InvalidProtocolBufferException {
844 return DEFAULT_INSTANCE;