> Documentation index: https://firebase.google.com/docs/reference/llms.txt

# WindowBound


```
@Beta
class WindowBound
```

<br />

*** ** * ** ***

A symbolic window frame boundary, as opposed to a numeric offset.

Window Functions SDK features are in preview until the backend feature launches. Look for launch announcement at: https://docs.cloud.google.com/firestore/docs/release-notes

Use these constants for symbolic bounds, and plain numbers for offsets:

```kotlin
WindowSpec().documents(WindowBound.UNBOUNDED, WindowBound.CURRENT) // symbolic
WindowSpec().range(30, WindowBound.CURRENT, "day")                 // mixed
WindowSpec().documents(-1, 2)                                      // numeric offsets
```

In a `documents` frame, `CURRENT` refers strictly to the current document's position (documents with tied sort values are not included). In a `range` frame, `CURRENT` is peer-inclusive (like SQL `CURRENT ROW` in `RANGE` mode): it includes the current document and all peer documents whose sort value(s) tie with the current document, making it semantically equivalent to a numeric offset of `0` (though `CURRENT` and `0` still encode differently on the wire as `"current"` vs `0`).

## Summary

| ### Public companion properties |
|---|---|
| `WindowBound` | `CURRENT` The current document's position in a `documents` frame, or the current document and all peers with tied sort values in a `range` frame. |
| `WindowBound` | `UNBOUNDED` No boundary in this direction. |

| ### Public functions |
|---|---|
| `open operator Boolean` | `equals(other: Any?)` |
| `open Int` | `hashCode()` |
| `open String` | `toString()` |

## Public companion properties

### CURRENT

```
val CURRENT: WindowBound
```

The current document's position in a `documents` frame, or the current document and all peers with tied sort values in a `range` frame.

### UNBOUNDED

```
val UNBOUNDED: WindowBound
```

No boundary in this direction.

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```