Core LibraryAPI Reference

Choose documentation 1

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function libtmux-kotlin latest

not

Package io.github.libtmux.query.FilterExpr.not io.github.libtmux.query.FilterExpr

Inverts an expression, so !Pane_.active().isTrue() says what it means.

View as Markdown

Source and package
Module
io.github.libtmux.query.FilterExpr
Package
io.github.libtmux:libtmux-kotlin
Source
libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Filters.kt
public operator fun <T : Any> FilterExpr<T>.not(): FilterExpr<T>
function [source]

Description#

There is no matching and or or here, deliberately. Those are already methods on FilterExpr , and an extension of the same name would be shadowed by the member inside its own body while winning at an infix call site — correct either way, but for a reason no reader should have to work out. a.and(b) is one character longer than a and b and always means the thing it appears to.

negate rather than not on the Java side because java.util.function.Predicate already owns not , and these expressions are predicates.

The bound is T : Any rather than T , and that is not a style choice. The core is @NullMarked, so Kotlin reads FilterExpr as `FilterExpr<T : Any>; an unboundedThere would admit a nullable entity the core says cannot exist. Compiled with-Xjspecify-annotations=strict`, so it is an error rather than a warning — this file did not compile until the bound was written.

Esc

Type to search.