# io.github.libtmux.WindowSpec.WindowSpec.replaceExisting

- **Module:** io.github.libtmux.WindowSpec.WindowSpec
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/WindowSpec.java#L100
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-windowspec-windowspec-replaceexisting/

```
io.github.libtmux.WindowSpec.WindowSpec.replaceExisting() -> boolean
```

Whether a window already at the target index is destroyed to make room.

Only means anything alongside {@link Builder#atIndex}: tmux has nothing to replace when it
is choosing the index itself.
