-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntSymbol.java
More file actions
44 lines (38 loc) · 1.15 KB
/
IntSymbol.java
File metadata and controls
44 lines (38 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* This file was automatically generated from IntSymbol.cs
* w/ further modifications by:
* @author Christoph M. Wintersteiger (cwinter)
**/
package com.microsoft.z3;
import com.microsoft.z3.enumerations.Z3_symbol_kind;
/**
* Numbered symbols
**/
public class IntSymbol extends Symbol
{
/**
* The int value of the symbol. <remarks>Throws an exception if the symbol
* is not of int kind. </remarks>
**/
public int getInt() throws Z3Exception
{
if (!isIntSymbol())
throw new Z3Exception("Int requested from non-Int symbol");
return Native.getSymbolInt(getContext().nCtx(), getNativeObject());
}
IntSymbol(Context ctx, long obj) throws Z3Exception
{
super(ctx, obj);
}
IntSymbol(Context ctx, int i) throws Z3Exception
{
super(ctx, Native.mkIntSymbol(ctx.nCtx(), i));
}
void checkNativeObject(long obj) throws Z3Exception
{
if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_INT_SYMBOL
.toInt())
throw new Z3Exception("Symbol is not of integer kind");
super.checkNativeObject(obj);
}
}