|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<CompareExpression.Comparison> dk.rode.thesis.interpreter.CompareExpression.Comparison
public static enum CompareExpression.Comparison
The comparison type to be performed by a
compare
expression.
Enum Constant Summary | |
---|---|
EQUAL
Compares expression a and b to see
if they are equal. |
|
GREATER
Compares expression a and b to see
if a is greater. |
|
GREATER_EQUAL
Compares expression a and b to see
if a is equal or greater. |
|
NOT_EQUAL
Compares expression a and b to see
if they are not equal. |
|
SMALLER
Compares expression a and b to see
if a is smaller. |
|
SMALLER_EQUAL
Compares expression a and b to see
if a is smaller or equal. |
Method Summary | |
---|---|
protected abstract String |
asSymbol()
Return the symbol of this comparison type. |
protected abstract boolean |
matches(int value)
Return true if this comparison type matches the value supplied as value , false if not. |
static CompareExpression.Comparison |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CompareExpression.Comparison[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final CompareExpression.Comparison EQUAL
a
and b
to see
if they are equal.
public static final CompareExpression.Comparison GREATER
a
and b
to see
if a
is greater.
public static final CompareExpression.Comparison GREATER_EQUAL
a
and b
to see
if a
is equal or greater.
public static final CompareExpression.Comparison NOT_EQUAL
a
and b
to see
if they are not equal.
public static final CompareExpression.Comparison SMALLER
a
and b
to see
if a
is smaller.
public static final CompareExpression.Comparison SMALLER_EQUAL
a
and b
to see
if a
is smaller or equal.
Method Detail |
---|
protected abstract String asSymbol()
protected abstract boolean matches(int value)
value
, false if not.
value
- The value to test.
value
,
false if it does not.public static CompareExpression.Comparison valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static CompareExpression.Comparison[] values()
for (CompareExpression.Comparison c : CompareExpression.Comparison.values()) System.out.println(c);
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |