public class FormatVersion extends java.lang.Object implements java.lang.Comparable<FormatVersion>, java.lang.Cloneable
| Constructor and Description |
|---|
FormatVersion(int major,
int minor) |
| Modifier and Type | Method and Description |
|---|---|
FormatVersion |
clone() |
int |
compareTo(FormatVersion other)
Returns 0 if major and minor version are equal, 1 if this version is later than the specified one and -1 if the
specified version is later.
|
boolean |
equals(java.lang.Object obj)
Returns
true if the passed object is an instance of this class and major and minor version equal
to the values of this instance. |
boolean |
geraterThan(FormatVersion other)
Returns whether this version is newer than the specified argument.
|
int |
getMajor() |
int |
getMinor() |
int |
hashCode() |
static FormatVersion |
parseFormatVersion(java.lang.String text) |
void |
setMajor(int major) |
void |
setMinor(int minor) |
java.lang.String |
toString() |
public FormatVersion(int major, int minor)
public int getMajor()
public void setMajor(int major)
public int getMinor()
public void setMinor(int minor)
public static FormatVersion parseFormatVersion(java.lang.String text)
public boolean geraterThan(FormatVersion other)
other - the version to be compared with this onetrue if this version is newer than the specified argument or false otherwisepublic int compareTo(FormatVersion other)
compareTo in interface java.lang.Comparable<FormatVersion>other - the version to be compared to this oneComparable.compareTo(java.lang.Object)public FormatVersion clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
true if the passed object is an instance of this class and major and minor version equal
to the values of this instance.equals in class java.lang.Objectobj - the version to be compared to this onetrue of the versions are equal, false otherwisepublic java.lang.String toString()
toString in class java.lang.Object