Z3
src
api
java
enumerations
Z3_lbool.java
Go to the documentation of this file.
1
5
package
com.microsoft.z3.enumerations;
6
7
import
java.util.HashMap;
8
import
java.util.Map;
9
13
public
enum
Z3_lbool
{
14
Z3_L_FALSE
(-1),
15
Z3_L_UNDEF
(0),
16
Z3_L_TRUE
(1);
17
18
private
final
int
intValue;
19
20
Z3_lbool
(
int
v) {
21
this.intValue = v;
22
}
23
24
// Cannot initialize map in constructor, so need to do it lazily.
25
// Easiest thread-safe way is the initialization-on-demand holder pattern.
26
private
static
class
Z3_lbool_MappingHolder {
27
private
static
final
Map<Integer, Z3_lbool> intMapping =
new
HashMap<>();
28
static
{
29
for
(
Z3_lbool
k :
Z3_lbool
.values())
30
intMapping.put(k.toInt(), k);
31
}
32
}
33
34
public
static
final
Z3_lbool
fromInt
(
int
v) {
35
Z3_lbool
k = Z3_lbool_MappingHolder.intMapping.get(v);
36
if
(k != null)
return
k;
37
throw
new
IllegalArgumentException(
"Illegal value "
+ v +
" for Z3_lbool"
);
38
}
39
40
public
final
int
toInt
() {
return
this.intValue; }
41
}
42
com.microsoft.z3.enumerations.Z3_lbool.Z3_lbool
Z3_lbool(int v)
Definition:
Z3_lbool.java:20
com.microsoft.z3.enumerations.Z3_lbool
Definition:
Z3_lbool.java:13
com.microsoft.z3.enumerations.Z3_lbool.Z3_L_FALSE
Z3_L_FALSE
Definition:
Z3_lbool.java:14
com.microsoft.z3.enumerations.Z3_lbool.Z3_L_TRUE
Z3_L_TRUE
Definition:
Z3_lbool.java:16
com.microsoft.z3.enumerations.Z3_lbool.Z3_L_UNDEF
Z3_L_UNDEF
Definition:
Z3_lbool.java:15
com.microsoft.z3.enumerations.Z3_lbool.toInt
final int toInt()
Definition:
Z3_lbool.java:40
com.microsoft.z3.enumerations.Z3_lbool.fromInt
static final Z3_lbool fromInt(int v)
Definition:
Z3_lbool.java:34
Generated on Sat Nov 12 2016 22:01:04 for Z3 by
1.8.12