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