Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
CpSolverStatus.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/sat/cp_model.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.sat;
7
15@com.google.protobuf.Generated
16public enum CpSolverStatus
17 implements com.google.protobuf.ProtocolMessageEnum {
70 ;
71
72 static {
73 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
74 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
75 /* major= */ 4,
76 /* minor= */ 31,
77 /* patch= */ 1,
78 /* suffix= */ "",
79 CpSolverStatus.class.getName());
80 }
81
89 public static final int UNKNOWN_VALUE = 0;
98 public static final int MODEL_INVALID_VALUE = 1;
108 public static final int FEASIBLE_VALUE = 2;
116 public static final int INFEASIBLE_VALUE = 3;
131 public static final int OPTIMAL_VALUE = 4;
132
133
134 public final int getNumber() {
135 if (this == UNRECOGNIZED) {
136 throw new java.lang.IllegalArgumentException(
137 "Can't get the number of an unknown enum value.");
138 }
139 return value;
140 }
141
147 @java.lang.Deprecated
148 public static CpSolverStatus valueOf(int value) {
149 return forNumber(value);
150 }
151
156 public static CpSolverStatus forNumber(int value) {
157 switch (value) {
158 case 0: return UNKNOWN;
159 case 1: return MODEL_INVALID;
160 case 2: return FEASIBLE;
161 case 3: return INFEASIBLE;
162 case 4: return OPTIMAL;
163 default: return null;
164 }
165 }
166
167 public static com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>
169 return internalValueMap;
170 }
171 private static final com.google.protobuf.Internal.EnumLiteMap<
172 CpSolverStatus> internalValueMap =
173 new com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>() {
174 public CpSolverStatus findValueByNumber(int number) {
175 return CpSolverStatus.forNumber(number);
176 }
177 };
178
179 public final com.google.protobuf.Descriptors.EnumValueDescriptor
181 if (this == UNRECOGNIZED) {
182 throw new java.lang.IllegalStateException(
183 "Can't get the descriptor of an unrecognized enum value.");
184 }
185 return getDescriptor().getValues().get(ordinal());
186 }
187 public final com.google.protobuf.Descriptors.EnumDescriptor
189 return getDescriptor();
190 }
191 public static com.google.protobuf.Descriptors.EnumDescriptor
193 return com.google.ortools.sat.CpModelProtobuf.getDescriptor().getEnumTypes().get(0);
194 }
195
196 private static final CpSolverStatus[] VALUES = values();
197
198 public static CpSolverStatus valueOf(
199 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
200 if (desc.getType() != getDescriptor()) {
201 throw new java.lang.IllegalArgumentException(
202 "EnumValueDescriptor is not for this type.");
203 }
204 if (desc.getIndex() == -1) {
205 return UNRECOGNIZED;
206 }
207 return VALUES[desc.getIndex()];
208 }
209
210 private final int value;
211
212 private CpSolverStatus(int value) {
213 this.value = value;
214 }
215
216 // @@protoc_insertion_point(enum_scope:operations_research.sat.CpSolverStatus)
217}
218
static CpSolverStatus valueOf(int value)
static CpSolverStatus forNumber(int value)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< CpSolverStatus > internalGetValueMap()
static CpSolverStatus valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)