public class Cast extends UnaryExpression
| Constructor and Description |
|---|
Cast(Expression argument,
DataType castToType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
DataType |
getCastToType() |
Operator |
getOperator() |
DataType |
getReturnedDataType()
Validates the returned data type of the Expression.
|
int |
hashCode() |
static boolean |
isCastSupported(DataType sourceType,
DataType targetType) |
void |
setCastToType(DataType castToType) |
String |
toString() |
void |
validate()
Validates correctness of the Expression
|
allowedDataTypes, getArgument, getLeavesByType, setArgumentclone, getAppliableOperators, getExpressionsByCategorypublic Cast(Expression argument, DataType castToType)
public DataType getCastToType()
public void setCastToType(DataType castToType)
castToType - the castToType to setpublic Operator getOperator()
getOperator in class CompositeExpressionpublic DataType getReturnedDataType() throws NotEvaluableDataTypeException
ExpressiongetReturnedDataType in class ExpressionNotEvaluableDataTypeExceptionpublic String toString()
toString in class UnaryExpressionpublic int hashCode()
hashCode in class UnaryExpressionpublic boolean equals(Object obj)
equals in class UnaryExpressionpublic void validate()
throws MalformedExpressionException
Expressionvalidate in class UnaryExpressionMalformedExpressionExceptionCopyright © 2020. All Rights Reserved.