Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ArcLpValue.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/routes_support_graph.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.sat;
7
15@com.google.protobuf.Generated
16public final class ArcLpValue extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.sat.ArcLpValue)
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 ArcLpValue.class.getName());
29 }
30 // Use ArcLpValue.newBuilder() to construct.
31 private ArcLpValue(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private ArcLpValue() {
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.sat.RoutesSupportGraph.internal_static_operations_research_sat_ArcLpValue_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.sat.RoutesSupportGraph.internal_static_operations_research_sat_ArcLpValue_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.sat.ArcLpValue.class, com.google.ortools.sat.ArcLpValue.Builder.class);
48 }
49
50 private int bitField0_;
51 public static final int TAIL_FIELD_NUMBER = 1;
52 private int tail_ = 0;
57 @java.lang.Override
58 public boolean hasTail() {
59 return ((bitField0_ & 0x00000001) != 0);
60 }
61
65 @java.lang.Override
66 public int getTail() {
67 return tail_;
68 }
69
70 public static final int HEAD_FIELD_NUMBER = 2;
71 private int head_ = 0;
76 @java.lang.Override
77 public boolean hasHead() {
78 return ((bitField0_ & 0x00000002) != 0);
79 }
80
84 @java.lang.Override
85 public int getHead() {
86 return head_;
87 }
88
89 public static final int LP_VALUE_FIELD_NUMBER = 3;
90 private double lpValue_ = 0D;
95 @java.lang.Override
96 public boolean hasLpValue() {
97 return ((bitField0_ & 0x00000004) != 0);
98 }
99
103 @java.lang.Override
104 public double getLpValue() {
105 return lpValue_;
106 }
107
108 private byte memoizedIsInitialized = -1;
109 @java.lang.Override
110 public final boolean isInitialized() {
111 byte isInitialized = memoizedIsInitialized;
112 if (isInitialized == 1) return true;
113 if (isInitialized == 0) return false;
114
115 memoizedIsInitialized = 1;
116 return true;
117 }
118
119 @java.lang.Override
120 public void writeTo(com.google.protobuf.CodedOutputStream output)
121 throws java.io.IOException {
122 if (((bitField0_ & 0x00000001) != 0)) {
123 output.writeInt32(1, tail_);
124 }
125 if (((bitField0_ & 0x00000002) != 0)) {
126 output.writeInt32(2, head_);
127 }
128 if (((bitField0_ & 0x00000004) != 0)) {
129 output.writeDouble(3, lpValue_);
130 }
131 getUnknownFields().writeTo(output);
132 }
133
134 @java.lang.Override
135 public int getSerializedSize() {
136 int size = memoizedSize;
137 if (size != -1) return size;
138
139 size = 0;
140 if (((bitField0_ & 0x00000001) != 0)) {
141 size += com.google.protobuf.CodedOutputStream
142 .computeInt32Size(1, tail_);
143 }
144 if (((bitField0_ & 0x00000002) != 0)) {
145 size += com.google.protobuf.CodedOutputStream
146 .computeInt32Size(2, head_);
147 }
148 if (((bitField0_ & 0x00000004) != 0)) {
149 size += com.google.protobuf.CodedOutputStream
150 .computeDoubleSize(3, lpValue_);
151 }
152 size += getUnknownFields().getSerializedSize();
153 memoizedSize = size;
154 return size;
155 }
156
157 @java.lang.Override
158 public boolean equals(final java.lang.Object obj) {
159 if (obj == this) {
160 return true;
161 }
162 if (!(obj instanceof com.google.ortools.sat.ArcLpValue)) {
163 return super.equals(obj);
164 }
165 com.google.ortools.sat.ArcLpValue other = (com.google.ortools.sat.ArcLpValue) obj;
166
167 if (hasTail() != other.hasTail()) return false;
168 if (hasTail()) {
169 if (getTail()
170 != other.getTail()) return false;
171 }
172 if (hasHead() != other.hasHead()) return false;
173 if (hasHead()) {
174 if (getHead()
175 != other.getHead()) return false;
176 }
177 if (hasLpValue() != other.hasLpValue()) return false;
178 if (hasLpValue()) {
179 if (java.lang.Double.doubleToLongBits(getLpValue())
180 != java.lang.Double.doubleToLongBits(
181 other.getLpValue())) return false;
182 }
183 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
184 return true;
185 }
186
187 @java.lang.Override
188 public int hashCode() {
189 if (memoizedHashCode != 0) {
190 return memoizedHashCode;
191 }
192 int hash = 41;
193 hash = (19 * hash) + getDescriptor().hashCode();
194 if (hasTail()) {
195 hash = (37 * hash) + TAIL_FIELD_NUMBER;
196 hash = (53 * hash) + getTail();
197 }
198 if (hasHead()) {
199 hash = (37 * hash) + HEAD_FIELD_NUMBER;
200 hash = (53 * hash) + getHead();
201 }
202 if (hasLpValue()) {
203 hash = (37 * hash) + LP_VALUE_FIELD_NUMBER;
204 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
205 java.lang.Double.doubleToLongBits(getLpValue()));
206 }
207 hash = (29 * hash) + getUnknownFields().hashCode();
208 memoizedHashCode = hash;
209 return hash;
210 }
211
213 java.nio.ByteBuffer data)
214 throws com.google.protobuf.InvalidProtocolBufferException {
215 return PARSER.parseFrom(data);
216 }
218 java.nio.ByteBuffer data,
219 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
220 throws com.google.protobuf.InvalidProtocolBufferException {
221 return PARSER.parseFrom(data, extensionRegistry);
222 }
224 com.google.protobuf.ByteString data)
225 throws com.google.protobuf.InvalidProtocolBufferException {
226 return PARSER.parseFrom(data);
227 }
229 com.google.protobuf.ByteString data,
230 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
231 throws com.google.protobuf.InvalidProtocolBufferException {
232 return PARSER.parseFrom(data, extensionRegistry);
233 }
235 throws com.google.protobuf.InvalidProtocolBufferException {
236 return PARSER.parseFrom(data);
237 }
239 byte[] data,
240 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
241 throws com.google.protobuf.InvalidProtocolBufferException {
242 return PARSER.parseFrom(data, extensionRegistry);
243 }
244 public static com.google.ortools.sat.ArcLpValue parseFrom(java.io.InputStream input)
245 throws java.io.IOException {
246 return com.google.protobuf.GeneratedMessage
247 .parseWithIOException(PARSER, input);
248 }
250 java.io.InputStream input,
251 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
252 throws java.io.IOException {
253 return com.google.protobuf.GeneratedMessage
254 .parseWithIOException(PARSER, input, extensionRegistry);
255 }
256
257 public static com.google.ortools.sat.ArcLpValue parseDelimitedFrom(java.io.InputStream input)
258 throws java.io.IOException {
259 return com.google.protobuf.GeneratedMessage
260 .parseDelimitedWithIOException(PARSER, input);
261 }
262
264 java.io.InputStream input,
265 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
266 throws java.io.IOException {
267 return com.google.protobuf.GeneratedMessage
268 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
269 }
271 com.google.protobuf.CodedInputStream input)
272 throws java.io.IOException {
273 return com.google.protobuf.GeneratedMessage
274 .parseWithIOException(PARSER, input);
275 }
277 com.google.protobuf.CodedInputStream input,
278 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
279 throws java.io.IOException {
280 return com.google.protobuf.GeneratedMessage
281 .parseWithIOException(PARSER, input, extensionRegistry);
282 }
283
284 @java.lang.Override
285 public Builder newBuilderForType() { return newBuilder(); }
286 public static Builder newBuilder() {
287 return DEFAULT_INSTANCE.toBuilder();
288 }
289 public static Builder newBuilder(com.google.ortools.sat.ArcLpValue prototype) {
290 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
291 }
292 @java.lang.Override
294 return this == DEFAULT_INSTANCE
295 ? new Builder() : new Builder().mergeFrom(this);
296 }
297
298 @java.lang.Override
300 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
301 Builder builder = new Builder(parent);
302 return builder;
303 }
304
311 public static final class Builder extends
312 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
313 // @@protoc_insertion_point(builder_implements:operations_research.sat.ArcLpValue)
314 com.google.ortools.sat.ArcLpValueOrBuilder {
315 public static final com.google.protobuf.Descriptors.Descriptor
317 return com.google.ortools.sat.RoutesSupportGraph.internal_static_operations_research_sat_ArcLpValue_descriptor;
318 }
319
320 @java.lang.Override
321 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
323 return com.google.ortools.sat.RoutesSupportGraph.internal_static_operations_research_sat_ArcLpValue_fieldAccessorTable
324 .ensureFieldAccessorsInitialized(
325 com.google.ortools.sat.ArcLpValue.class, com.google.ortools.sat.ArcLpValue.Builder.class);
326 }
327
328 // Construct using com.google.ortools.sat.ArcLpValue.newBuilder()
329 private Builder() {
330
331 }
332
333 private Builder(
334 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
335 super(parent);
336
337 }
338 @java.lang.Override
339 public Builder clear() {
340 super.clear();
341 bitField0_ = 0;
342 tail_ = 0;
343 head_ = 0;
344 lpValue_ = 0D;
345 return this;
346 }
347
348 @java.lang.Override
349 public com.google.protobuf.Descriptors.Descriptor
351 return com.google.ortools.sat.RoutesSupportGraph.internal_static_operations_research_sat_ArcLpValue_descriptor;
352 }
353
354 @java.lang.Override
356 return com.google.ortools.sat.ArcLpValue.getDefaultInstance();
357 }
358
359 @java.lang.Override
362 if (!result.isInitialized()) {
363 throw newUninitializedMessageException(result);
364 }
365 return result;
366 }
367
368 @java.lang.Override
370 com.google.ortools.sat.ArcLpValue result = new com.google.ortools.sat.ArcLpValue(this);
371 if (bitField0_ != 0) { buildPartial0(result); }
372 onBuilt();
373 return result;
374 }
375
376 private void buildPartial0(com.google.ortools.sat.ArcLpValue result) {
377 int from_bitField0_ = bitField0_;
378 int to_bitField0_ = 0;
379 if (((from_bitField0_ & 0x00000001) != 0)) {
380 result.tail_ = tail_;
381 to_bitField0_ |= 0x00000001;
382 }
383 if (((from_bitField0_ & 0x00000002) != 0)) {
384 result.head_ = head_;
385 to_bitField0_ |= 0x00000002;
386 }
387 if (((from_bitField0_ & 0x00000004) != 0)) {
388 result.lpValue_ = lpValue_;
389 to_bitField0_ |= 0x00000004;
390 }
391 result.bitField0_ |= to_bitField0_;
392 }
393
394 @java.lang.Override
395 public Builder mergeFrom(com.google.protobuf.Message other) {
396 if (other instanceof com.google.ortools.sat.ArcLpValue) {
397 return mergeFrom((com.google.ortools.sat.ArcLpValue)other);
398 } else {
399 super.mergeFrom(other);
400 return this;
401 }
402 }
403
404 public Builder mergeFrom(com.google.ortools.sat.ArcLpValue other) {
405 if (other == com.google.ortools.sat.ArcLpValue.getDefaultInstance()) return this;
406 if (other.hasTail()) {
407 setTail(other.getTail());
408 }
409 if (other.hasHead()) {
410 setHead(other.getHead());
411 }
412 if (other.hasLpValue()) {
413 setLpValue(other.getLpValue());
414 }
415 this.mergeUnknownFields(other.getUnknownFields());
416 onChanged();
417 return this;
418 }
419
420 @java.lang.Override
421 public final boolean isInitialized() {
422 return true;
423 }
424
425 @java.lang.Override
426 public Builder mergeFrom(
427 com.google.protobuf.CodedInputStream input,
428 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429 throws java.io.IOException {
430 if (extensionRegistry == null) {
431 throw new java.lang.NullPointerException();
432 }
433 try {
434 boolean done = false;
435 while (!done) {
436 int tag = input.readTag();
437 switch (tag) {
438 case 0:
439 done = true;
440 break;
441 case 8: {
442 tail_ = input.readInt32();
443 bitField0_ |= 0x00000001;
444 break;
445 } // case 8
446 case 16: {
447 head_ = input.readInt32();
448 bitField0_ |= 0x00000002;
449 break;
450 } // case 16
451 case 25: {
452 lpValue_ = input.readDouble();
453 bitField0_ |= 0x00000004;
454 break;
455 } // case 25
456 default: {
457 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
458 done = true; // was an endgroup tag
459 }
460 break;
461 } // default:
462 } // switch (tag)
463 } // while (!done)
464 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
465 throw e.unwrapIOException();
466 } finally {
467 onChanged();
468 } // finally
469 return this;
470 }
471 private int bitField0_;
472
473 private int tail_ ;
478 @java.lang.Override
479 public boolean hasTail() {
480 return ((bitField0_ & 0x00000001) != 0);
481 }
482
486 @java.lang.Override
487 public int getTail() {
488 return tail_;
489 }
490
495 public Builder setTail(int value) {
496
497 tail_ = value;
498 bitField0_ |= 0x00000001;
499 onChanged();
500 return this;
501 }
502
506 public Builder clearTail() {
507 bitField0_ = (bitField0_ & ~0x00000001);
508 tail_ = 0;
509 onChanged();
510 return this;
511 }
512
513 private int head_ ;
518 @java.lang.Override
519 public boolean hasHead() {
520 return ((bitField0_ & 0x00000002) != 0);
521 }
522
526 @java.lang.Override
527 public int getHead() {
528 return head_;
529 }
530
535 public Builder setHead(int value) {
536
537 head_ = value;
538 bitField0_ |= 0x00000002;
539 onChanged();
540 return this;
541 }
542
546 public Builder clearHead() {
547 bitField0_ = (bitField0_ & ~0x00000002);
548 head_ = 0;
549 onChanged();
550 return this;
551 }
552
553 private double lpValue_ ;
558 @java.lang.Override
559 public boolean hasLpValue() {
560 return ((bitField0_ & 0x00000004) != 0);
561 }
562
566 @java.lang.Override
567 public double getLpValue() {
568 return lpValue_;
569 }
570
575 public Builder setLpValue(double value) {
576
577 lpValue_ = value;
578 bitField0_ |= 0x00000004;
579 onChanged();
580 return this;
581 }
582
586 public Builder clearLpValue() {
587 bitField0_ = (bitField0_ & ~0x00000004);
588 lpValue_ = 0D;
589 onChanged();
590 return this;
591 }
592
593 // @@protoc_insertion_point(builder_scope:operations_research.sat.ArcLpValue)
594 }
595
596 // @@protoc_insertion_point(class_scope:operations_research.sat.ArcLpValue)
597 private static final com.google.ortools.sat.ArcLpValue DEFAULT_INSTANCE;
598 static {
599 DEFAULT_INSTANCE = new com.google.ortools.sat.ArcLpValue();
600 }
601
603 return DEFAULT_INSTANCE;
604 }
605
606 private static final com.google.protobuf.Parser<ArcLpValue>
607 PARSER = new com.google.protobuf.AbstractParser<ArcLpValue>() {
608 @java.lang.Override
609 public ArcLpValue parsePartialFrom(
610 com.google.protobuf.CodedInputStream input,
611 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
612 throws com.google.protobuf.InvalidProtocolBufferException {
613 Builder builder = newBuilder();
614 try {
615 builder.mergeFrom(input, extensionRegistry);
616 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
617 throw e.setUnfinishedMessage(builder.buildPartial());
618 } catch (com.google.protobuf.UninitializedMessageException e) {
619 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
620 } catch (java.io.IOException e) {
621 throw new com.google.protobuf.InvalidProtocolBufferException(e)
622 .setUnfinishedMessage(builder.buildPartial());
623 }
624 return builder.buildPartial();
625 }
626 };
627
628 public static com.google.protobuf.Parser<ArcLpValue> parser() {
629 return PARSER;
630 }
631
632 @java.lang.Override
633 public com.google.protobuf.Parser<ArcLpValue> getParserForType() {
634 return PARSER;
635 }
636
637 @java.lang.Override
639 return DEFAULT_INSTANCE;
640 }
641
642}
643
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.sat.ArcLpValue buildPartial()
Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.sat.ArcLpValue build()
com.google.ortools.sat.ArcLpValue getDefaultInstanceForType()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.ortools.sat.ArcLpValue other)
static com.google.ortools.sat.ArcLpValue parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.ArcLpValue getDefaultInstance()
static com.google.ortools.sat.ArcLpValue parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final int LP_VALUE_FIELD_NUMBER
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
boolean equals(final java.lang.Object obj)
static com.google.ortools.sat.ArcLpValue parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.ArcLpValue parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.sat.ArcLpValue parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.sat.ArcLpValue prototype)
static com.google.ortools.sat.ArcLpValue parseDelimitedFrom(java.io.InputStream input)
static com.google.protobuf.Parser< ArcLpValue > parser()
static com.google.ortools.sat.ArcLpValue parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.sat.ArcLpValue parseFrom(byte[] data)
com.google.protobuf.Parser< ArcLpValue > getParserForType()
com.google.ortools.sat.ArcLpValue getDefaultInstanceForType()
static com.google.ortools.sat.ArcLpValue parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.sat.ArcLpValue parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.sat.ArcLpValue parseFrom(java.io.InputStream input)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.sat.ArcLpValue parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)