5package com.google.ortools.sat;
19 com.google.protobuf.GeneratedMessageV3 implements
22private static final long serialVersionUID = 0L;
24 private BooleanAssignment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
28 literals_ = emptyIntList();
32 @SuppressWarnings({
"unused"})
34 UnusedPrivateParameter unused) {
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
44 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
46 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.sat.BooleanAssignment.class, com.google.ortools.sat.BooleanAssignment.Builder.class);
52 @SuppressWarnings(
"serial")
53 private com.google.protobuf.Internal.IntList literals_ =
60 public java.util.List<java.lang.Integer>
69 return literals_.size();
77 return literals_.getInt(index);
80 private byte memoizedIsInitialized = -1;
87 memoizedIsInitialized = 1;
92 public void writeTo(com.google.protobuf.CodedOutputStream output)
93 throws java.io.IOException {
94 for (
int i = 0; i < literals_.size(); i++) {
95 output.writeInt32(1, literals_.getInt(i));
97 getUnknownFields().writeTo(output);
102 int size = memoizedSize;
103 if (size != -1)
return size;
108 for (
int i = 0; i < literals_.size(); i++) {
109 dataSize += com.google.protobuf.CodedOutputStream
110 .computeInt32SizeNoTag(literals_.getInt(i));
115 size += getUnknownFields().getSerializedSize();
121 public boolean equals(
final java.lang.Object obj) {
125 if (!(obj instanceof com.google.ortools.sat.BooleanAssignment)) {
126 return super.equals(obj);
132 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
138 if (memoizedHashCode != 0) {
139 return memoizedHashCode;
147 hash = (29 * hash) + getUnknownFields().hashCode();
148 memoizedHashCode = hash;
153 java.nio.ByteBuffer data)
154 throws com.google.protobuf.InvalidProtocolBufferException {
158 java.nio.ByteBuffer data,
159 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
160 throws com.google.protobuf.InvalidProtocolBufferException {
164 com.google.protobuf.ByteString data)
165 throws com.google.protobuf.InvalidProtocolBufferException {
169 com.google.protobuf.ByteString data,
170 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
171 throws com.google.protobuf.InvalidProtocolBufferException {
175 throws com.google.protobuf.InvalidProtocolBufferException {
180 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
181 throws com.google.protobuf.InvalidProtocolBufferException {
185 throws java.io.IOException {
186 return com.google.protobuf.GeneratedMessageV3
187 .parseWithIOException(
PARSER, input);
190 java.io.InputStream input,
191 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
192 throws java.io.IOException {
193 return com.google.protobuf.GeneratedMessageV3
194 .parseWithIOException(
PARSER, input, extensionRegistry);
198 throws java.io.IOException {
199 return com.google.protobuf.GeneratedMessageV3
200 .parseDelimitedWithIOException(
PARSER, input);
204 java.io.InputStream input,
205 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
206 throws java.io.IOException {
207 return com.google.protobuf.GeneratedMessageV3
208 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
211 com.google.protobuf.CodedInputStream input)
212 throws java.io.IOException {
213 return com.google.protobuf.GeneratedMessageV3
214 .parseWithIOException(
PARSER, input);
217 com.google.protobuf.CodedInputStream input,
218 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
219 throws java.io.IOException {
220 return com.google.protobuf.GeneratedMessageV3
221 .parseWithIOException(
PARSER, input, extensionRegistry);
234 return this == DEFAULT_INSTANCE
240 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
256 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
259 public static final com.google.protobuf.Descriptors.Descriptor
261 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
265 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
267 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_fieldAccessorTable
268 .ensureFieldAccessorsInitialized(
269 com.google.ortools.sat.BooleanAssignment.class, com.google.ortools.sat.BooleanAssignment.Builder.class);
278 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
286 literals_ = emptyIntList();
291 public com.google.protobuf.Descriptors.Descriptor
293 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
298 return com.google.ortools.sat.BooleanAssignment.getDefaultInstance();
305 throw newUninitializedMessageException(result);
313 if (bitField0_ != 0) { buildPartial0(result); }
318 private void buildPartial0(com.google.ortools.sat.BooleanAssignment result) {
319 int from_bitField0_ = bitField0_;
320 if (((from_bitField0_ & 0x00000001) != 0)) {
321 literals_.makeImmutable();
322 result.literals_ = literals_;
328 return super.
clone();
332 com.google.protobuf.Descriptors.FieldDescriptor field,
333 java.lang.Object value) {
334 return super.
setField(field, value);
338 com.google.protobuf.Descriptors.FieldDescriptor field) {
343 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
348 com.google.protobuf.Descriptors.FieldDescriptor field,
349 int index, java.lang.Object value) {
354 com.google.protobuf.Descriptors.FieldDescriptor field,
355 java.lang.Object value) {
360 if (other instanceof com.google.ortools.sat.BooleanAssignment) {
361 return mergeFrom((com.google.ortools.sat.BooleanAssignment)other);
363 super.mergeFrom(other);
369 if (other == com.google.ortools.sat.BooleanAssignment.getDefaultInstance())
return this;
370 if (!other.literals_.isEmpty()) {
371 if (literals_.isEmpty()) {
372 literals_ = other.literals_;
373 literals_.makeImmutable();
374 bitField0_ |= 0x00000001;
376 ensureLiteralsIsMutable();
377 literals_.addAll(other.literals_);
393 com.google.protobuf.CodedInputStream input,
394 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
395 throws java.io.IOException {
396 if (extensionRegistry ==
null) {
397 throw new java.lang.NullPointerException();
400 boolean done =
false;
402 int tag = input.readTag();
408 int v = input.readInt32();
409 ensureLiteralsIsMutable();
414 int length = input.readRawVarint32();
415 int limit = input.pushLimit(length);
416 ensureLiteralsIsMutable();
417 while (input.getBytesUntilLimit() > 0) {
418 literals_.addInt(input.readInt32());
420 input.popLimit(limit);
424 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
431 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
432 throw e.unwrapIOException();
438 private int bitField0_;
440 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
441 private void ensureLiteralsIsMutable() {
442 if (!literals_.isModifiable()) {
443 literals_ = makeMutableCopy(literals_);
445 bitField0_ |= 0x00000001;
451 public java.util.List<java.lang.Integer>
453 literals_.makeImmutable();
461 return literals_.size();
469 return literals_.getInt(index);
478 int index,
int value) {
480 ensureLiteralsIsMutable();
481 literals_.setInt(index, value);
482 bitField0_ |= 0x00000001;
493 ensureLiteralsIsMutable();
494 literals_.addInt(value);
495 bitField0_ |= 0x00000001;
505 java.lang.Iterable<? extends java.lang.Integer> values) {
506 ensureLiteralsIsMutable();
507 com.google.protobuf.AbstractMessageLite.Builder.addAll(
509 bitField0_ |= 0x00000001;
518 literals_ = emptyIntList();
519 bitField0_ = (bitField0_ & ~0x00000001);
525 final com.google.protobuf.UnknownFieldSet unknownFields) {
531 final com.google.protobuf.UnknownFieldSet unknownFields) {
542 DEFAULT_INSTANCE =
new com.google.ortools.sat.BooleanAssignment();
546 return DEFAULT_INSTANCE;
549 @java.lang.Deprecated
public static final com.google.protobuf.Parser<
BooleanAssignment>
553 com.google.protobuf.CodedInputStream input,
554 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
555 throws com.google.protobuf.InvalidProtocolBufferException {
558 builder.
mergeFrom(input, extensionRegistry);
559 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
561 }
catch (com.google.protobuf.UninitializedMessageException e) {
562 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
563 }
catch (java.io.IOException e) {
564 throw new com.google.protobuf.InvalidProtocolBufferException(e)
582 return DEFAULT_INSTANCE;