# BinaryExpression

# BinaryExpression


```
sealed class BinaryExpression : ExpressionWithId
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [com.google.home.automation.ExpressionWithId](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ExpressionWithId) ||
|   | ↳ | [com.google.home.automation.BinaryExpression](https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression) |

Known direct subclasses [And](https://developers.home.google.com/reference/kotlin/com/google/home/automation/And), [Divide](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Divide), [Equals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Equals), [GreaterThanOrEquals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThanOrEquals), [GreaterThan](https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThan), [LessThanOrEquals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThanOrEquals), [LessThan](https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThan), [Minus](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Minus), [Multiply](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Multiply), [NotEquals](https://developers.home.google.com/reference/kotlin/com/google/home/automation/NotEquals), [Or](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Or), [Plus](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Plus)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/And` | The logical AND operator. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Divide` | The DIVIDE operator, which calculates `operand1 / operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Equals` | The equality operator, which evaluates to `true` when `operand1` equals `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThanOrEquals` | The greater-than-or-equal-to operator, which evaluates to `true` when `operand1` `>=` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/GreaterThan` | The greater-than operator, which evaluates to `true` when `operand1` `>` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThanOrEquals` | The less-than-or-equal-to operator, which evaluates to `true` when `operand1` `<=` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/LessThan` | The less-than operator, which evaluates to `true` when `operand1` `<` `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Minus` | The MINUS operator, which calculates `operand1 - operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Multiply` | The MULTIPLY operator, which calculates `operand1 * operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/NotEquals` | The not-equals operator, which evaluates to `true` when `operand1` is not equal to `operand2`. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Or` | The logical OR operator. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Plus` | The PLUS operator, which calculates `operand1 + operand2`. |

*** ** * ** ***

Represents a binary expression with two operands: "`operand1` `operator` `operand2`".

## Summary

| ### Protected constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression#BinaryExpression(com.google.home.automation.Expression,com.google.home.automation.Expression)(operand1: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression, operand2: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression)` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression#BinaryExpression(com.google.home.automation.Expression,com.google.home.automation.Expression,kotlin.String)( operand1: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression, operand2: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression, expressionId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html )` |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression#operand1()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BinaryExpression#operand2()` |

## Protected constructors

### BinaryExpression

```
protected BinaryExpression(operand1: Expression, operand2: Expression)
```

### BinaryExpression

```
protected BinaryExpression(
    operand1: Expression,
    operand2: Expression,
    expressionId: String
)
```

## Public properties

### operand1

```
val operand1: Expression
```

### operand2

```
val operand2: Expression
```