Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.util.OptionalBoolean Enum Reference
Inheritance diagram for com.google.ortools.util.OptionalBoolean:

Public Member Functions

final int getNumber ()
 
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor ()
 
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType ()
 

Static Public Member Functions

 [static initializer]
 
static OptionalBoolean valueOf (int value)
 
static OptionalBoolean forNumber (int value)
 
static com.google.protobuf.Internal.EnumLiteMap< OptionalBooleaninternalGetValueMap ()
 
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor ()
 
static OptionalBoolean valueOf (com.google.protobuf.Descriptors.EnumValueDescriptor desc)
 

Public Attributes

 BOOL_UNSPECIFIED =(0)
 
 BOOL_FALSE =(2)
 
 BOOL_TRUE =(3)
 
 UNRECOGNIZED =(-1)
 

Static Public Attributes

static final int BOOL_UNSPECIFIED_VALUE = 0
 
static final int BOOL_FALSE_VALUE = 2
 
static final int BOOL_TRUE_VALUE = 3
 

Detailed Description

A "three-way" boolean: unspecified, false or true.

We don't use the value of 1 to increase the chance to catch bugs: eg. in
python, a user may set a proto field of this type enum to a boolean value
without type checks, if they set it to True, the proto validity code will
catch it (because it'll be cast to 1, which is an invalid enum value).
Note that if the user sets if to False (i.e. 0), it will be caught by the
routing library's parameter validity check too.

Protobuf enum operations_research.OptionalBoolean

Definition at line 21 of file OptionalBoolean.java.

Member Function Documentation

◆ [static initializer]()

com.google.ortools.util.OptionalBoolean.[static initializer]
static

◆ forNumber()

static OptionalBoolean com.google.ortools.util.OptionalBoolean.forNumber ( int value)
static
Parameters
valueThe numeric wire value of the corresponding enum entry.
Returns
The enum associated with the given numeric wire value.

Definition at line 83 of file OptionalBoolean.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.EnumDescriptor com.google.ortools.util.OptionalBoolean.getDescriptor ( )
static

Definition at line 117 of file OptionalBoolean.java.

◆ getDescriptorForType()

final com.google.protobuf.Descriptors.EnumDescriptor com.google.ortools.util.OptionalBoolean.getDescriptorForType ( )

Definition at line 113 of file OptionalBoolean.java.

◆ getNumber()

final int com.google.ortools.util.OptionalBoolean.getNumber ( )

Definition at line 61 of file OptionalBoolean.java.

◆ getValueDescriptor()

final com.google.protobuf.Descriptors.EnumValueDescriptor com.google.ortools.util.OptionalBoolean.getValueDescriptor ( )

Definition at line 105 of file OptionalBoolean.java.

◆ internalGetValueMap()

static com.google.protobuf.Internal.EnumLiteMap< OptionalBoolean > com.google.ortools.util.OptionalBoolean.internalGetValueMap ( )
static

Definition at line 93 of file OptionalBoolean.java.

◆ valueOf() [1/2]

static OptionalBoolean com.google.ortools.util.OptionalBoolean.valueOf ( com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static

Definition at line 123 of file OptionalBoolean.java.

◆ valueOf() [2/2]

static OptionalBoolean com.google.ortools.util.OptionalBoolean.valueOf ( int value)
static
Parameters
valueThe numeric wire value of the corresponding enum entry.
Returns
The enum associated with the given numeric wire value.
Deprecated
Use forNumber(int) instead.

Definition at line 75 of file OptionalBoolean.java.

Member Data Documentation

◆ BOOL_FALSE

com.google.ortools.util.OptionalBoolean.BOOL_FALSE =(2)

BOOL_FALSE = 2;

Definition at line 30 of file OptionalBoolean.java.

◆ BOOL_FALSE_VALUE

final int com.google.ortools.util.OptionalBoolean.BOOL_FALSE_VALUE = 2
static

BOOL_FALSE = 2;

Definition at line 54 of file OptionalBoolean.java.

◆ BOOL_TRUE

com.google.ortools.util.OptionalBoolean.BOOL_TRUE =(3)

BOOL_TRUE = 3;

Definition at line 34 of file OptionalBoolean.java.

◆ BOOL_TRUE_VALUE

final int com.google.ortools.util.OptionalBoolean.BOOL_TRUE_VALUE = 3
static

BOOL_TRUE = 3;

Definition at line 58 of file OptionalBoolean.java.

◆ BOOL_UNSPECIFIED

com.google.ortools.util.OptionalBoolean.BOOL_UNSPECIFIED =(0)

BOOL_UNSPECIFIED = 0;

Definition at line 26 of file OptionalBoolean.java.

◆ BOOL_UNSPECIFIED_VALUE

final int com.google.ortools.util.OptionalBoolean.BOOL_UNSPECIFIED_VALUE = 0
static

BOOL_UNSPECIFIED = 0;

Definition at line 50 of file OptionalBoolean.java.

◆ UNRECOGNIZED

com.google.ortools.util.OptionalBoolean.UNRECOGNIZED =(-1)

Definition at line 35 of file OptionalBoolean.java.


The documentation for this enum was generated from the following file: