6package com.google.ortools.sat;
19@com.google.protobuf.Generated
20public final class BooleanAssignment
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 BooleanAssignment.class.getName());
35 private BooleanAssignment(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
38 private BooleanAssignment() {
39 literals_ = emptyIntList();
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.sat.BooleanAssignment.class, com.google.ortools.sat.BooleanAssignment.Builder.class);
56 @SuppressWarnings(
"serial")
57 private com.google.protobuf.Internal.IntList literals_ =
64 public java.
util.List<java.lang.Integer>
73 return literals_.size();
81 return literals_.getInt(index);
84 private byte memoizedIsInitialized = -1;
91 memoizedIsInitialized = 1;
96 public void writeTo(com.google.protobuf.CodedOutputStream output)
97 throws java.io.IOException {
98 for (
int i = 0; i < literals_.size(); i++) {
99 output.writeInt32(1, literals_.getInt(i));
101 getUnknownFields().writeTo(output);
106 int size = memoizedSize;
107 if (size != -1)
return size;
112 for (
int i = 0; i < literals_.size(); i++) {
113 dataSize += com.google.protobuf.CodedOutputStream
114 .computeInt32SizeNoTag(literals_.getInt(i));
119 size += getUnknownFields().getSerializedSize();
125 public boolean equals(
final java.lang.Object obj) {
129 if (!(obj instanceof com.google.ortools.sat.BooleanAssignment)) {
130 return super.equals(obj);
136 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
142 if (memoizedHashCode != 0) {
143 return memoizedHashCode;
151 hash = (29 * hash) + getUnknownFields().hashCode();
152 memoizedHashCode = hash;
157 java.nio.ByteBuffer data)
158 throws com.google.protobuf.InvalidProtocolBufferException {
159 return PARSER.parseFrom(data);
162 java.nio.ByteBuffer data,
163 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
164 throws com.google.protobuf.InvalidProtocolBufferException {
165 return PARSER.parseFrom(data, extensionRegistry);
168 com.google.protobuf.ByteString data)
169 throws com.google.protobuf.InvalidProtocolBufferException {
170 return PARSER.parseFrom(data);
173 com.google.protobuf.ByteString data,
174 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
175 throws com.google.protobuf.InvalidProtocolBufferException {
176 return PARSER.parseFrom(data, extensionRegistry);
179 throws com.google.protobuf.InvalidProtocolBufferException {
180 return PARSER.parseFrom(data);
184 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
185 throws com.google.protobuf.InvalidProtocolBufferException {
186 return PARSER.parseFrom(data, extensionRegistry);
189 throws java.io.IOException {
190 return com.google.protobuf.GeneratedMessage
191 .parseWithIOException(PARSER, input);
194 java.io.InputStream input,
195 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
196 throws java.io.IOException {
197 return com.google.protobuf.GeneratedMessage
198 .parseWithIOException(PARSER, input, extensionRegistry);
202 throws java.io.IOException {
203 return com.google.protobuf.GeneratedMessage
204 .parseDelimitedWithIOException(PARSER, input);
208 java.io.InputStream input,
209 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
210 throws java.io.IOException {
211 return com.google.protobuf.GeneratedMessage
212 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
215 com.google.protobuf.CodedInputStream input)
216 throws java.io.IOException {
217 return com.google.protobuf.GeneratedMessage
218 .parseWithIOException(PARSER, input);
221 com.google.protobuf.CodedInputStream input,
222 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
223 throws java.io.IOException {
224 return com.google.protobuf.GeneratedMessage
225 .parseWithIOException(PARSER, input, extensionRegistry);
231 return DEFAULT_INSTANCE.toBuilder();
234 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
238 return this == DEFAULT_INSTANCE
244 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
259 public static final class Builder
extends
260 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
263 public static final com.google.protobuf.Descriptors.Descriptor
265 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
269 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
271 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_fieldAccessorTable
272 .ensureFieldAccessorsInitialized(
273 com.google.ortools.sat.BooleanAssignment.class, com.google.ortools.sat.BooleanAssignment.Builder.class);
282 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
290 literals_ = emptyIntList();
295 public com.google.protobuf.Descriptors.Descriptor
297 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
302 return com.google.ortools.sat.BooleanAssignment.getDefaultInstance();
309 throw newUninitializedMessageException(result);
317 if (bitField0_ != 0) { buildPartial0(result); }
322 private void buildPartial0(com.google.ortools.sat.BooleanAssignment result) {
323 int from_bitField0_ = bitField0_;
324 if (((from_bitField0_ & 0x00000001) != 0)) {
325 literals_.makeImmutable();
326 result.literals_ = literals_;
331 public Builder
mergeFrom(com.google.protobuf.Message other) {
332 if (other instanceof com.google.ortools.sat.BooleanAssignment) {
333 return mergeFrom((com.google.ortools.sat.BooleanAssignment)other);
335 super.mergeFrom(other);
340 public Builder
mergeFrom(com.google.ortools.sat.BooleanAssignment other) {
341 if (other == com.google.ortools.sat.BooleanAssignment.getDefaultInstance())
return this;
342 if (!other.literals_.isEmpty()) {
343 if (literals_.isEmpty()) {
344 literals_ = other.literals_;
345 literals_.makeImmutable();
346 bitField0_ |= 0x00000001;
348 ensureLiteralsIsMutable();
349 literals_.addAll(other.literals_);
353 this.mergeUnknownFields(other.getUnknownFields());
365 com.google.protobuf.CodedInputStream input,
366 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
367 throws java.io.IOException {
368 if (extensionRegistry ==
null) {
369 throw new java.lang.NullPointerException();
372 boolean done =
false;
374 int tag = input.readTag();
380 int v = input.readInt32();
381 ensureLiteralsIsMutable();
386 int length = input.readRawVarint32();
387 int limit = input.pushLimit(length);
388 ensureLiteralsIsMutable();
389 while (input.getBytesUntilLimit() > 0) {
390 literals_.addInt(input.readInt32());
392 input.popLimit(limit);
396 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
403 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
404 throw e.unwrapIOException();
410 private int bitField0_;
412 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
413 private void ensureLiteralsIsMutable() {
414 if (!literals_.isModifiable()) {
415 literals_ = makeMutableCopy(literals_);
417 bitField0_ |= 0x00000001;
423 public java.util.List<java.lang.Integer>
425 literals_.makeImmutable();
433 return literals_.size();
441 return literals_.getInt(index);
450 int index,
int value) {
452 ensureLiteralsIsMutable();
453 literals_.setInt(index, value);
454 bitField0_ |= 0x00000001;
465 ensureLiteralsIsMutable();
466 literals_.addInt(value);
467 bitField0_ |= 0x00000001;
477 java.lang.Iterable<? extends java.lang.Integer> values) {
478 ensureLiteralsIsMutable();
479 com.google.protobuf.AbstractMessageLite.Builder.addAll(
481 bitField0_ |= 0x00000001;
490 literals_ = emptyIntList();
491 bitField0_ = (bitField0_ & ~0x00000001);
502 DEFAULT_INSTANCE =
new com.google.ortools.sat.BooleanAssignment();
506 return DEFAULT_INSTANCE;
513 com.google.protobuf.CodedInputStream input,
514 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
515 throws com.google.protobuf.InvalidProtocolBufferException {
518 builder.mergeFrom(input, extensionRegistry);
519 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
520 throw e.setUnfinishedMessage(builder.buildPartial());
521 }
catch (com.google.protobuf.UninitializedMessageException e) {
522 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
523 }
catch (java.io.IOException e) {
524 throw new com.google.protobuf.InvalidProtocolBufferException(e)
525 .setUnfinishedMessage(builder.buildPartial());
527 return builder.buildPartial();
531 public static com.google.protobuf.Parser<BooleanAssignment>
parser() {
542 return DEFAULT_INSTANCE;