Z3
Loading...
Searching...
No Matches
src
api
java
IntNum.java
Go to the documentation of this file.
1
18
package
com.microsoft.z3;
19
20
import
java.math.BigInteger;
21
25
public
class
IntNum
extends
IntExpr
26
{
27
28
IntNum
(
Context
ctx,
long
obj)
29
{
30
super(ctx, obj);
31
}
32
36
public
int
getInt
()
37
{
38
Native.IntPtr res =
new
Native.IntPtr();
39
if
(!Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res))
40
throw
new
Z3Exception
(
"Numeral is not an int"
);
41
return
res.value;
42
}
43
47
public
long
getInt64
()
48
{
49
Native.LongPtr res =
new
Native.LongPtr();
50
if
(!Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res))
51
throw
new
Z3Exception
(
"Numeral is not an int64"
);
52
return
res.value;
53
}
54
60
public
int
getUint
()
61
{
62
Native.IntPtr res =
new
Native.IntPtr();
63
if
(!Native.getNumeralUint(getContext().nCtx(), getNativeObject(), res))
64
throw
new
Z3Exception
(
"Numeral is not a uint"
);
65
return
res.value;
66
}
67
74
public
long
getUint64
()
75
{
76
Native.LongPtr res =
new
Native.LongPtr();
77
if
(!Native.getNumeralUint64(getContext().nCtx(), getNativeObject(), res))
78
throw
new
Z3Exception
(
"Numeral is not a uint64"
);
79
return
res.value;
80
}
81
85
public
BigInteger
getBigInteger
()
86
{
87
return
new
BigInteger(this.
toString
());
88
}
89
93
public
String
toString
() {
94
return
Native.getNumeralString(getContext().nCtx(), getNativeObject());
95
}
96
}
com.microsoft.z3.Context
Definition
Context.java:36
com.microsoft.z3.IntExpr
Definition
IntExpr.java:24
com.microsoft.z3.IntNum
Definition
IntNum.java:26
com.microsoft.z3.IntNum.getUint64
long getUint64()
Definition
IntNum.java:74
com.microsoft.z3.IntNum.getUint
int getUint()
Definition
IntNum.java:60
com.microsoft.z3.IntNum.getInt
int getInt()
Definition
IntNum.java:36
com.microsoft.z3.IntNum.getBigInteger
BigInteger getBigInteger()
Definition
IntNum.java:85
com.microsoft.z3.IntNum.toString
String toString()
Definition
IntNum.java:93
com.microsoft.z3.IntNum.getInt64
long getInt64()
Definition
IntNum.java:47
com.microsoft.z3.Z3Exception
Definition
Z3Exception.java:26
Generated on Fri Jul 17 2026 02:38:47 for Z3 by
1.9.8