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.

class libtmux-java latest

TmuxVersion

A released tmux version, ordered the way tmux releases are.

Source and package
Qualified name
io.github.libtmux.TmuxVersion
Package
io.github.libtmux
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/TmuxVersion.java
class io.github.libtmux.TmuxVersion ( major: int, minor: int, patch: String, development: boolean, preRelease: String )

Description#

tmux numbers a patch release with a letter rather than a third number: 3.7a follows 3.7, and 3.3a follows 3.3. Comparing the text alone gets that wrong in both directions, and a feature gate that gets it wrong reads a format the running tmux does not have.

Between releases, tmux reports itself as next-M.m: a development build tracking toward the release named, not that release itself. It has everything the previous release shipped and nothing later's patches guarantee, so it sorts strictly between the two — above every patch of the release before it, below the release it names and every patch of that.

A release candidate, X.Y-rc, orders below the release it names (next-X.Y < X.Y-rc < X.Y-rc2 < X.Y < X.Ya), so #compareTo() agrees with #equals, and #atLeast() follows the same order. A gate names the release that ships the behaviour, such as 3.8 for JSON layouts. A gate on one release's own bug asks #sameRelease(). The version is written back exactly as tmux wrote it, which matters beyond display: every capture is fenced on the version tmux reports, and a version printed in any other spelling fails that fence on every read.

Parameters
  • major (int) # – the major number

  • minor (int) # – the minor number

  • patch (String) # – the patch letter, or empty for an unlettered release

  • development (boolean) # – whether this is a next-M.m build rather than the release M.m itself

  • preRelease (String) # – the release candidate this is, such as rc or rc2, or empty for a release

Members12#

  • atLeast method Whether this version ranks at or above the given one in #compareTo()'s order.
  • compareTo method next-X.Y < X.Y-rc < X.Y-rcN < X.Y < X.Ya, so it agrees with #equals.
  • development method whether this is a next-M.m build rather than the release M.m itself
  • major method the major number
  • MINIMUM: TmuxVersion attribute The oldest tmux this library supports; an older one is refused before any request is sent.
  • minor method the minor number
  • parse method Reads what tmux reports for #{version}.
  • patch method the patch letter, or empty for an unlettered release
  • preRelease method the release candidate this is, such as rc or rc2, or empty for a release
  • sameRelease method Whether this is the named release, a release candidate for it included. next- builds and other releases are not. For a gate on one release's own bug.
  • TmuxVersion method A release or a development build, without a release candidate.
  • toString method
Esc

Type to search.

Reference previewOpen reference