Package it.unive.lisa.symbolic.value
Class BinaryExpression
- java.lang.Object
-
- it.unive.lisa.symbolic.SymbolicExpression
-
- it.unive.lisa.symbolic.value.ValueExpression
-
- it.unive.lisa.symbolic.value.BinaryExpression
-
public class BinaryExpression extends ValueExpression
A bynary expression that applies aBinaryOperatorto twoSymbolicExpressions.
-
-
Constructor Summary
Constructors Constructor Description BinaryExpression(ExternalSet<Type> types, SymbolicExpression left, SymbolicExpression right, BinaryOperator operator)Builds the binary expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)SymbolicExpressiongetLeft()Yields the left-hand side operand of this expression.BinaryOperatorgetOperator()Yields the operator that is applied togetLeft()andgetRight().SymbolicExpressiongetRight()Yields the right-hand side operand of this expression.inthashCode()java.lang.StringtoString()-
Methods inherited from class it.unive.lisa.symbolic.SymbolicExpression
getDynamicType, getTypes
-
-
-
-
Constructor Detail
-
BinaryExpression
public BinaryExpression(ExternalSet<Type> types, SymbolicExpression left, SymbolicExpression right, BinaryOperator operator)
Builds the binary expression.- Parameters:
types- the runtime types of this expressionleft- the left-hand side operand of this expressionright- the right-hand side operand of this expressionoperator- the operator to apply
-
-
Method Detail
-
getLeft
public SymbolicExpression getLeft()
Yields the left-hand side operand of this expression.- Returns:
- the left operand
-
getRight
public SymbolicExpression getRight()
Yields the right-hand side operand of this expression.- Returns:
- the right operand
-
getOperator
public BinaryOperator getOperator()
Yields the operator that is applied togetLeft()andgetRight().- Returns:
- the operator to apply
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSymbolicExpression
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classSymbolicExpression
-
toString
public java.lang.String toString()
- Specified by:
toStringin classSymbolicExpression
-
-