Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
BoolArgumentProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/sat/cp_model.proto
4// Protobuf Java Version: 4.29.3
5
6package com.google.ortools.sat;
7
15public final class BoolArgumentProto extends
16 com.google.protobuf.GeneratedMessage implements
17 // @@protoc_insertion_point(message_implements:operations_research.sat.BoolArgumentProto)
19private static final long serialVersionUID = 0L;
20 static {
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
23 /* major= */ 4,
24 /* minor= */ 29,
25 /* patch= */ 3,
26 /* suffix= */ "",
27 BoolArgumentProto.class.getName());
28 }
29 // Use BoolArgumentProto.newBuilder() to construct.
30 private BoolArgumentProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
31 super(builder);
32 }
33 private BoolArgumentProto() {
34 literals_ = emptyIntList();
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_BoolArgumentProto_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_BoolArgumentProto_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.sat.BoolArgumentProto.class, com.google.ortools.sat.BoolArgumentProto.Builder.class);
48 }
49
50 public static final int LITERALS_FIELD_NUMBER = 1;
51 @SuppressWarnings("serial")
52 private com.google.protobuf.Internal.IntList literals_ =
53 emptyIntList();
58 @java.lang.Override
59 public java.util.List<java.lang.Integer>
61 return literals_;
62 }
63
67 public int getLiteralsCount() {
68 return literals_.size();
69 }
70
75 public int getLiterals(int index) {
76 return literals_.getInt(index);
77 }
78 private int literalsMemoizedSerializedSize = -1;
79
80 private byte memoizedIsInitialized = -1;
81 @java.lang.Override
82 public final boolean isInitialized() {
83 byte isInitialized = memoizedIsInitialized;
84 if (isInitialized == 1) return true;
85 if (isInitialized == 0) return false;
86
87 memoizedIsInitialized = 1;
88 return true;
89 }
90
91 @java.lang.Override
92 public void writeTo(com.google.protobuf.CodedOutputStream output)
93 throws java.io.IOException {
95 if (getLiteralsList().size() > 0) {
96 output.writeUInt32NoTag(10);
97 output.writeUInt32NoTag(literalsMemoizedSerializedSize);
98 }
99 for (int i = 0; i < literals_.size(); i++) {
100 output.writeInt32NoTag(literals_.getInt(i));
101 }
102 getUnknownFields().writeTo(output);
103 }
104
105 @java.lang.Override
106 public int getSerializedSize() {
107 int size = memoizedSize;
108 if (size != -1) return size;
109
110 size = 0;
111 {
112 int dataSize = 0;
113 for (int i = 0; i < literals_.size(); i++) {
114 dataSize += com.google.protobuf.CodedOutputStream
115 .computeInt32SizeNoTag(literals_.getInt(i));
116 }
117 size += dataSize;
118 if (!getLiteralsList().isEmpty()) {
119 size += 1;
120 size += com.google.protobuf.CodedOutputStream
121 .computeInt32SizeNoTag(dataSize);
122 }
123 literalsMemoizedSerializedSize = dataSize;
124 }
125 size += getUnknownFields().getSerializedSize();
126 memoizedSize = size;
127 return size;
128 }
129
130 @java.lang.Override
131 public boolean equals(final java.lang.Object obj) {
132 if (obj == this) {
133 return true;
134 }
135 if (!(obj instanceof com.google.ortools.sat.BoolArgumentProto)) {
136 return super.equals(obj);
137 }
138 com.google.ortools.sat.BoolArgumentProto other = (com.google.ortools.sat.BoolArgumentProto) obj;
139
140 if (!getLiteralsList()
141 .equals(other.getLiteralsList())) return false;
142 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
143 return true;
144 }
145
146 @java.lang.Override
147 public int hashCode() {
148 if (memoizedHashCode != 0) {
149 return memoizedHashCode;
150 }
151 int hash = 41;
152 hash = (19 * hash) + getDescriptor().hashCode();
153 if (getLiteralsCount() > 0) {
154 hash = (37 * hash) + LITERALS_FIELD_NUMBER;
155 hash = (53 * hash) + getLiteralsList().hashCode();
156 }
157 hash = (29 * hash) + getUnknownFields().hashCode();
158 memoizedHashCode = hash;
159 return hash;
160 }
161
163 java.nio.ByteBuffer data)
164 throws com.google.protobuf.InvalidProtocolBufferException {
165 return PARSER.parseFrom(data);
166 }
168 java.nio.ByteBuffer data,
169 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
170 throws com.google.protobuf.InvalidProtocolBufferException {
171 return PARSER.parseFrom(data, extensionRegistry);
172 }
174 com.google.protobuf.ByteString data)
175 throws com.google.protobuf.InvalidProtocolBufferException {
176 return PARSER.parseFrom(data);
177 }
179 com.google.protobuf.ByteString data,
180 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
181 throws com.google.protobuf.InvalidProtocolBufferException {
182 return PARSER.parseFrom(data, extensionRegistry);
183 }
185 throws com.google.protobuf.InvalidProtocolBufferException {
186 return PARSER.parseFrom(data);
187 }
189 byte[] data,
190 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
191 throws com.google.protobuf.InvalidProtocolBufferException {
192 return PARSER.parseFrom(data, extensionRegistry);
193 }
194 public static com.google.ortools.sat.BoolArgumentProto parseFrom(java.io.InputStream input)
195 throws java.io.IOException {
196 return com.google.protobuf.GeneratedMessage
197 .parseWithIOException(PARSER, input);
198 }
200 java.io.InputStream input,
201 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
202 throws java.io.IOException {
203 return com.google.protobuf.GeneratedMessage
204 .parseWithIOException(PARSER, input, extensionRegistry);
205 }
206
207 public static com.google.ortools.sat.BoolArgumentProto parseDelimitedFrom(java.io.InputStream input)
208 throws java.io.IOException {
209 return com.google.protobuf.GeneratedMessage
210 .parseDelimitedWithIOException(PARSER, input);
211 }
212
214 java.io.InputStream input,
215 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
216 throws java.io.IOException {
217 return com.google.protobuf.GeneratedMessage
218 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
219 }
221 com.google.protobuf.CodedInputStream input)
222 throws java.io.IOException {
223 return com.google.protobuf.GeneratedMessage
224 .parseWithIOException(PARSER, input);
225 }
227 com.google.protobuf.CodedInputStream input,
228 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
229 throws java.io.IOException {
230 return com.google.protobuf.GeneratedMessage
231 .parseWithIOException(PARSER, input, extensionRegistry);
232 }
233
234 @java.lang.Override
235 public Builder newBuilderForType() { return newBuilder(); }
236 public static Builder newBuilder() {
237 return DEFAULT_INSTANCE.toBuilder();
238 }
239 public static Builder newBuilder(com.google.ortools.sat.BoolArgumentProto prototype) {
240 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
241 }
242 @java.lang.Override
244 return this == DEFAULT_INSTANCE
245 ? new Builder() : new Builder().mergeFrom(this);
246 }
247
248 @java.lang.Override
250 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
251 Builder builder = new Builder(parent);
252 return builder;
253 }
254
261 public static final class Builder extends
262 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
263 // @@protoc_insertion_point(builder_implements:operations_research.sat.BoolArgumentProto)
265 public static final com.google.protobuf.Descriptors.Descriptor
267 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_BoolArgumentProto_descriptor;
268 }
269
270 @java.lang.Override
271 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
273 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_BoolArgumentProto_fieldAccessorTable
274 .ensureFieldAccessorsInitialized(
275 com.google.ortools.sat.BoolArgumentProto.class, com.google.ortools.sat.BoolArgumentProto.Builder.class);
276 }
277
278 // Construct using com.google.ortools.sat.BoolArgumentProto.newBuilder()
279 private Builder() {
280
281 }
282
283 private Builder(
284 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
285 super(parent);
286
287 }
288 @java.lang.Override
289 public Builder clear() {
290 super.clear();
291 bitField0_ = 0;
292 literals_ = emptyIntList();
293 return this;
294 }
295
296 @java.lang.Override
297 public com.google.protobuf.Descriptors.Descriptor
299 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_BoolArgumentProto_descriptor;
300 }
301
302 @java.lang.Override
304 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
305 }
306
307 @java.lang.Override
310 if (!result.isInitialized()) {
311 throw newUninitializedMessageException(result);
312 }
313 return result;
314 }
315
316 @java.lang.Override
318 com.google.ortools.sat.BoolArgumentProto result = new com.google.ortools.sat.BoolArgumentProto(this);
319 if (bitField0_ != 0) { buildPartial0(result); }
320 onBuilt();
321 return result;
322 }
323
324 private void buildPartial0(com.google.ortools.sat.BoolArgumentProto result) {
325 int from_bitField0_ = bitField0_;
326 if (((from_bitField0_ & 0x00000001) != 0)) {
327 literals_.makeImmutable();
328 result.literals_ = literals_;
329 }
330 }
331
332 @java.lang.Override
333 public Builder mergeFrom(com.google.protobuf.Message other) {
334 if (other instanceof com.google.ortools.sat.BoolArgumentProto) {
335 return mergeFrom((com.google.ortools.sat.BoolArgumentProto)other);
336 } else {
337 super.mergeFrom(other);
338 return this;
339 }
340 }
341
342 public Builder mergeFrom(com.google.ortools.sat.BoolArgumentProto other) {
343 if (other == com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) return this;
344 if (!other.literals_.isEmpty()) {
345 if (literals_.isEmpty()) {
346 literals_ = other.literals_;
347 literals_.makeImmutable();
348 bitField0_ |= 0x00000001;
349 } else {
350 ensureLiteralsIsMutable();
351 literals_.addAll(other.literals_);
352 }
353 onChanged();
354 }
355 this.mergeUnknownFields(other.getUnknownFields());
356 onChanged();
357 return this;
358 }
359
360 @java.lang.Override
361 public final boolean isInitialized() {
362 return true;
363 }
364
365 @java.lang.Override
366 public Builder mergeFrom(
367 com.google.protobuf.CodedInputStream input,
368 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
369 throws java.io.IOException {
370 if (extensionRegistry == null) {
371 throw new java.lang.NullPointerException();
372 }
373 try {
374 boolean done = false;
375 while (!done) {
376 int tag = input.readTag();
377 switch (tag) {
378 case 0:
379 done = true;
380 break;
381 case 8: {
382 int v = input.readInt32();
383 ensureLiteralsIsMutable();
384 literals_.addInt(v);
385 break;
386 } // case 8
387 case 10: {
388 int length = input.readRawVarint32();
389 int limit = input.pushLimit(length);
390 ensureLiteralsIsMutable();
391 while (input.getBytesUntilLimit() > 0) {
392 literals_.addInt(input.readInt32());
393 }
394 input.popLimit(limit);
395 break;
396 } // case 10
397 default: {
398 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
399 done = true; // was an endgroup tag
400 }
401 break;
402 } // default:
403 } // switch (tag)
404 } // while (!done)
405 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
406 throw e.unwrapIOException();
407 } finally {
408 onChanged();
409 } // finally
410 return this;
411 }
412 private int bitField0_;
413
414 private com.google.protobuf.Internal.IntList literals_ = emptyIntList();
415 private void ensureLiteralsIsMutable() {
416 if (!literals_.isModifiable()) {
417 literals_ = makeMutableCopy(literals_);
418 }
419 bitField0_ |= 0x00000001;
420 }
425 public java.util.List<java.lang.Integer>
427 literals_.makeImmutable();
428 return literals_;
429 }
430
434 public int getLiteralsCount() {
435 return literals_.size();
436 }
437
442 public int getLiterals(int index) {
443 return literals_.getInt(index);
444 }
445
451 public Builder setLiterals(
452 int index, int value) {
453
454 ensureLiteralsIsMutable();
455 literals_.setInt(index, value);
456 bitField0_ |= 0x00000001;
457 onChanged();
458 return this;
459 }
460
465 public Builder addLiterals(int value) {
466
467 ensureLiteralsIsMutable();
468 literals_.addInt(value);
469 bitField0_ |= 0x00000001;
470 onChanged();
471 return this;
472 }
473
478 public Builder addAllLiterals(
479 java.lang.Iterable<? extends java.lang.Integer> values) {
480 ensureLiteralsIsMutable();
481 com.google.protobuf.AbstractMessageLite.Builder.addAll(
482 values, literals_);
483 bitField0_ |= 0x00000001;
484 onChanged();
485 return this;
486 }
487
491 public Builder clearLiterals() {
492 literals_ = emptyIntList();
493 bitField0_ = (bitField0_ & ~0x00000001);
494 onChanged();
495 return this;
496 }
497
498 // @@protoc_insertion_point(builder_scope:operations_research.sat.BoolArgumentProto)
499 }
500
501 // @@protoc_insertion_point(class_scope:operations_research.sat.BoolArgumentProto)
502 private static final com.google.ortools.sat.BoolArgumentProto DEFAULT_INSTANCE;
503 static {
504 DEFAULT_INSTANCE = new com.google.ortools.sat.BoolArgumentProto();
505 }
506
508 return DEFAULT_INSTANCE;
509 }
510
511 private static final com.google.protobuf.Parser<BoolArgumentProto>
512 PARSER = new com.google.protobuf.AbstractParser<BoolArgumentProto>() {
513 @java.lang.Override
514 public BoolArgumentProto parsePartialFrom(
515 com.google.protobuf.CodedInputStream input,
516 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
517 throws com.google.protobuf.InvalidProtocolBufferException {
518 Builder builder = newBuilder();
519 try {
520 builder.mergeFrom(input, extensionRegistry);
521 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
522 throw e.setUnfinishedMessage(builder.buildPartial());
523 } catch (com.google.protobuf.UninitializedMessageException e) {
524 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
525 } catch (java.io.IOException e) {
526 throw new com.google.protobuf.InvalidProtocolBufferException(e)
527 .setUnfinishedMessage(builder.buildPartial());
528 }
529 return builder.buildPartial();
530 }
531 };
532
533 public static com.google.protobuf.Parser<BoolArgumentProto> parser() {
534 return PARSER;
535 }
536
537 @java.lang.Override
538 public com.google.protobuf.Parser<BoolArgumentProto> getParserForType() {
539 return PARSER;
540 }
541
542 @java.lang.Override
544 return DEFAULT_INSTANCE;
545 }
546
547}
548
com.google.ortools.sat.BoolArgumentProto getDefaultInstanceForType()
java.util.List< java.lang.Integer > getLiteralsList()
Builder mergeFrom(com.google.protobuf.Message other)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.BoolArgumentProto build()
Builder mergeFrom(com.google.ortools.sat.BoolArgumentProto other)
com.google.ortools.sat.BoolArgumentProto buildPartial()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder addAllLiterals(java.lang.Iterable<? extends java.lang.Integer > values)
static com.google.ortools.sat.BoolArgumentProto getDefaultInstance()
static com.google.ortools.sat.BoolArgumentProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
java.util.List< java.lang.Integer > getLiteralsList()
static com.google.ortools.sat.BoolArgumentProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.sat.BoolArgumentProto parseFrom(java.nio.ByteBuffer data)
static com.google.protobuf.Parser< BoolArgumentProto > parser()
boolean equals(final java.lang.Object obj)
com.google.protobuf.Parser< BoolArgumentProto > getParserForType()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.sat.BoolArgumentProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.BoolArgumentProto getDefaultInstanceForType()
static com.google.ortools.sat.BoolArgumentProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.sat.BoolArgumentProto prototype)
static com.google.ortools.sat.BoolArgumentProto parseFrom(byte[] data)
static com.google.ortools.sat.BoolArgumentProto parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.sat.BoolArgumentProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.BoolArgumentProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.BoolArgumentProto parseFrom(com.google.protobuf.CodedInputStream input)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.sat.BoolArgumentProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.sat.BoolArgumentProto parseFrom(java.io.InputStream input)