5package com.google.ortools.sat;
19 com.google.protobuf.GeneratedMessage implements
22private static final long serialVersionUID = 0L;
24 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
25 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
33 private BooleanAssignment(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
37 literals_ = emptyIntList();
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.sat.BooleanAssignment.class, com.google.ortools.sat.BooleanAssignment.Builder.class);
54 @SuppressWarnings(
"serial")
55 private com.google.protobuf.Internal.IntList literals_ =
62 public java.util.List<java.lang.Integer>
71 return literals_.size();
79 return literals_.getInt(index);
82 private byte memoizedIsInitialized = -1;
89 memoizedIsInitialized = 1;
94 public void writeTo(com.google.protobuf.CodedOutputStream output)
95 throws java.io.IOException {
96 for (
int i = 0; i < literals_.size(); i++) {
97 output.writeInt32(1, literals_.getInt(i));
99 getUnknownFields().writeTo(output);
104 int size = memoizedSize;
105 if (size != -1)
return size;
110 for (
int i = 0; i < literals_.size(); i++) {
111 dataSize += com.google.protobuf.CodedOutputStream
112 .computeInt32SizeNoTag(literals_.getInt(i));
117 size += getUnknownFields().getSerializedSize();
123 public boolean equals(
final java.lang.Object obj) {
127 if (!(obj instanceof com.google.ortools.sat.BooleanAssignment)) {
128 return super.equals(obj);
134 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
140 if (memoizedHashCode != 0) {
141 return memoizedHashCode;
149 hash = (29 * hash) + getUnknownFields().hashCode();
150 memoizedHashCode = hash;
155 java.nio.ByteBuffer data)
156 throws com.google.protobuf.InvalidProtocolBufferException {
157 return PARSER.parseFrom(data);
160 java.nio.ByteBuffer data,
161 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
162 throws com.google.protobuf.InvalidProtocolBufferException {
163 return PARSER.parseFrom(data, extensionRegistry);
166 com.google.protobuf.ByteString data)
167 throws com.google.protobuf.InvalidProtocolBufferException {
168 return PARSER.parseFrom(data);
171 com.google.protobuf.ByteString data,
172 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
173 throws com.google.protobuf.InvalidProtocolBufferException {
174 return PARSER.parseFrom(data, extensionRegistry);
177 throws com.google.protobuf.InvalidProtocolBufferException {
178 return PARSER.parseFrom(data);
182 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
183 throws com.google.protobuf.InvalidProtocolBufferException {
184 return PARSER.parseFrom(data, extensionRegistry);
187 throws java.io.IOException {
188 return com.google.protobuf.GeneratedMessage
189 .parseWithIOException(PARSER, input);
192 java.io.InputStream input,
193 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
194 throws java.io.IOException {
195 return com.google.protobuf.GeneratedMessage
196 .parseWithIOException(PARSER, input, extensionRegistry);
200 throws java.io.IOException {
201 return com.google.protobuf.GeneratedMessage
202 .parseDelimitedWithIOException(PARSER, input);
206 java.io.InputStream input,
207 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
208 throws java.io.IOException {
209 return com.google.protobuf.GeneratedMessage
210 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
213 com.google.protobuf.CodedInputStream input)
214 throws java.io.IOException {
215 return com.google.protobuf.GeneratedMessage
216 .parseWithIOException(PARSER, input);
219 com.google.protobuf.CodedInputStream input,
220 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
221 throws java.io.IOException {
222 return com.google.protobuf.GeneratedMessage
223 .parseWithIOException(PARSER, input, extensionRegistry);
236 return this == DEFAULT_INSTANCE
242 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
258 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
261 public static final com.google.protobuf.Descriptors.Descriptor
263 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
267 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
269 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_fieldAccessorTable
270 .ensureFieldAccessorsInitialized(
271 com.google.ortools.sat.BooleanAssignment.class, com.google.ortools.sat.BooleanAssignment.Builder.class);
280 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
288 literals_ = emptyIntList();
293 public com.google.protobuf.Descriptors.Descriptor
295 return com.google.ortools.sat.BooleanProblem.internal_static_operations_research_sat_BooleanAssignment_descriptor;
300 return com.google.ortools.sat.BooleanAssignment.getDefaultInstance();
307 throw newUninitializedMessageException(result);
315 if (bitField0_ != 0) { buildPartial0(result); }
320 private void buildPartial0(com.google.ortools.sat.BooleanAssignment result) {
321 int from_bitField0_ = bitField0_;
322 if (((from_bitField0_ & 0x00000001) != 0)) {
323 literals_.makeImmutable();
324 result.literals_ = literals_;
330 if (other instanceof com.google.ortools.sat.BooleanAssignment) {
331 return mergeFrom((com.google.ortools.sat.BooleanAssignment)other);
333 super.mergeFrom(other);
339 if (other == com.google.ortools.sat.BooleanAssignment.getDefaultInstance())
return this;
340 if (!other.literals_.isEmpty()) {
341 if (literals_.isEmpty()) {
342 literals_ = other.literals_;
343 literals_.makeImmutable();
344 bitField0_ |= 0x00000001;
346 ensureLiteralsIsMutable();
347 literals_.addAll(other.literals_);
351 this.mergeUnknownFields(other.getUnknownFields());
363 com.google.protobuf.CodedInputStream input,
364 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
365 throws java.io.IOException {
366 if (extensionRegistry ==
null) {
367 throw new java.lang.NullPointerException();
370 boolean done =
false;
372 int tag = input.readTag();
378 int v = input.readInt32();
379 ensureLiteralsIsMutable();
384 int length = input.readRawVarint32();
385 int limit = input.pushLimit(length);
386 ensureLiteralsIsMutable();
387 while (input.getBytesUntilLimit() > 0) {
388 literals_.addInt(input.readInt32());
390 input.popLimit(limit);
394 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
401 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
402 throw e.unwrapIOException();
408 private int bitField0_;
410 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
411 private void ensureLiteralsIsMutable() {
412 if (!literals_.isModifiable()) {
413 literals_ = makeMutableCopy(literals_);
415 bitField0_ |= 0x00000001;
421 public java.util.List<java.lang.Integer>
423 literals_.makeImmutable();
431 return literals_.size();
439 return literals_.getInt(index);
448 int index,
int value) {
450 ensureLiteralsIsMutable();
451 literals_.setInt(index, value);
452 bitField0_ |= 0x00000001;
463 ensureLiteralsIsMutable();
464 literals_.addInt(value);
465 bitField0_ |= 0x00000001;
475 java.lang.Iterable<? extends java.lang.Integer> values) {
476 ensureLiteralsIsMutable();
477 com.google.protobuf.AbstractMessageLite.Builder.addAll(
479 bitField0_ |= 0x00000001;
488 literals_ = emptyIntList();
489 bitField0_ = (bitField0_ & ~0x00000001);
500 DEFAULT_INSTANCE =
new com.google.ortools.sat.BooleanAssignment();
504 return DEFAULT_INSTANCE;
511 com.google.protobuf.CodedInputStream input,
512 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
513 throws com.google.protobuf.InvalidProtocolBufferException {
516 builder.mergeFrom(input, extensionRegistry);
517 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
518 throw e.setUnfinishedMessage(builder.buildPartial());
519 }
catch (com.google.protobuf.UninitializedMessageException e) {
520 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
521 }
catch (java.io.IOException e) {
522 throw new com.google.protobuf.InvalidProtocolBufferException(e)
523 .setUnfinishedMessage(builder.buildPartial());
525 return builder.buildPartial();
540 return DEFAULT_INSTANCE;