# Comprehension

# Comprehension


```
sealed class Comprehension : 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.Comprehension](https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension) |

Known direct subclasses [ListAllMatch](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAllMatch), [ListAnyMatch](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAnyMatch), [ListFilter](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListFilter), [ListMap](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListMap), [ListNoneMatch](https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListNoneMatch)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAllMatch` | Represents the "all match" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListAnyMatch` | Represents the "any match" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListFilter` | Represents the "filter" operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListMap` | Represents the map operation on a list expression. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ListNoneMatch` | Represents the "none match" operation on a list expression. |

*** ** * ** ***

Represents list comprehension expressions.

## Summary

| ### Protected constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension#Comprehension(com.google.home.automation.Expression,com.google.home.automation.ReferenceDeclaration,com.google.home.automation.Expression)( rangeExpression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression, lambdaVar: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ReferenceDeclaration, lambdaBody: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression )` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension#Comprehension(com.google.home.automation.Expression,com.google.home.automation.ReferenceDeclaration,com.google.home.automation.Expression,kotlin.String)( rangeExpression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression, lambdaVar: https://developers.home.google.com/reference/kotlin/com/google/home/automation/ReferenceDeclaration, lambdaBody: 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/Comprehension#lambdaBody()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/ReferenceDeclaration` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension#lambdaVar()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Expression` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Comprehension#rangeExpression()` |

## Protected constructors

### Comprehension

```
protected Comprehension(
    rangeExpression: Expression,
    lambdaVar: ReferenceDeclaration,
    lambdaBody: Expression
)
```

### Comprehension

```
protected Comprehension(
    rangeExpression: Expression,
    lambdaVar: ReferenceDeclaration,
    lambdaBody: Expression,
    expressionId: String
)
```

## Public properties

### lambdaBody

```
val lambdaBody: Expression
```

### lambdaVar

```
val lambdaVar: ReferenceDeclaration
```

### rangeExpression

```
val rangeExpression: Expression
```