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