Google OR-Tools v9.9
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// source: ortools/sat/cp_model.proto
3
4// Protobuf Java Version: 3.25.3
5package com.google.ortools.sat;
6
14public enum CpSolverStatus
15 implements com.google.protobuf.ProtocolMessageEnum {
68 ;
69
78 public static final int UNKNOWN_VALUE = 0;
87 public static final int MODEL_INVALID_VALUE = 1;
97 public static final int FEASIBLE_VALUE = 2;
105 public static final int INFEASIBLE_VALUE = 3;
120 public static final int OPTIMAL_VALUE = 4;
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 CpSolverStatus valueOf(int value) {
138 return forNumber(value);
139 }
140
145 public static CpSolverStatus forNumber(int value) {
146 switch (value) {
147 case 0: return UNKNOWN;
148 case 1: return MODEL_INVALID;
149 case 2: return FEASIBLE;
150 case 3: return INFEASIBLE;
151 case 4: return OPTIMAL;
152 default: return null;
153 }
154 }
155
156 public static com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>
158 return internalValueMap;
159 }
160 private static final com.google.protobuf.Internal.EnumLiteMap<
161 CpSolverStatus> internalValueMap =
162 new com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>() {
163 public CpSolverStatus findValueByNumber(int number) {
164 return CpSolverStatus.forNumber(number);
165 }
166 };
167
168 public final com.google.protobuf.Descriptors.EnumValueDescriptor
170 if (this == UNRECOGNIZED) {
171 throw new java.lang.IllegalStateException(
172 "Can't get the descriptor of an unrecognized enum value.");
173 }
174 return getDescriptor().getValues().get(ordinal());
175 }
176 public final com.google.protobuf.Descriptors.EnumDescriptor
178 return getDescriptor();
179 }
180 public static final com.google.protobuf.Descriptors.EnumDescriptor
182 return com.google.ortools.sat.CpModelProtobuf.getDescriptor().getEnumTypes().get(0);
183 }
184
185 private static final CpSolverStatus[] VALUES = values();
186
187 public static CpSolverStatus valueOf(
188 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
189 if (desc.getType() != getDescriptor()) {
190 throw new java.lang.IllegalArgumentException(
191 "EnumValueDescriptor is not for this type.");
192 }
193 if (desc.getIndex() == -1) {
194 return UNRECOGNIZED;
195 }
196 return VALUES[desc.getIndex()];
197 }
198
199 private final int value;
200
201 private CpSolverStatus(int value) {
202 this.value = value;
203 }
204
205 // @@protoc_insertion_point(enum_scope:operations_research.sat.CpSolverStatus)
206}
207
static CpSolverStatus valueOf(int value)
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
static CpSolverStatus forNumber(int value)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< CpSolverStatus > internalGetValueMap()
static CpSolverStatus valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)