6package com.google.ortools.constraintsolver;
15@com.google.protobuf.Generated
16public final class LocalCheapestInsertionParameters
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 "LocalCheapestInsertionParameters");
31 private LocalCheapestInsertionParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private LocalCheapestInsertionParameters() {
35 pickupDeliveryStrategy_ = 0;
36 insertionSortingProperties_ = emptyIntList();
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_LocalCheapestInsertionParameters_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_LocalCheapestInsertionParameters_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.class, com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.Builder.class);
61 public enum PairInsertionStrategy
62 implements com.google.protobuf.ProtocolMessageEnum {
103 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
104 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
109 "PairInsertionStrategy");
151 throw new java.lang.IllegalArgumentException(
152 "Can't get the number of an unknown enum value.");
162 @java.lang.Deprecated
163 public static PairInsertionStrategy
valueOf(
int value) {
171 public static PairInsertionStrategy
forNumber(
int value) {
177 default:
return null;
183 return internalValueMap;
185 private static final com.google.protobuf.Internal.EnumLiteMap<
193 public final com.google.protobuf.Descriptors.EnumValueDescriptor
196 throw new java.lang.IllegalStateException(
197 "Can't get the descriptor of an unrecognized enum value.");
201 public final com.google.protobuf.Descriptors.EnumDescriptor
205 public static com.google.protobuf.Descriptors.EnumDescriptor
207 return com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.getDescriptor().getEnumTypes().get(0);
213 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
215 throw new java.lang.IllegalArgumentException(
216 "EnumValueDescriptor is not for this type.");
218 if (desc.getIndex() == -1) {
221 return VALUES[desc.getIndex()];
224 private final int value;
241 public enum InsertionSortingProperty
242 implements com.google.protobuf.ProtocolMessageEnum {
323 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
324 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
329 "InsertionSortingProperty");
411 throw new java.lang.IllegalArgumentException(
412 "Can't get the number of an unknown enum value.");
422 @java.lang.Deprecated
423 public static InsertionSortingProperty
valueOf(
int value) {
431 public static InsertionSortingProperty
forNumber(
int value) {
442 default:
return null;
448 return internalValueMap;
450 private static final com.google.protobuf.Internal.EnumLiteMap<
458 public final com.google.protobuf.Descriptors.EnumValueDescriptor
461 throw new java.lang.IllegalStateException(
462 "Can't get the descriptor of an unrecognized enum value.");
466 public final com.google.protobuf.Descriptors.EnumDescriptor
470 public static com.google.protobuf.Descriptors.EnumDescriptor
472 return com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.getDescriptor().getEnumTypes().get(1);
477 public static InsertionSortingProperty
valueOf(
478 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
480 throw new java.lang.IllegalArgumentException(
481 "EnumValueDescriptor is not for this type.");
483 if (desc.getIndex() == -1) {
486 return VALUES[desc.getIndex()];
489 private final int value;
499 private int pickupDeliveryStrategy_ = 0;
510 return pickupDeliveryStrategy_;
527 @SuppressWarnings(
"serial")
528 private com.google.protobuf.Internal.IntList insertionSortingProperties_ =
530 private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
532 new com.google.protobuf.Internal.IntListAdapter.IntConverter<
554 return new com.google.protobuf.Internal.IntListAdapter<
555 com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.InsertionSortingProperty>(insertionSortingProperties_, insertionSortingProperties_converter_);
572 return insertionSortingProperties_.size();
590 return insertionSortingProperties_converter_.convert(insertionSortingProperties_.getInt(index));
606 public java.util.List<java.lang.Integer>
608 return insertionSortingProperties_;
626 return insertionSortingProperties_.getInt(index);
628 private int insertionSortingPropertiesMemoizedSerializedSize;
630 private byte memoizedIsInitialized = -1;
637 memoizedIsInitialized = 1;
642 public void writeTo(com.google.protobuf.CodedOutputStream output)
643 throws java.io.IOException {
645 if (pickupDeliveryStrategy_ != com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.PairInsertionStrategy.AUTOMATIC.getNumber()) {
646 output.writeEnum(1, pickupDeliveryStrategy_);
649 output.writeUInt32NoTag(18);
650 output.writeUInt32NoTag(insertionSortingPropertiesMemoizedSerializedSize);
652 for (
int i = 0; i < insertionSortingProperties_.size(); i++) {
653 output.writeEnumNoTag(insertionSortingProperties_.getInt(i));
655 getUnknownFields().writeTo(output);
660 int size = memoizedSize;
661 if (size != -1)
return size;
664 if (pickupDeliveryStrategy_ != com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.PairInsertionStrategy.AUTOMATIC.getNumber()) {
665 size += com.google.protobuf.CodedOutputStream
666 .computeEnumSize(1, pickupDeliveryStrategy_);
670 for (
int i = 0; i < insertionSortingProperties_.size(); i++) {
671 dataSize += com.google.protobuf.CodedOutputStream
672 .computeEnumSizeNoTag(insertionSortingProperties_.getInt(i));
676 size += com.google.protobuf.CodedOutputStream
677 .computeUInt32SizeNoTag(dataSize);
678 }insertionSortingPropertiesMemoizedSerializedSize = dataSize;
680 size += getUnknownFields().getSerializedSize();
686 public boolean equals(
final java.lang.Object obj) {
690 if (!(obj instanceof com.google.ortools.constraintsolver.LocalCheapestInsertionParameters)) {
691 return super.equals(obj);
695 if (pickupDeliveryStrategy_ != other.pickupDeliveryStrategy_)
return false;
696 if (!insertionSortingProperties_.equals(other.insertionSortingProperties_))
return false;
697 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
703 if (memoizedHashCode != 0) {
704 return memoizedHashCode;
709 hash = (53 * hash) + pickupDeliveryStrategy_;
712 hash = (53 * hash) + insertionSortingProperties_.hashCode();
714 hash = (29 * hash) + getUnknownFields().hashCode();
715 memoizedHashCode = hash;
720 java.nio.ByteBuffer data)
721 throws com.google.protobuf.InvalidProtocolBufferException {
722 return PARSER.parseFrom(data);
725 java.nio.ByteBuffer data,
726 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
727 throws com.google.protobuf.InvalidProtocolBufferException {
728 return PARSER.parseFrom(data, extensionRegistry);
731 com.google.protobuf.ByteString data)
732 throws com.google.protobuf.InvalidProtocolBufferException {
733 return PARSER.parseFrom(data);
736 com.google.protobuf.ByteString data,
737 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
738 throws com.google.protobuf.InvalidProtocolBufferException {
739 return PARSER.parseFrom(data, extensionRegistry);
742 throws com.google.protobuf.InvalidProtocolBufferException {
743 return PARSER.parseFrom(data);
747 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
748 throws com.google.protobuf.InvalidProtocolBufferException {
749 return PARSER.parseFrom(data, extensionRegistry);
752 throws java.io.IOException {
753 return com.google.protobuf.GeneratedMessage
754 .parseWithIOException(PARSER, input);
757 java.io.InputStream input,
758 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
759 throws java.io.IOException {
760 return com.google.protobuf.GeneratedMessage
761 .parseWithIOException(PARSER, input, extensionRegistry);
765 throws java.io.IOException {
766 return com.google.protobuf.GeneratedMessage
767 .parseDelimitedWithIOException(PARSER, input);
771 java.io.InputStream input,
772 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
773 throws java.io.IOException {
774 return com.google.protobuf.GeneratedMessage
775 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
778 com.google.protobuf.CodedInputStream input)
779 throws java.io.IOException {
780 return com.google.protobuf.GeneratedMessage
781 .parseWithIOException(PARSER, input);
784 com.google.protobuf.CodedInputStream input,
785 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
786 throws java.io.IOException {
787 return com.google.protobuf.GeneratedMessage
788 .parseWithIOException(PARSER, input, extensionRegistry);
794 return DEFAULT_INSTANCE.toBuilder();
796 public static Builder newBuilder(com.google.ortools.constraintsolver.LocalCheapestInsertionParameters prototype) {
797 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
801 return this == DEFAULT_INSTANCE
807 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
818 public static final class Builder
extends
819 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
822 public static final com.google.protobuf.Descriptors.Descriptor
824 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_LocalCheapestInsertionParameters_descriptor;
828 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
830 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_LocalCheapestInsertionParameters_fieldAccessorTable
831 .ensureFieldAccessorsInitialized(
832 com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.class, com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.Builder.class);
841 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
849 pickupDeliveryStrategy_ = 0;
850 insertionSortingProperties_ = emptyIntList();
855 public com.google.protobuf.Descriptors.Descriptor
857 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_LocalCheapestInsertionParameters_descriptor;
862 return com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.getDefaultInstance();
869 throw newUninitializedMessageException(result);
877 if (bitField0_ != 0) { buildPartial0(result); }
882 private void buildPartial0(com.google.ortools.constraintsolver.LocalCheapestInsertionParameters result) {
883 int from_bitField0_ = bitField0_;
884 if (((from_bitField0_ & 0x00000001) != 0)) {
885 result.pickupDeliveryStrategy_ = pickupDeliveryStrategy_;
887 if (((from_bitField0_ & 0x00000002) != 0)) {
888 insertionSortingProperties_.makeImmutable();
889 result.insertionSortingProperties_ = insertionSortingProperties_;
894 public Builder
mergeFrom(com.google.protobuf.Message other) {
895 if (other instanceof com.google.ortools.constraintsolver.LocalCheapestInsertionParameters) {
896 return mergeFrom((com.google.ortools.constraintsolver.LocalCheapestInsertionParameters)other);
898 super.mergeFrom(other);
903 public Builder
mergeFrom(com.google.ortools.constraintsolver.LocalCheapestInsertionParameters other) {
904 if (other == com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.getDefaultInstance())
return this;
905 if (other.pickupDeliveryStrategy_ != 0) {
908 if (!other.insertionSortingProperties_.isEmpty()) {
909 if (insertionSortingProperties_.isEmpty()) {
910 insertionSortingProperties_ = other.insertionSortingProperties_;
911 insertionSortingProperties_.makeImmutable();
912 bitField0_ |= 0x00000002;
914 ensureInsertionSortingPropertiesIsMutable();
915 insertionSortingProperties_.addAll(other.insertionSortingProperties_);
919 this.mergeUnknownFields(other.getUnknownFields());
931 com.google.protobuf.CodedInputStream input,
932 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
933 throws java.io.IOException {
934 if (extensionRegistry ==
null) {
935 throw new java.lang.NullPointerException();
938 boolean done =
false;
940 int tag = input.readTag();
946 pickupDeliveryStrategy_ = input.readEnum();
947 bitField0_ |= 0x00000001;
951 int tmpRaw = input.readEnum();
952 ensureInsertionSortingPropertiesIsMutable();
953 insertionSortingProperties_.addInt(tmpRaw);
957 int length = input.readRawVarint32();
958 int limit = input.pushLimit(length);
959 ensureInsertionSortingPropertiesIsMutable();
960 while (input.getBytesUntilLimit() > 0) {
961 insertionSortingProperties_.addInt(input.readEnum());
963 input.popLimit(limit);
967 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
974 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
975 throw e.unwrapIOException();
981 private int bitField0_;
983 private int pickupDeliveryStrategy_ = 0;
994 return pickupDeliveryStrategy_;
1007 pickupDeliveryStrategy_ = value;
1008 bitField0_ |= 0x00000001;
1036 public Builder
setPickupDeliveryStrategy(com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.PairInsertionStrategy value) {
1037 if (value ==
null) {
throw new NullPointerException(); }
1038 bitField0_ |= 0x00000001;
1039 pickupDeliveryStrategy_ = value.getNumber();
1053 bitField0_ = (bitField0_ & ~0x00000001);
1054 pickupDeliveryStrategy_ = 0;
1059 private com.google.protobuf.Internal.IntList insertionSortingProperties_ = emptyIntList();
1060 private void ensureInsertionSortingPropertiesIsMutable() {
1061 if (!insertionSortingProperties_.isModifiable()) {
1062 insertionSortingProperties_ = makeMutableCopy(insertionSortingProperties_);
1064 bitField0_ |= 0x00000002;
1080 return new com.google.protobuf.Internal.IntListAdapter<
1081 com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.InsertionSortingProperty>(insertionSortingProperties_, insertionSortingProperties_converter_);
1097 return insertionSortingProperties_.size();
1114 return insertionSortingProperties_converter_.convert(insertionSortingProperties_.getInt(index));
1132 int index, com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.InsertionSortingProperty value) {
1133 if (value ==
null) {
throw new NullPointerException(); }
1134 ensureInsertionSortingPropertiesIsMutable();
1135 insertionSortingProperties_.setInt(index, value.getNumber());
1154 if (value ==
null) {
throw new NullPointerException(); }
1155 ensureInsertionSortingPropertiesIsMutable();
1156 insertionSortingProperties_.addInt(value.getNumber());
1175 java.lang.Iterable<? extends com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.InsertionSortingProperty> values) {
1176 ensureInsertionSortingPropertiesIsMutable();
1177 for (com.google.ortools.constraintsolver.LocalCheapestInsertionParameters.InsertionSortingProperty value : values) {
1178 insertionSortingProperties_.addInt(value.getNumber());
1197 insertionSortingProperties_ = emptyIntList();
1198 bitField0_ = (bitField0_ & ~0x00000002);
1215 public java.util.List<java.lang.Integer>
1217 insertionSortingProperties_.makeImmutable();
1218 return insertionSortingProperties_;
1235 return insertionSortingProperties_.getInt(index);
1253 int index,
int value) {
1254 ensureInsertionSortingPropertiesIsMutable();
1255 insertionSortingProperties_.setInt(index, value);
1274 ensureInsertionSortingPropertiesIsMutable();
1275 insertionSortingProperties_.addInt(value);
1294 java.lang.Iterable<java.lang.Integer> values) {
1295 ensureInsertionSortingPropertiesIsMutable();
1296 for (
int value : values) {
1297 insertionSortingProperties_.addInt(value);
1309 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.LocalCheapestInsertionParameters();
1313 return DEFAULT_INSTANCE;
1320 com.google.protobuf.CodedInputStream input,
1321 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1322 throws com.google.protobuf.InvalidProtocolBufferException {
1325 builder.mergeFrom(input, extensionRegistry);
1326 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1327 throw e.setUnfinishedMessage(builder.buildPartial());
1328 }
catch (com.google.protobuf.UninitializedMessageException e) {
1329 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1330 }
catch (java.io.IOException e) {
1331 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1332 .setUnfinishedMessage(builder.buildPartial());
1334 return builder.buildPartial();
1338 public static com.google.protobuf.Parser<LocalCheapestInsertionParameters>
parser() {
1349 return DEFAULT_INSTANCE;