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.

method libtmux-java latest

Selections.oneOrEmpty

The single match if there is one, empty if there is none — but still a failure for several.

Source and package
Qualified name
io.github.libtmux.query.Selections.oneOrEmpty
Package
io.github.libtmux.query
Declared in
Selections
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/query/Selections.java
public static <T> Optional<T> oneOrEmpty( Iterable<T> matches)

Description#

Returning the first of many would make a caller's ambiguous query look answered.

Type parameters
Parameters
Raises
Esc

Type to search.

Reference previewOpen reference