Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

interface libtmux-java latest

FilterExpr

A filter that is both runnable and readable.

Source and package
Qualified name
io.github.libtmux.query.FilterExpr
Package
io.github.libtmux.query
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/query/FilterExpr.java
interface io.github.libtmux.query.FilterExpr

Description#

It extends Predicate, so 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 -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.

Type parameters

Members11#

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

Guides#

Pages that discuss FilterExpr.

Esc

Type to search.

Reference previewOpen reference