# 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/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/query/FilterExpr.java#L21
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-query-filterexpr-filterexpr/

A filter that is both runnable and readable.

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.

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)
