mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
Java API: 32-bit issues and bugfixes.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
9b2236361c
commit
692593baaa
8 changed files with 119 additions and 71 deletions
|
@ -37,10 +37,15 @@ public class AST extends Z3Object
|
|||
**/
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
AST casted = (AST) o;
|
||||
if (casted == null)
|
||||
return false;
|
||||
return this == casted;
|
||||
AST casted = null;
|
||||
|
||||
try {
|
||||
casted = AST.class.cast(o);
|
||||
} catch (ClassCastException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.NativeObject() == casted.NativeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,18 +58,20 @@ public class AST extends Z3Object
|
|||
{
|
||||
if (other == null)
|
||||
return 1;
|
||||
AST oAST = (AST) other;
|
||||
if (oAST == null)
|
||||
return 1;
|
||||
else
|
||||
{
|
||||
if (Id() < oAST.Id())
|
||||
return -1;
|
||||
else if (Id() > oAST.Id())
|
||||
return +1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
AST oAST = null;
|
||||
try {
|
||||
AST.class.cast(other);
|
||||
} catch (ClassCastException e) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (Id() < oAST.Id())
|
||||
return -1;
|
||||
else if (Id() > oAST.Id())
|
||||
return +1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue