Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
AcceptanceStrategy.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
17public final class AcceptanceStrategy extends
18 com.google.protobuf.GeneratedMessage implements
19 // @@protoc_insertion_point(message_implements:operations_research.AcceptanceStrategy)
21private static final long serialVersionUID = 0L;
22 static {
23 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
24 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
25 /* major= */ 4,
26 /* minor= */ 29,
27 /* patch= */ 3,
28 /* suffix= */ "",
29 AcceptanceStrategy.class.getName());
30 }
31 // Use AcceptanceStrategy.newBuilder() to construct.
32 private AcceptanceStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 super(builder);
34 }
35 private AcceptanceStrategy() {
36 }
37
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_AcceptanceStrategy_descriptor;
41 }
42
43 @java.lang.Override
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_AcceptanceStrategy_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.constraintsolver.AcceptanceStrategy.class, com.google.ortools.constraintsolver.AcceptanceStrategy.Builder.class);
49 }
50
54 public enum Value
55 implements com.google.protobuf.ProtocolMessageEnum {
83 ;
84
85 static {
86 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
87 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
88 /* major= */ 4,
89 /* minor= */ 29,
90 /* patch= */ 3,
91 /* suffix= */ "",
92 Value.class.getName());
93 }
101 public static final int UNSET_VALUE = 0;
110 public static final int GREEDY_DESCENT_VALUE = 1;
119 public static final int SIMULATED_ANNEALING_VALUE = 2;
120
121
122 public final int getNumber() {
123 if (this == UNRECOGNIZED) {
124 throw new java.lang.IllegalArgumentException(
125 "Can't get the number of an unknown enum value.");
126 }
127 return value;
128 }
129
135 @java.lang.Deprecated
136 public static Value valueOf(int value) {
137 return forNumber(value);
138 }
139
144 public static Value forNumber(int value) {
145 switch (value) {
146 case 0: return UNSET;
147 case 1: return GREEDY_DESCENT;
148 case 2: return SIMULATED_ANNEALING;
149 default: return null;
150 }
151 }
152
153 public static com.google.protobuf.Internal.EnumLiteMap<Value>
155 return internalValueMap;
156 }
157 private static final com.google.protobuf.Internal.EnumLiteMap<
158 Value> internalValueMap =
159 new com.google.protobuf.Internal.EnumLiteMap<Value>() {
160 public Value findValueByNumber(int number) {
161 return Value.forNumber(number);
162 }
163 };
164
165 public final com.google.protobuf.Descriptors.EnumValueDescriptor
167 if (this == UNRECOGNIZED) {
168 throw new java.lang.IllegalStateException(
169 "Can't get the descriptor of an unrecognized enum value.");
170 }
171 return getDescriptor().getValues().get(ordinal());
172 }
173 public final com.google.protobuf.Descriptors.EnumDescriptor
175 return getDescriptor();
176 }
177 public static final com.google.protobuf.Descriptors.EnumDescriptor
179 return com.google.ortools.constraintsolver.AcceptanceStrategy.getDescriptor().getEnumTypes().get(0);
180 }
181
182 private static final Value[] VALUES = values();
183
184 public static Value valueOf(
185 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
186 if (desc.getType() != getDescriptor()) {
187 throw new java.lang.IllegalArgumentException(
188 "EnumValueDescriptor is not for this type.");
189 }
190 if (desc.getIndex() == -1) {
191 return UNRECOGNIZED;
192 }
193 return VALUES[desc.getIndex()];
194 }
195
196 private final int value;
197
198 private Value(int value) {
199 this.value = value;
200 }
201
202 // @@protoc_insertion_point(enum_scope:operations_research.AcceptanceStrategy.Value)
203 }
204
205 private byte memoizedIsInitialized = -1;
206 @java.lang.Override
207 public final boolean isInitialized() {
208 byte isInitialized = memoizedIsInitialized;
209 if (isInitialized == 1) return true;
210 if (isInitialized == 0) return false;
211
212 memoizedIsInitialized = 1;
213 return true;
214 }
215
216 @java.lang.Override
217 public void writeTo(com.google.protobuf.CodedOutputStream output)
218 throws java.io.IOException {
219 getUnknownFields().writeTo(output);
220 }
221
222 @java.lang.Override
223 public int getSerializedSize() {
224 int size = memoizedSize;
225 if (size != -1) return size;
226
227 size = 0;
228 size += getUnknownFields().getSerializedSize();
229 memoizedSize = size;
230 return size;
231 }
232
233 @java.lang.Override
234 public boolean equals(final java.lang.Object obj) {
235 if (obj == this) {
236 return true;
237 }
238 if (!(obj instanceof com.google.ortools.constraintsolver.AcceptanceStrategy)) {
239 return super.equals(obj);
240 }
241 com.google.ortools.constraintsolver.AcceptanceStrategy other = (com.google.ortools.constraintsolver.AcceptanceStrategy) obj;
242
243 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
244 return true;
245 }
246
247 @java.lang.Override
248 public int hashCode() {
249 if (memoizedHashCode != 0) {
250 return memoizedHashCode;
251 }
252 int hash = 41;
253 hash = (19 * hash) + getDescriptor().hashCode();
254 hash = (29 * hash) + getUnknownFields().hashCode();
255 memoizedHashCode = hash;
256 return hash;
257 }
258
260 java.nio.ByteBuffer data)
261 throws com.google.protobuf.InvalidProtocolBufferException {
262 return PARSER.parseFrom(data);
263 }
265 java.nio.ByteBuffer data,
266 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
267 throws com.google.protobuf.InvalidProtocolBufferException {
268 return PARSER.parseFrom(data, extensionRegistry);
269 }
271 com.google.protobuf.ByteString data)
272 throws com.google.protobuf.InvalidProtocolBufferException {
273 return PARSER.parseFrom(data);
274 }
276 com.google.protobuf.ByteString data,
277 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
278 throws com.google.protobuf.InvalidProtocolBufferException {
279 return PARSER.parseFrom(data, extensionRegistry);
280 }
282 throws com.google.protobuf.InvalidProtocolBufferException {
283 return PARSER.parseFrom(data);
284 }
286 byte[] data,
287 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
288 throws com.google.protobuf.InvalidProtocolBufferException {
289 return PARSER.parseFrom(data, extensionRegistry);
290 }
292 throws java.io.IOException {
293 return com.google.protobuf.GeneratedMessage
294 .parseWithIOException(PARSER, input);
295 }
297 java.io.InputStream input,
298 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
299 throws java.io.IOException {
300 return com.google.protobuf.GeneratedMessage
301 .parseWithIOException(PARSER, input, extensionRegistry);
302 }
303
305 throws java.io.IOException {
306 return com.google.protobuf.GeneratedMessage
307 .parseDelimitedWithIOException(PARSER, input);
308 }
309
311 java.io.InputStream input,
312 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
313 throws java.io.IOException {
314 return com.google.protobuf.GeneratedMessage
315 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
316 }
318 com.google.protobuf.CodedInputStream input)
319 throws java.io.IOException {
320 return com.google.protobuf.GeneratedMessage
321 .parseWithIOException(PARSER, input);
322 }
324 com.google.protobuf.CodedInputStream input,
325 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
326 throws java.io.IOException {
327 return com.google.protobuf.GeneratedMessage
328 .parseWithIOException(PARSER, input, extensionRegistry);
329 }
330
331 @java.lang.Override
332 public Builder newBuilderForType() { return newBuilder(); }
333 public static Builder newBuilder() {
334 return DEFAULT_INSTANCE.toBuilder();
335 }
336 public static Builder newBuilder(com.google.ortools.constraintsolver.AcceptanceStrategy prototype) {
337 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
338 }
339 @java.lang.Override
341 return this == DEFAULT_INSTANCE
342 ? new Builder() : new Builder().mergeFrom(this);
343 }
344
345 @java.lang.Override
347 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
348 Builder builder = new Builder(parent);
349 return builder;
350 }
351
360 public static final class Builder extends
361 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
362 // @@protoc_insertion_point(builder_implements:operations_research.AcceptanceStrategy)
364 public static final com.google.protobuf.Descriptors.Descriptor
366 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_AcceptanceStrategy_descriptor;
367 }
368
369 @java.lang.Override
370 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
372 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_AcceptanceStrategy_fieldAccessorTable
373 .ensureFieldAccessorsInitialized(
374 com.google.ortools.constraintsolver.AcceptanceStrategy.class, com.google.ortools.constraintsolver.AcceptanceStrategy.Builder.class);
375 }
376
377 // Construct using com.google.ortools.constraintsolver.AcceptanceStrategy.newBuilder()
378 private Builder() {
379
380 }
381
382 private Builder(
383 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
384 super(parent);
385
386 }
387 @java.lang.Override
388 public Builder clear() {
389 super.clear();
390 return this;
391 }
392
393 @java.lang.Override
394 public com.google.protobuf.Descriptors.Descriptor
396 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_AcceptanceStrategy_descriptor;
397 }
398
399 @java.lang.Override
401 return com.google.ortools.constraintsolver.AcceptanceStrategy.getDefaultInstance();
402 }
403
404 @java.lang.Override
407 if (!result.isInitialized()) {
408 throw newUninitializedMessageException(result);
409 }
410 return result;
411 }
412
413 @java.lang.Override
415 com.google.ortools.constraintsolver.AcceptanceStrategy result = new com.google.ortools.constraintsolver.AcceptanceStrategy(this);
416 onBuilt();
417 return result;
418 }
419
420 @java.lang.Override
421 public Builder mergeFrom(com.google.protobuf.Message other) {
422 if (other instanceof com.google.ortools.constraintsolver.AcceptanceStrategy) {
423 return mergeFrom((com.google.ortools.constraintsolver.AcceptanceStrategy)other);
424 } else {
425 super.mergeFrom(other);
426 return this;
427 }
428 }
429
430 public Builder mergeFrom(com.google.ortools.constraintsolver.AcceptanceStrategy other) {
431 if (other == com.google.ortools.constraintsolver.AcceptanceStrategy.getDefaultInstance()) return this;
432 this.mergeUnknownFields(other.getUnknownFields());
433 onChanged();
434 return this;
435 }
436
437 @java.lang.Override
438 public final boolean isInitialized() {
439 return true;
440 }
441
442 @java.lang.Override
443 public Builder mergeFrom(
444 com.google.protobuf.CodedInputStream input,
445 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
446 throws java.io.IOException {
447 if (extensionRegistry == null) {
448 throw new java.lang.NullPointerException();
449 }
450 try {
451 boolean done = false;
452 while (!done) {
453 int tag = input.readTag();
454 switch (tag) {
455 case 0:
456 done = true;
457 break;
458 default: {
459 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
460 done = true; // was an endgroup tag
461 }
462 break;
463 } // default:
464 } // switch (tag)
465 } // while (!done)
466 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
467 throw e.unwrapIOException();
468 } finally {
469 onChanged();
470 } // finally
471 return this;
472 }
473
474 // @@protoc_insertion_point(builder_scope:operations_research.AcceptanceStrategy)
475 }
476
477 // @@protoc_insertion_point(class_scope:operations_research.AcceptanceStrategy)
478 private static final com.google.ortools.constraintsolver.AcceptanceStrategy DEFAULT_INSTANCE;
479 static {
480 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.AcceptanceStrategy();
481 }
482
484 return DEFAULT_INSTANCE;
485 }
486
487 private static final com.google.protobuf.Parser<AcceptanceStrategy>
488 PARSER = new com.google.protobuf.AbstractParser<AcceptanceStrategy>() {
489 @java.lang.Override
490 public AcceptanceStrategy parsePartialFrom(
491 com.google.protobuf.CodedInputStream input,
492 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
493 throws com.google.protobuf.InvalidProtocolBufferException {
494 Builder builder = newBuilder();
495 try {
496 builder.mergeFrom(input, extensionRegistry);
497 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
498 throw e.setUnfinishedMessage(builder.buildPartial());
499 } catch (com.google.protobuf.UninitializedMessageException e) {
500 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
501 } catch (java.io.IOException e) {
502 throw new com.google.protobuf.InvalidProtocolBufferException(e)
503 .setUnfinishedMessage(builder.buildPartial());
504 }
505 return builder.buildPartial();
506 }
507 };
508
509 public static com.google.protobuf.Parser<AcceptanceStrategy> parser() {
510 return PARSER;
511 }
512
513 @java.lang.Override
514 public com.google.protobuf.Parser<AcceptanceStrategy> getParserForType() {
515 return PARSER;
516 }
517
518 @java.lang.Override
520 return DEFAULT_INSTANCE;
521 }
522
523}
524
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.AcceptanceStrategy getDefaultInstanceForType()
com.google.ortools.constraintsolver.AcceptanceStrategy build()
Builder mergeFrom(com.google.ortools.constraintsolver.AcceptanceStrategy other)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.constraintsolver.AcceptanceStrategy buildPartial()
static com.google.ortools.constraintsolver.AcceptanceStrategy parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(byte[] data)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.constraintsolver.AcceptanceStrategy getDefaultInstance()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.AcceptanceStrategy getDefaultInstanceForType()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Parser< AcceptanceStrategy > getParserForType()
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< AcceptanceStrategy > parser()
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(com.google.protobuf.CodedInputStream input)
static Builder newBuilder(com.google.ortools.constraintsolver.AcceptanceStrategy prototype)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.AcceptanceStrategy parseFrom(com.google.protobuf.ByteString data)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
static com.google.protobuf.Internal.EnumLiteMap< Value > internalGetValueMap()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static Value valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)