public class ExprComparator extends Object implements Comparator<net.sourceforge.czt.z.ast.Expr>, Serializable
Modifier and Type | Field and Description |
---|---|
static int |
EQUAL |
static int |
GREATERTHAN |
static int |
LESSTHAN |
Modifier and Type | Method and Description |
---|---|
int |
compare(net.sourceforge.czt.z.ast.Expr arg0,
net.sourceforge.czt.z.ast.Expr arg1) |
static ExprComparator |
create() |
static boolean |
equalZ(net.sourceforge.czt.z.ast.Expr e1,
net.sourceforge.czt.z.ast.Expr e2)
A convenience method that checks equality according to Z semantics.
|
static int |
exprType(Object e)
Maps evaluated expressions into equivalence classes.
|
int |
sign(int difference)
Converts an integer difference into -1, 0, or +1.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final int LESSTHAN
public static final int EQUAL
public static final int GREATERTHAN
public static ExprComparator create()
public int sign(int difference)
public static boolean equalZ(net.sourceforge.czt.z.ast.Expr e1, net.sourceforge.czt.z.ast.Expr e2)
e1
- An evaluated expression, such as an EvalSete2
- Another evaluated expression.public int compare(net.sourceforge.czt.z.ast.Expr arg0, net.sourceforge.czt.z.ast.Expr arg1)
compare
in interface Comparator<net.sourceforge.czt.z.ast.Expr>
public static int exprType(Object e)
e
- The expression to classify.RuntimeException
- if it e is an unknown kind of
Expr to ZLive, or if it is not fully evaluated.Copyright © 2003–2016 Community Z Tools Project. All rights reserved.