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