Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
RuinStrategy.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/constraint_solver/routing_ils.proto
4// Protobuf Java Version: 4.29.3
5
6package com.google.ortools.constraintsolver;
7
15public final class RuinStrategy extends
16 com.google.protobuf.GeneratedMessage implements
17 // @@protoc_insertion_point(message_implements:operations_research.RuinStrategy)
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 RuinStrategy.class.getName());
28 }
29 // Use RuinStrategy.newBuilder() to construct.
30 private RuinStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
31 super(builder);
32 }
33 private RuinStrategy() {
34 }
35
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
39 }
40
41 @java.lang.Override
42 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
44 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.constraintsolver.RuinStrategy.class, com.google.ortools.constraintsolver.RuinStrategy.Builder.class);
47 }
48
49 private int strategyCase_ = 0;
50 @SuppressWarnings("serial")
51 private java.lang.Object strategy_;
52 public enum StrategyCase
53 implements com.google.protobuf.Internal.EnumLite,
54 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
57 SISR(3),
59 private final int value;
60 private StrategyCase(int value) {
61 this.value = value;
62 }
68 @java.lang.Deprecated
69 public static StrategyCase valueOf(int value) {
70 return forNumber(value);
71 }
72
73 public static StrategyCase forNumber(int value) {
74 switch (value) {
75 case 1: return SPATIALLY_CLOSE_ROUTES;
76 case 2: return RANDOM_WALK;
77 case 3: return SISR;
78 case 0: return STRATEGY_NOT_SET;
79 default: return null;
80 }
81 }
82 public int getNumber() {
83 return this.value;
84 }
85 };
86
87 public StrategyCase
90 strategyCase_);
91 }
92
93 public static final int SPATIALLY_CLOSE_ROUTES_FIELD_NUMBER = 1;
98 @java.lang.Override
99 public boolean hasSpatiallyCloseRoutes() {
100 return strategyCase_ == 1;
101 }
102
106 @java.lang.Override
108 if (strategyCase_ == 1) {
109 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
110 }
111 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
112 }
113
116 @java.lang.Override
118 if (strategyCase_ == 1) {
119 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
120 }
121 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
122 }
123
124 public static final int RANDOM_WALK_FIELD_NUMBER = 2;
129 @java.lang.Override
130 public boolean hasRandomWalk() {
131 return strategyCase_ == 2;
132 }
133
137 @java.lang.Override
139 if (strategyCase_ == 2) {
140 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
141 }
142 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
143 }
144
147 @java.lang.Override
149 if (strategyCase_ == 2) {
150 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
151 }
152 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
153 }
154
155 public static final int SISR_FIELD_NUMBER = 3;
160 @java.lang.Override
161 public boolean hasSisr() {
162 return strategyCase_ == 3;
163 }
164
168 @java.lang.Override
170 if (strategyCase_ == 3) {
171 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
172 }
173 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
174 }
175
178 @java.lang.Override
180 if (strategyCase_ == 3) {
181 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
182 }
183 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
184 }
185
186 private byte memoizedIsInitialized = -1;
187 @java.lang.Override
188 public final boolean isInitialized() {
189 byte isInitialized = memoizedIsInitialized;
190 if (isInitialized == 1) return true;
191 if (isInitialized == 0) return false;
192
193 memoizedIsInitialized = 1;
194 return true;
195 }
196
197 @java.lang.Override
198 public void writeTo(com.google.protobuf.CodedOutputStream output)
199 throws java.io.IOException {
200 if (strategyCase_ == 1) {
201 output.writeMessage(1, (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_);
202 }
203 if (strategyCase_ == 2) {
204 output.writeMessage(2, (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_);
205 }
206 if (strategyCase_ == 3) {
207 output.writeMessage(3, (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_);
208 }
209 getUnknownFields().writeTo(output);
210 }
211
212 @java.lang.Override
213 public int getSerializedSize() {
214 int size = memoizedSize;
215 if (size != -1) return size;
216
217 size = 0;
218 if (strategyCase_ == 1) {
219 size += com.google.protobuf.CodedOutputStream
220 .computeMessageSize(1, (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_);
221 }
222 if (strategyCase_ == 2) {
223 size += com.google.protobuf.CodedOutputStream
224 .computeMessageSize(2, (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_);
225 }
226 if (strategyCase_ == 3) {
227 size += com.google.protobuf.CodedOutputStream
228 .computeMessageSize(3, (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_);
229 }
230 size += getUnknownFields().getSerializedSize();
231 memoizedSize = size;
232 return size;
233 }
234
235 @java.lang.Override
236 public boolean equals(final java.lang.Object obj) {
237 if (obj == this) {
238 return true;
239 }
240 if (!(obj instanceof com.google.ortools.constraintsolver.RuinStrategy)) {
241 return super.equals(obj);
242 }
243 com.google.ortools.constraintsolver.RuinStrategy other = (com.google.ortools.constraintsolver.RuinStrategy) obj;
244
245 if (!getStrategyCase().equals(other.getStrategyCase())) return false;
246 switch (strategyCase_) {
247 case 1:
249 .equals(other.getSpatiallyCloseRoutes())) return false;
250 break;
251 case 2:
252 if (!getRandomWalk()
253 .equals(other.getRandomWalk())) return false;
254 break;
255 case 3:
256 if (!getSisr()
257 .equals(other.getSisr())) return false;
258 break;
259 case 0:
260 default:
261 }
262 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
263 return true;
264 }
265
266 @java.lang.Override
267 public int hashCode() {
268 if (memoizedHashCode != 0) {
269 return memoizedHashCode;
270 }
271 int hash = 41;
272 hash = (19 * hash) + getDescriptor().hashCode();
273 switch (strategyCase_) {
274 case 1:
275 hash = (37 * hash) + SPATIALLY_CLOSE_ROUTES_FIELD_NUMBER;
276 hash = (53 * hash) + getSpatiallyCloseRoutes().hashCode();
277 break;
278 case 2:
279 hash = (37 * hash) + RANDOM_WALK_FIELD_NUMBER;
280 hash = (53 * hash) + getRandomWalk().hashCode();
281 break;
282 case 3:
283 hash = (37 * hash) + SISR_FIELD_NUMBER;
284 hash = (53 * hash) + getSisr().hashCode();
285 break;
286 case 0:
287 default:
288 }
289 hash = (29 * hash) + getUnknownFields().hashCode();
290 memoizedHashCode = hash;
291 return hash;
292 }
293
295 java.nio.ByteBuffer data)
296 throws com.google.protobuf.InvalidProtocolBufferException {
297 return PARSER.parseFrom(data);
298 }
300 java.nio.ByteBuffer data,
301 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
302 throws com.google.protobuf.InvalidProtocolBufferException {
303 return PARSER.parseFrom(data, extensionRegistry);
304 }
306 com.google.protobuf.ByteString data)
307 throws com.google.protobuf.InvalidProtocolBufferException {
308 return PARSER.parseFrom(data);
309 }
311 com.google.protobuf.ByteString data,
312 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
313 throws com.google.protobuf.InvalidProtocolBufferException {
314 return PARSER.parseFrom(data, extensionRegistry);
315 }
317 throws com.google.protobuf.InvalidProtocolBufferException {
318 return PARSER.parseFrom(data);
319 }
321 byte[] data,
322 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
323 throws com.google.protobuf.InvalidProtocolBufferException {
324 return PARSER.parseFrom(data, extensionRegistry);
325 }
326 public static com.google.ortools.constraintsolver.RuinStrategy parseFrom(java.io.InputStream input)
327 throws java.io.IOException {
328 return com.google.protobuf.GeneratedMessage
329 .parseWithIOException(PARSER, input);
330 }
332 java.io.InputStream input,
333 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
334 throws java.io.IOException {
335 return com.google.protobuf.GeneratedMessage
336 .parseWithIOException(PARSER, input, extensionRegistry);
337 }
338
340 throws java.io.IOException {
341 return com.google.protobuf.GeneratedMessage
342 .parseDelimitedWithIOException(PARSER, input);
343 }
344
346 java.io.InputStream input,
347 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
348 throws java.io.IOException {
349 return com.google.protobuf.GeneratedMessage
350 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
351 }
353 com.google.protobuf.CodedInputStream input)
354 throws java.io.IOException {
355 return com.google.protobuf.GeneratedMessage
356 .parseWithIOException(PARSER, input);
357 }
359 com.google.protobuf.CodedInputStream input,
360 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
361 throws java.io.IOException {
362 return com.google.protobuf.GeneratedMessage
363 .parseWithIOException(PARSER, input, extensionRegistry);
364 }
365
366 @java.lang.Override
367 public Builder newBuilderForType() { return newBuilder(); }
368 public static Builder newBuilder() {
369 return DEFAULT_INSTANCE.toBuilder();
370 }
371 public static Builder newBuilder(com.google.ortools.constraintsolver.RuinStrategy prototype) {
372 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
373 }
374 @java.lang.Override
376 return this == DEFAULT_INSTANCE
377 ? new Builder() : new Builder().mergeFrom(this);
378 }
379
380 @java.lang.Override
382 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
383 Builder builder = new Builder(parent);
384 return builder;
385 }
386
393 public static final class Builder extends
394 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
395 // @@protoc_insertion_point(builder_implements:operations_research.RuinStrategy)
397 public static final com.google.protobuf.Descriptors.Descriptor
399 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
400 }
401
402 @java.lang.Override
403 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
405 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_fieldAccessorTable
406 .ensureFieldAccessorsInitialized(
407 com.google.ortools.constraintsolver.RuinStrategy.class, com.google.ortools.constraintsolver.RuinStrategy.Builder.class);
408 }
409
410 // Construct using com.google.ortools.constraintsolver.RuinStrategy.newBuilder()
411 private Builder() {
412
413 }
414
415 private Builder(
416 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
417 super(parent);
418
419 }
420 @java.lang.Override
421 public Builder clear() {
422 super.clear();
423 bitField0_ = 0;
424 if (spatiallyCloseRoutesBuilder_ != null) {
425 spatiallyCloseRoutesBuilder_.clear();
426 }
427 if (randomWalkBuilder_ != null) {
428 randomWalkBuilder_.clear();
429 }
430 if (sisrBuilder_ != null) {
431 sisrBuilder_.clear();
432 }
433 strategyCase_ = 0;
434 strategy_ = null;
435 return this;
436 }
437
438 @java.lang.Override
439 public com.google.protobuf.Descriptors.Descriptor
441 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
442 }
443
444 @java.lang.Override
446 return com.google.ortools.constraintsolver.RuinStrategy.getDefaultInstance();
447 }
448
449 @java.lang.Override
452 if (!result.isInitialized()) {
453 throw newUninitializedMessageException(result);
454 }
455 return result;
456 }
457
458 @java.lang.Override
460 com.google.ortools.constraintsolver.RuinStrategy result = new com.google.ortools.constraintsolver.RuinStrategy(this);
461 if (bitField0_ != 0) { buildPartial0(result); }
462 buildPartialOneofs(result);
463 onBuilt();
464 return result;
465 }
466
467 private void buildPartial0(com.google.ortools.constraintsolver.RuinStrategy result) {
468 int from_bitField0_ = bitField0_;
469 }
470
471 private void buildPartialOneofs(com.google.ortools.constraintsolver.RuinStrategy result) {
472 result.strategyCase_ = strategyCase_;
473 result.strategy_ = this.strategy_;
474 if (strategyCase_ == 1 &&
475 spatiallyCloseRoutesBuilder_ != null) {
476 result.strategy_ = spatiallyCloseRoutesBuilder_.build();
477 }
478 if (strategyCase_ == 2 &&
479 randomWalkBuilder_ != null) {
480 result.strategy_ = randomWalkBuilder_.build();
481 }
482 if (strategyCase_ == 3 &&
483 sisrBuilder_ != null) {
484 result.strategy_ = sisrBuilder_.build();
485 }
486 }
487
488 @java.lang.Override
489 public Builder mergeFrom(com.google.protobuf.Message other) {
490 if (other instanceof com.google.ortools.constraintsolver.RuinStrategy) {
491 return mergeFrom((com.google.ortools.constraintsolver.RuinStrategy)other);
492 } else {
493 super.mergeFrom(other);
494 return this;
495 }
496 }
497
498 public Builder mergeFrom(com.google.ortools.constraintsolver.RuinStrategy other) {
499 if (other == com.google.ortools.constraintsolver.RuinStrategy.getDefaultInstance()) return this;
500 switch (other.getStrategyCase()) {
501 case SPATIALLY_CLOSE_ROUTES: {
502 mergeSpatiallyCloseRoutes(other.getSpatiallyCloseRoutes());
503 break;
504 }
505 case RANDOM_WALK: {
506 mergeRandomWalk(other.getRandomWalk());
507 break;
508 }
509 case SISR: {
510 mergeSisr(other.getSisr());
511 break;
512 }
513 case STRATEGY_NOT_SET: {
514 break;
515 }
516 }
517 this.mergeUnknownFields(other.getUnknownFields());
518 onChanged();
519 return this;
520 }
521
522 @java.lang.Override
523 public final boolean isInitialized() {
524 return true;
525 }
526
527 @java.lang.Override
528 public Builder mergeFrom(
529 com.google.protobuf.CodedInputStream input,
530 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
531 throws java.io.IOException {
532 if (extensionRegistry == null) {
533 throw new java.lang.NullPointerException();
534 }
535 try {
536 boolean done = false;
537 while (!done) {
538 int tag = input.readTag();
539 switch (tag) {
540 case 0:
541 done = true;
542 break;
543 case 10: {
544 input.readMessage(
545 getSpatiallyCloseRoutesFieldBuilder().getBuilder(),
546 extensionRegistry);
547 strategyCase_ = 1;
548 break;
549 } // case 10
550 case 18: {
551 input.readMessage(
552 getRandomWalkFieldBuilder().getBuilder(),
553 extensionRegistry);
554 strategyCase_ = 2;
555 break;
556 } // case 18
557 case 26: {
558 input.readMessage(
559 getSisrFieldBuilder().getBuilder(),
560 extensionRegistry);
561 strategyCase_ = 3;
562 break;
563 } // case 26
564 default: {
565 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
566 done = true; // was an endgroup tag
567 }
568 break;
569 } // default:
570 } // switch (tag)
571 } // while (!done)
572 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
573 throw e.unwrapIOException();
574 } finally {
575 onChanged();
576 } // finally
577 return this;
578 }
579 private int strategyCase_ = 0;
580 private java.lang.Object strategy_;
581 public StrategyCase
583 return StrategyCase.forNumber(
584 strategyCase_);
585 }
586
587 public Builder clearStrategy() {
588 strategyCase_ = 0;
589 strategy_ = null;
590 onChanged();
591 return this;
592 }
593
594 private int bitField0_;
595
596 private com.google.protobuf.SingleFieldBuilder<
597 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder> spatiallyCloseRoutesBuilder_;
602 @java.lang.Override
603 public boolean hasSpatiallyCloseRoutes() {
604 return strategyCase_ == 1;
605 }
606
610 @java.lang.Override
612 if (spatiallyCloseRoutesBuilder_ == null) {
613 if (strategyCase_ == 1) {
614 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
615 }
616 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
617 } else {
618 if (strategyCase_ == 1) {
619 return spatiallyCloseRoutesBuilder_.getMessage();
620 }
621 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
622 }
623 }
624
627 public Builder setSpatiallyCloseRoutes(com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy value) {
628 if (spatiallyCloseRoutesBuilder_ == null) {
629 if (value == null) {
630 throw new NullPointerException();
631 }
632 strategy_ = value;
633 onChanged();
634 } else {
635 spatiallyCloseRoutesBuilder_.setMessage(value);
636 }
637 strategyCase_ = 1;
638 return this;
639 }
640
644 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder builderForValue) {
645 if (spatiallyCloseRoutesBuilder_ == null) {
646 strategy_ = builderForValue.build();
647 onChanged();
648 } else {
649 spatiallyCloseRoutesBuilder_.setMessage(builderForValue.build());
650 }
651 strategyCase_ = 1;
652 return this;
653 }
654
657 public Builder mergeSpatiallyCloseRoutes(com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy value) {
658 if (spatiallyCloseRoutesBuilder_ == null) {
659 if (strategyCase_ == 1 &&
660 strategy_ != com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance()) {
661 strategy_ = com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.newBuilder((com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_)
662 .mergeFrom(value).buildPartial();
663 } else {
664 strategy_ = value;
665 }
666 onChanged();
667 } else {
668 if (strategyCase_ == 1) {
669 spatiallyCloseRoutesBuilder_.mergeFrom(value);
670 } else {
671 spatiallyCloseRoutesBuilder_.setMessage(value);
672 }
673 }
674 strategyCase_ = 1;
675 return this;
676 }
677
680 public Builder clearSpatiallyCloseRoutes() {
681 if (spatiallyCloseRoutesBuilder_ == null) {
682 if (strategyCase_ == 1) {
683 strategyCase_ = 0;
684 strategy_ = null;
685 onChanged();
686 }
687 } else {
688 if (strategyCase_ == 1) {
689 strategyCase_ = 0;
690 strategy_ = null;
691 }
692 spatiallyCloseRoutesBuilder_.clear();
693 }
694 return this;
695 }
696
700 return getSpatiallyCloseRoutesFieldBuilder().getBuilder();
701 }
702
705 @java.lang.Override
707 if ((strategyCase_ == 1) && (spatiallyCloseRoutesBuilder_ != null)) {
708 return spatiallyCloseRoutesBuilder_.getMessageOrBuilder();
709 } else {
710 if (strategyCase_ == 1) {
711 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
712 }
713 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
714 }
715 }
716
719 private com.google.protobuf.SingleFieldBuilder<
720 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder>
721 getSpatiallyCloseRoutesFieldBuilder() {
722 if (spatiallyCloseRoutesBuilder_ == null) {
723 if (!(strategyCase_ == 1)) {
724 strategy_ = com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
725 }
726 spatiallyCloseRoutesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
727 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder>(
728 (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_,
729 getParentForChildren(),
730 isClean());
731 strategy_ = null;
732 }
733 strategyCase_ = 1;
734 onChanged();
735 return spatiallyCloseRoutesBuilder_;
736 }
737
738 private com.google.protobuf.SingleFieldBuilder<
739 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder> randomWalkBuilder_;
744 @java.lang.Override
745 public boolean hasRandomWalk() {
746 return strategyCase_ == 2;
747 }
748
752 @java.lang.Override
754 if (randomWalkBuilder_ == null) {
755 if (strategyCase_ == 2) {
756 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
757 }
758 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
759 } else {
760 if (strategyCase_ == 2) {
761 return randomWalkBuilder_.getMessage();
762 }
763 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
764 }
765 }
766
769 public Builder setRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value) {
770 if (randomWalkBuilder_ == null) {
771 if (value == null) {
772 throw new NullPointerException();
773 }
774 strategy_ = value;
775 onChanged();
776 } else {
777 randomWalkBuilder_.setMessage(value);
778 }
779 strategyCase_ = 2;
780 return this;
781 }
782
785 public Builder setRandomWalk(
786 com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder builderForValue) {
787 if (randomWalkBuilder_ == null) {
788 strategy_ = builderForValue.build();
789 onChanged();
790 } else {
791 randomWalkBuilder_.setMessage(builderForValue.build());
792 }
793 strategyCase_ = 2;
794 return this;
795 }
796
799 public Builder mergeRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value) {
800 if (randomWalkBuilder_ == null) {
801 if (strategyCase_ == 2 &&
802 strategy_ != com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance()) {
803 strategy_ = com.google.ortools.constraintsolver.RandomWalkRuinStrategy.newBuilder((com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_)
804 .mergeFrom(value).buildPartial();
805 } else {
806 strategy_ = value;
807 }
808 onChanged();
809 } else {
810 if (strategyCase_ == 2) {
811 randomWalkBuilder_.mergeFrom(value);
812 } else {
813 randomWalkBuilder_.setMessage(value);
814 }
815 }
816 strategyCase_ = 2;
817 return this;
818 }
819
822 public Builder clearRandomWalk() {
823 if (randomWalkBuilder_ == null) {
824 if (strategyCase_ == 2) {
825 strategyCase_ = 0;
826 strategy_ = null;
827 onChanged();
828 }
829 } else {
830 if (strategyCase_ == 2) {
831 strategyCase_ = 0;
832 strategy_ = null;
833 }
834 randomWalkBuilder_.clear();
835 }
836 return this;
837 }
838
842 return getRandomWalkFieldBuilder().getBuilder();
843 }
844
847 @java.lang.Override
849 if ((strategyCase_ == 2) && (randomWalkBuilder_ != null)) {
850 return randomWalkBuilder_.getMessageOrBuilder();
851 } else {
852 if (strategyCase_ == 2) {
853 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
854 }
855 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
856 }
857 }
858
861 private com.google.protobuf.SingleFieldBuilder<
862 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder>
863 getRandomWalkFieldBuilder() {
864 if (randomWalkBuilder_ == null) {
865 if (!(strategyCase_ == 2)) {
866 strategy_ = com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
867 }
868 randomWalkBuilder_ = new com.google.protobuf.SingleFieldBuilder<
869 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder>(
870 (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_,
871 getParentForChildren(),
872 isClean());
873 strategy_ = null;
874 }
875 strategyCase_ = 2;
876 onChanged();
877 return randomWalkBuilder_;
878 }
879
880 private com.google.protobuf.SingleFieldBuilder<
881 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder> sisrBuilder_;
886 @java.lang.Override
887 public boolean hasSisr() {
888 return strategyCase_ == 3;
889 }
890
894 @java.lang.Override
896 if (sisrBuilder_ == null) {
897 if (strategyCase_ == 3) {
898 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
899 }
900 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
901 } else {
902 if (strategyCase_ == 3) {
903 return sisrBuilder_.getMessage();
904 }
905 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
906 }
907 }
908
911 public Builder setSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value) {
912 if (sisrBuilder_ == null) {
913 if (value == null) {
914 throw new NullPointerException();
915 }
916 strategy_ = value;
917 onChanged();
918 } else {
919 sisrBuilder_.setMessage(value);
920 }
921 strategyCase_ = 3;
922 return this;
923 }
924
927 public Builder setSisr(
928 com.google.ortools.constraintsolver.SISRRuinStrategy.Builder builderForValue) {
929 if (sisrBuilder_ == null) {
930 strategy_ = builderForValue.build();
931 onChanged();
932 } else {
933 sisrBuilder_.setMessage(builderForValue.build());
934 }
935 strategyCase_ = 3;
936 return this;
937 }
938
941 public Builder mergeSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value) {
942 if (sisrBuilder_ == null) {
943 if (strategyCase_ == 3 &&
944 strategy_ != com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance()) {
945 strategy_ = com.google.ortools.constraintsolver.SISRRuinStrategy.newBuilder((com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_)
946 .mergeFrom(value).buildPartial();
947 } else {
948 strategy_ = value;
949 }
950 onChanged();
951 } else {
952 if (strategyCase_ == 3) {
953 sisrBuilder_.mergeFrom(value);
954 } else {
955 sisrBuilder_.setMessage(value);
956 }
957 }
958 strategyCase_ = 3;
959 return this;
960 }
961
964 public Builder clearSisr() {
965 if (sisrBuilder_ == null) {
966 if (strategyCase_ == 3) {
967 strategyCase_ = 0;
968 strategy_ = null;
969 onChanged();
970 }
971 } else {
972 if (strategyCase_ == 3) {
973 strategyCase_ = 0;
974 strategy_ = null;
975 }
976 sisrBuilder_.clear();
977 }
978 return this;
979 }
980
984 return getSisrFieldBuilder().getBuilder();
985 }
986
989 @java.lang.Override
991 if ((strategyCase_ == 3) && (sisrBuilder_ != null)) {
992 return sisrBuilder_.getMessageOrBuilder();
993 } else {
994 if (strategyCase_ == 3) {
995 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
996 }
997 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
998 }
999 }
1000
1003 private com.google.protobuf.SingleFieldBuilder<
1004 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder>
1005 getSisrFieldBuilder() {
1006 if (sisrBuilder_ == null) {
1007 if (!(strategyCase_ == 3)) {
1008 strategy_ = com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
1009 }
1010 sisrBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1011 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder>(
1012 (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_,
1013 getParentForChildren(),
1014 isClean());
1015 strategy_ = null;
1016 }
1017 strategyCase_ = 3;
1018 onChanged();
1019 return sisrBuilder_;
1020 }
1021
1022 // @@protoc_insertion_point(builder_scope:operations_research.RuinStrategy)
1023 }
1024
1025 // @@protoc_insertion_point(class_scope:operations_research.RuinStrategy)
1026 private static final com.google.ortools.constraintsolver.RuinStrategy DEFAULT_INSTANCE;
1027 static {
1028 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.RuinStrategy();
1029 }
1030
1032 return DEFAULT_INSTANCE;
1033 }
1034
1035 private static final com.google.protobuf.Parser<RuinStrategy>
1036 PARSER = new com.google.protobuf.AbstractParser<RuinStrategy>() {
1037 @java.lang.Override
1038 public RuinStrategy parsePartialFrom(
1039 com.google.protobuf.CodedInputStream input,
1040 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1041 throws com.google.protobuf.InvalidProtocolBufferException {
1042 Builder builder = newBuilder();
1043 try {
1044 builder.mergeFrom(input, extensionRegistry);
1045 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1046 throw e.setUnfinishedMessage(builder.buildPartial());
1047 } catch (com.google.protobuf.UninitializedMessageException e) {
1048 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1049 } catch (java.io.IOException e) {
1050 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1051 .setUnfinishedMessage(builder.buildPartial());
1052 }
1053 return builder.buildPartial();
1054 }
1055 };
1056
1057 public static com.google.protobuf.Parser<RuinStrategy> parser() {
1058 return PARSER;
1059 }
1060
1061 @java.lang.Override
1062 public com.google.protobuf.Parser<RuinStrategy> getParserForType() {
1063 return PARSER;
1064 }
1065
1066 @java.lang.Override
1070
1071}
1072
com.google.ortools.constraintsolver.RandomWalkRuinStrategy getRandomWalk()
com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder getSpatiallyCloseRoutesOrBuilder()
com.google.ortools.constraintsolver.SISRRuinStrategy.Builder getSisrBuilder()
com.google.ortools.constraintsolver.RuinStrategy getDefaultInstanceForType()
com.google.ortools.constraintsolver.RuinStrategy build()
Builder mergeSpatiallyCloseRoutes(com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy value)
Builder setRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value)
com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy getSpatiallyCloseRoutes()
com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder getRandomWalkBuilder()
com.google.ortools.constraintsolver.SISRRuinStrategy getSisr()
Builder mergeRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value)
Builder setSpatiallyCloseRoutes(com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder builderForValue)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder setRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder builderForValue)
Builder mergeFrom(com.google.ortools.constraintsolver.RuinStrategy other)
Builder setSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value)
com.google.ortools.constraintsolver.RuinStrategy buildPartial()
Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder getSpatiallyCloseRoutesBuilder()
com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder getSisrOrBuilder()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value)
com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder getRandomWalkOrBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder setSisr(com.google.ortools.constraintsolver.SISRRuinStrategy.Builder builderForValue)
Builder setSpatiallyCloseRoutes(com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy value)
com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder getSisrOrBuilder()
static com.google.protobuf.Parser< RuinStrategy > parser()
com.google.ortools.constraintsolver.RuinStrategy getDefaultInstanceForType()
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.constraintsolver.RuinStrategy getDefaultInstance()
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.constraintsolver.RuinStrategy parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.RandomWalkRuinStrategy getRandomWalk()
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(byte[] data)
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(com.google.protobuf.ByteString data)
com.google.protobuf.Parser< RuinStrategy > getParserForType()
boolean equals(final java.lang.Object obj)
com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy getSpatiallyCloseRoutes()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder getSpatiallyCloseRoutesOrBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.RuinStrategy parseDelimitedFrom(java.io.InputStream input)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(java.io.InputStream input)
static Builder newBuilder(com.google.ortools.constraintsolver.RuinStrategy prototype)
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.SISRRuinStrategy getSisr()
com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder getRandomWalkOrBuilder()
static com.google.ortools.constraintsolver.RuinStrategy parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)