6package com.google.ortools.constraintsolver;
15@com.google.protobuf.Generated
16public final class RuinStrategy
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 RuinStrategy.class.getName());
31 private RuinStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private RuinStrategy() {
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
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);
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 {
60 private final int value;
61 private StrategyCase(
int value) {
70 public static StrategyCase
valueOf(
int value) {
101 return strategyCase_ == 1;
109 if (strategyCase_ == 1) {
110 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
112 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
119 if (strategyCase_ == 1) {
120 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
122 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
132 return strategyCase_ == 2;
140 if (strategyCase_ == 2) {
141 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
143 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
150 if (strategyCase_ == 2) {
151 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
153 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
163 return strategyCase_ == 3;
171 if (strategyCase_ == 3) {
172 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
174 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
181 if (strategyCase_ == 3) {
182 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
184 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
187 private byte memoizedIsInitialized = -1;
194 memoizedIsInitialized = 1;
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_);
204 if (strategyCase_ == 2) {
205 output.writeMessage(2, (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_);
207 if (strategyCase_ == 3) {
208 output.writeMessage(3, (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_);
210 getUnknownFields().writeTo(output);
215 int size = memoizedSize;
216 if (size != -1)
return size;
219 if (strategyCase_ == 1) {
220 size += com.google.protobuf.CodedOutputStream
221 .computeMessageSize(1, (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_);
223 if (strategyCase_ == 2) {
224 size += com.google.protobuf.CodedOutputStream
225 .computeMessageSize(2, (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_);
227 if (strategyCase_ == 3) {
228 size += com.google.protobuf.CodedOutputStream
229 .computeMessageSize(3, (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_);
231 size += getUnknownFields().getSerializedSize();
237 public boolean equals(
final java.lang.Object obj) {
241 if (!(obj instanceof com.google.ortools.constraintsolver.RuinStrategy)) {
242 return super.equals(obj);
247 switch (strategyCase_) {
263 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
269 if (memoizedHashCode != 0) {
270 return memoizedHashCode;
274 switch (strategyCase_) {
290 hash = (29 * hash) + getUnknownFields().hashCode();
291 memoizedHashCode = hash;
296 java.nio.ByteBuffer data)
297 throws com.google.protobuf.InvalidProtocolBufferException {
298 return PARSER.parseFrom(data);
301 java.nio.ByteBuffer data,
302 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303 throws com.google.protobuf.InvalidProtocolBufferException {
304 return PARSER.parseFrom(data, extensionRegistry);
307 com.google.protobuf.ByteString data)
308 throws com.google.protobuf.InvalidProtocolBufferException {
309 return PARSER.parseFrom(data);
312 com.google.protobuf.ByteString data,
313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314 throws com.google.protobuf.InvalidProtocolBufferException {
315 return PARSER.parseFrom(data, extensionRegistry);
318 throws com.google.protobuf.InvalidProtocolBufferException {
319 return PARSER.parseFrom(data);
323 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
324 throws com.google.protobuf.InvalidProtocolBufferException {
325 return PARSER.parseFrom(data, extensionRegistry);
328 throws java.io.IOException {
329 return com.google.protobuf.GeneratedMessage
330 .parseWithIOException(PARSER, input);
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);
341 throws java.io.IOException {
342 return com.google.protobuf.GeneratedMessage
343 .parseDelimitedWithIOException(PARSER, input);
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);
354 com.google.protobuf.CodedInputStream input)
355 throws java.io.IOException {
356 return com.google.protobuf.GeneratedMessage
357 .parseWithIOException(PARSER, input);
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);
370 return DEFAULT_INSTANCE.toBuilder();
373 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
377 return this == DEFAULT_INSTANCE
383 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
394 public static final class Builder
extends
395 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
398 public static final com.google.protobuf.Descriptors.Descriptor
400 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
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);
417 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
425 if (spatiallyCloseRoutesBuilder_ !=
null) {
426 spatiallyCloseRoutesBuilder_.clear();
428 if (randomWalkBuilder_ !=
null) {
429 randomWalkBuilder_.clear();
431 if (sisrBuilder_ !=
null) {
432 sisrBuilder_.clear();
440 public com.google.protobuf.Descriptors.Descriptor
442 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
447 return com.google.ortools.constraintsolver.RuinStrategy.getDefaultInstance();
454 throw newUninitializedMessageException(result);
462 if (bitField0_ != 0) { buildPartial0(result); }
463 buildPartialOneofs(result);
468 private void buildPartial0(com.google.ortools.constraintsolver.RuinStrategy result) {
469 int from_bitField0_ = bitField0_;
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();
479 if (strategyCase_ == 2 &&
480 randomWalkBuilder_ !=
null) {
481 result.strategy_ = randomWalkBuilder_.build();
483 if (strategyCase_ == 3 &&
484 sisrBuilder_ !=
null) {
485 result.strategy_ = sisrBuilder_.build();
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);
494 super.mergeFrom(other);
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: {
514 case STRATEGY_NOT_SET: {
518 this.mergeUnknownFields(other.getUnknownFields());
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();
537 boolean done =
false;
539 int tag = input.readTag();
546 internalGetSpatiallyCloseRoutesFieldBuilder().getBuilder(),
553 internalGetRandomWalkFieldBuilder().getBuilder(),
560 internalGetSisrFieldBuilder().getBuilder(),
566 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
573 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
574 throw e.unwrapIOException();
580 private int strategyCase_ = 0;
581 private java.lang.Object strategy_;
595 private int bitField0_;
597 private com.google.protobuf.SingleFieldBuilder<
598 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder> spatiallyCloseRoutesBuilder_;
605 return strategyCase_ == 1;
613 if (spatiallyCloseRoutesBuilder_ ==
null) {
614 if (strategyCase_ == 1) {
615 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
617 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
619 if (strategyCase_ == 1) {
620 return spatiallyCloseRoutesBuilder_.getMessage();
622 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
629 if (spatiallyCloseRoutesBuilder_ ==
null) {
631 throw new NullPointerException();
636 spatiallyCloseRoutesBuilder_.setMessage(value);
645 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder builderForValue) {
646 if (spatiallyCloseRoutesBuilder_ ==
null) {
647 strategy_ = builderForValue.build();
650 spatiallyCloseRoutesBuilder_.setMessage(builderForValue.build());
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();
669 if (strategyCase_ == 1) {
670 spatiallyCloseRoutesBuilder_.mergeFrom(value);
672 spatiallyCloseRoutesBuilder_.setMessage(value);
682 if (spatiallyCloseRoutesBuilder_ ==
null) {
683 if (strategyCase_ == 1) {
689 if (strategyCase_ == 1) {
693 spatiallyCloseRoutesBuilder_.clear();
701 return internalGetSpatiallyCloseRoutesFieldBuilder().getBuilder();
708 if ((strategyCase_ == 1) && (spatiallyCloseRoutesBuilder_ !=
null)) {
709 return spatiallyCloseRoutesBuilder_.getMessageOrBuilder();
711 if (strategyCase_ == 1) {
712 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
714 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
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();
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(),
736 return spatiallyCloseRoutesBuilder_;
739 private com.google.protobuf.SingleFieldBuilder<
740 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder> randomWalkBuilder_;
747 return strategyCase_ == 2;
755 if (randomWalkBuilder_ ==
null) {
756 if (strategyCase_ == 2) {
757 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
759 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
761 if (strategyCase_ == 2) {
762 return randomWalkBuilder_.getMessage();
764 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
770 public Builder
setRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value) {
771 if (randomWalkBuilder_ ==
null) {
773 throw new NullPointerException();
778 randomWalkBuilder_.setMessage(value);
787 com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder builderForValue) {
788 if (randomWalkBuilder_ ==
null) {
789 strategy_ = builderForValue.build();
792 randomWalkBuilder_.setMessage(builderForValue.build());
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();
811 if (strategyCase_ == 2) {
812 randomWalkBuilder_.mergeFrom(value);
814 randomWalkBuilder_.setMessage(value);
824 if (randomWalkBuilder_ ==
null) {
825 if (strategyCase_ == 2) {
831 if (strategyCase_ == 2) {
835 randomWalkBuilder_.clear();
843 return internalGetRandomWalkFieldBuilder().getBuilder();
850 if ((strategyCase_ == 2) && (randomWalkBuilder_ !=
null)) {
851 return randomWalkBuilder_.getMessageOrBuilder();
853 if (strategyCase_ == 2) {
854 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
856 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
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();
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(),
878 return randomWalkBuilder_;
881 private com.google.protobuf.SingleFieldBuilder<
882 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder> sisrBuilder_;
889 return strategyCase_ == 3;
897 if (sisrBuilder_ ==
null) {
898 if (strategyCase_ == 3) {
899 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
901 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
903 if (strategyCase_ == 3) {
904 return sisrBuilder_.getMessage();
906 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
912 public Builder
setSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value) {
913 if (sisrBuilder_ ==
null) {
915 throw new NullPointerException();
920 sisrBuilder_.setMessage(value);
929 com.google.ortools.constraintsolver.SISRRuinStrategy.Builder builderForValue) {
930 if (sisrBuilder_ ==
null) {
931 strategy_ = builderForValue.build();
934 sisrBuilder_.setMessage(builderForValue.build());
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();
953 if (strategyCase_ == 3) {
954 sisrBuilder_.mergeFrom(value);
956 sisrBuilder_.setMessage(value);
966 if (sisrBuilder_ ==
null) {
967 if (strategyCase_ == 3) {
973 if (strategyCase_ == 3) {
977 sisrBuilder_.clear();
985 return internalGetSisrFieldBuilder().getBuilder();
992 if ((strategyCase_ == 3) && (sisrBuilder_ !=
null)) {
993 return sisrBuilder_.getMessageOrBuilder();
995 if (strategyCase_ == 3) {
996 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
998 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
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();
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(),
1020 return sisrBuilder_;
1029 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.RuinStrategy();
1033 return DEFAULT_INSTANCE;
1036 private static final com.google.protobuf.Parser<
RuinStrategy>
1037 PARSER =
new com.google.protobuf.AbstractParser<
RuinStrategy>() {
1040 com.google.protobuf.CodedInputStream input,
1041 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1042 throws com.google.protobuf.InvalidProtocolBufferException {
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());
1054 return builder.buildPartial();
1058 public static com.google.protobuf.Parser<RuinStrategy>
parser() {
1069 return DEFAULT_INSTANCE;