* possible.
*/
public boolean toBooleanValue() {
switch (this.expressionType) {
case intType:
throw new EARuntimeError("Type Mismatch: can't convert "
+ this.intValue + " to boolean.");
case floatingType:
throw new EARuntimeError("Type Mismatch: can't convert "
+ this.floatValue + " to boolean.");
case booleanType:
return this.boolValue;
case stringType:
throw new EARuntimeError("Type Mismatch: can't convert "
+ this.stringValue + " to boolean.");
case enumType:
throw new EARuntimeError(
"Type Mismatch: can't convert enum to boolean.");
default:
throw new EARuntimeError("Unknown type: " + this.expressionType);
}
}