# io.github.libtmux.query.FilterExpr.FilterExpr

- **Module:** io.github.libtmux.query.FilterExpr
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** interface
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/query/FilterExpr.java#L21
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-query-filterexpr-filterexpr/

A filter that is both runnable and readable.

<p>It extends {@link Predicate}, so {@code stream().filter(expr)} works with no adapter, and it is
a sealed tree of records, so the same value can be printed, serialized, or later compiled into a
tmux {@code -f} filter. A lambda can do the first of those and none of the rest, which is why
named expressions are built from these nodes instead.

<p>Evaluation is a total function over the tree: every consumer switches exhaustively, so adding a
node breaks compilation at each site that has to learn about it rather than at runtime.

## Members

- `describe` (method) — Renders the expression as inspectable text. Deliberately not {@code toString} on records.
- `and` (method)
- `or` (method)
- `negate` (method) — Negation, narrowed to an expression.
- `And` (struct) — Conjunction. An empty conjunction is true, which is what makes it a safe identity.
- `Or` (struct) — Disjunction. An empty disjunction is false.
- `Not` (struct)
- `Compare` (struct) — One scalar field compared to one operand.
- `ToMany` (struct) — A quantified filter over a to-many relation.
- `ToOne` (struct) — A to-one relation. An absent target does not satisfy the filter.
- `Quantifier` (enum)
