filter
Selects the elements an expression matches.
Source and package
- Qualified name
-
io.github .libtmux .kotlin .Iterable. filter - Package
- io.github.libtmux.kotlin.Iterable
- Distribution
- io.github.libtmux:libtmux-kotlin
- Source
- libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Filters.kt
- public fun <T : Any> Iterable<T>.filter( expression: Filter
Expr <T> ): List<T>public fun Iterable<Session>.filter( expression: FilterExpr <JavaSession > ): List<Session>public fun Iterable<Window>.filter( expression: FilterExpr <JavaWindow > ): List<Window>public fun Iterable<Pane>.filter( expression: FilterExpr <JavaPane > ): List<Pane>public fun Iterable<Client>.filter( expression: FilterExpr <JavaClient > ): List<Client> -
Description
Kotlin's own
filtertakes a function, not ajava.util.function.Predicate, so handing it aFilterExprdoes not compile — the one place where reading the Java documentation and writing Kotlin part company. This is that overload, sopanes.filter(Pane_.active().isTrue())means what it appears to.The list is already in hand: this asks tmux nothing.
- Type parameters
- Parameters
-
-
expression(FilterExpr <T>) forfilter(expression) [overload 1] -
expression(FilterExpr <JavaSession >) forfilter(expression) [overload 2] -
expression(FilterExpr <JavaWindow >) forfilter(expression) [overload 3] -
expression(FilterExpr <JavaPane >) forfilter(expression) [overload 4] -
expression(FilterExpr <JavaClient >) forfilter(expression) [overload 5]
-
Recorded calls
source callsThe Kotlin reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls io.github.libtmux.kotlin.Iterable.filter.