Package htsjdk.beta.plugin

# Class HtsVersion

java.lang.Object
htsjdk.beta.plugin.HtsVersion

All Implemented Interfaces:
  `Comparable<HtsVersion>`

public class HtsVersion extends Object implements Comparable<HtsVersion>
A class for representing 3-part versions with major, minor and patch segments. Used by `HtsCodec`, `HtsEncoder` and `HtsDecoder` for HTS file format and codec versions.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final HtsVersion`
`NEWEST_VERSION`
Sentinel constant used to indicate the newest version available

## Constructor Summary

Constructors
Constructor
Description
`HtsVersion(int major, int minor, int patch)`
Construct a 3 part version number.
`HtsVersion(String versionString)`
Construct a 3 part version number from a string withe the format `major.minor.patch`, where each of major/minor/patch is an integer.

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(HtsVersion o)`
`boolean`
`equals(Object o)`
`int`
`getMajorVersion()`
Get the major version integer for this version.
`int`
`getMinorVersion()`
Get the minor version integer for this version.
`int`
`getPatchVersion()`
Get the patch version integer for this version.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### NEWEST_VERSION

public static final HtsVersion NEWEST_VERSION
Sentinel constant used to indicate the newest version available

## Constructor Details

### HtsVersion

public HtsVersion(int major, int minor, int patch)
Construct a 3 part version number.

Parameters:
  `major` - major version number
  `minor` - minor version number
  `patch` - patch number

### HtsVersion

public HtsVersion(String versionString)
Construct a 3 part version number from a string withe the format `major.minor.patch`, where each of major/minor/patch is an integer.

Parameters:
  `versionString` - the version string from which to construct this version

## Method Details

### getMajorVersion

public int getMajorVersion()
Get the major version integer for this version.

Returns:
  the major version integer for this version

### getMinorVersion

public int getMinorVersion()
Get the minor version integer for this version.

Returns:
  the minor version integer for this version

### getPatchVersion

public int getPatchVersion()
Get the patch version integer for this version.

Returns:
  the patch version integer for this version

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### compareTo

public int compareTo(HtsVersion o)

Specified by:
  `compareTo` in interface `Comparable<HtsVersion>`