# io.github.libtmux.Options.Options.setIfAbsent

- **Module:** io.github.libtmux.Options.Options
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/Options.java#L162
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-options-options-setifabsent/

```
io.github.libtmux.Options.Options.setIfAbsent(name: String, value: String) -> boolean
```

Sets one option only if this scope does not already set it.

<p>tmux reports the already-set case as an error, which it is not: declining to overwrite is
the whole point of asking. The answer comes back as a value instead.

## Returns

whether the value was taken, false when this scope already set the option
