Package htsjdk.samtools.cram.common
Class CRAMVersion
- java.lang.Object
-
- htsjdk.samtools.cram.common.CRAMVersion
-
- All Implemented Interfaces:
Comparable<CRAMVersion>
public final class CRAMVersion extends Object implements Comparable<CRAMVersion>
A class to represent a version information, 3 number: major, minor and build number.
-
-
Constructor Summary
Constructors Constructor Description CRAMVersion(int major, int minor)
CRAMVersion(String version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CRAMVersion o)
Compare with another version.boolean
compatibleWith(CRAMVersion cramVersion)
boolean
equals(Object o)
Check if another version is exactly the same as this one.int
getMajor()
int
getMinor()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
CRAMVersion
public CRAMVersion(int major, int minor)
-
CRAMVersion
public CRAMVersion(String version)
-
-
Method Detail
-
getMajor
public int getMajor()
- Returns:
- the CRAM major version for this CRAMVersion
-
getMinor
public int getMinor()
- Returns:
- the CRAM minor version for this CRAMVersion
-
compareTo
public int compareTo(CRAMVersion o)
Compare with another version.- Specified by:
compareTo
in interfaceComparable<CRAMVersion>
- Parameters:
o
- another version- Returns:
- 0 if both versions are the same, a negative if the other version is higher and a positive otherwise.
-
compatibleWith
public boolean compatibleWith(CRAMVersion cramVersion)
-
equals
public boolean equals(Object o)
Check if another version is exactly the same as this one.
-
-