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

# WindowBound


```
@Beta
public final 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:

```
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

| ### Nested types |
|---|
| `public static class WindowBound.Companion` |

| ### Public fields |
|---|---|
| `static final @NonNull 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. |
| `static final @NonNull WindowBound` | `UNBOUNDED` No boundary in this direction. |

| ### Public methods |
|---|---|
| `boolean` | `equals(Object other)` |
| `int` | `hashCode()` |
| `@NonNull String` | `toString()` |

## Public fields

### CURRENT

```
public static final @NonNull 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.

### UNBOUNDED

```
public static final @NonNull WindowBound UNBOUNDED
```

No boundary in this direction.

## Public methods

### equals

```
public boolean equals(Object other)
```

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```