public enum Condition extends Enum<Condition>
Enum Constant and Description |
---|
AE
Unsigned greater than or equal ("above than or equal").
|
AT
Unsigned greater than ("above than").
|
BE
Unsigned less than or equal ("below than or equal").
|
BT
Unsigned less than ("below than").
|
EQ
Equal.
|
GE
Signed greater than or equal.
|
GT
Signed greater than.
|
LE
Signed less than or equal.
|
LT
Signed less than.
|
NE
Not equal.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canonicalMirror()
Returns true if the condition needs to be mirrored to get to a canonical condition.
|
boolean |
canonicalNegate()
Returns true if the condition needs to be negated to get to a canonical condition.
|
boolean |
check(int left,
int right) |
boolean |
foldCondition(Constant lt,
Constant rt,
ConstantReflectionProvider constantReflection,
boolean unorderedIsTrue)
Attempts to fold a comparison between two constants and return the result.
|
boolean |
foldCondition(JavaConstant lt,
JavaConstant rt,
ConstantReflectionProvider constantReflection)
Attempts to fold a comparison between two constants and return the result.
|
boolean |
implies(Condition other) |
boolean |
isCanonical()
Given a condition and its negation, this method returns true for one of the two and false for
the other one.
|
boolean |
isCommutative()
Checks if this conditional operation is commutative.
|
boolean |
isUnsigned()
Returns true if this condition represents an unsigned comparison.
|
Condition |
join(Condition other) |
Condition |
meet(Condition other) |
Condition |
mirror()
Mirror this conditional (i.e.
|
Condition |
negate()
Negate this conditional.
|
static Condition |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Condition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Condition[] values()
for (Condition c : Condition.values()) System.out.println(c);
public static Condition valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean check(int left, int right)
public boolean isCanonical()
public boolean canonicalMirror()
public boolean canonicalNegate()
public final Condition negate()
public final Condition mirror()
public final boolean isUnsigned()
public final boolean isCommutative()
true
if this operation is commutativepublic boolean foldCondition(JavaConstant lt, JavaConstant rt, ConstantReflectionProvider constantReflection)
lt
- the constant on the left side of the comparisonrt
- the constant on the right side of the comparisonconstantReflection
- needed to compare constantsBoolean.TRUE
if the comparison is known to be true, Boolean.FALSE
if
the comparison is known to be falsepublic boolean foldCondition(Constant lt, Constant rt, ConstantReflectionProvider constantReflection, boolean unorderedIsTrue)
lt
- the constant on the left side of the comparisonrt
- the constant on the right side of the comparisonconstantReflection
- needed to compare constantsunorderedIsTrue
- true if an undecided float comparison should result in "true"