public class FormatVersion extends Object implements Comparable<FormatVersion>, 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(Object other)
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() |
void |
setMajor(int major) |
void |
setMinor(int minor) |
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 boolean geraterThan(FormatVersion other)
other
- the version to be compared with this onepublic int compareTo(FormatVersion other)
compareTo
in interface Comparable<FormatVersion>
other
- the version to be compared to this oneComparable.compareTo(java.lang.Object)
public boolean equals(Object other)
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 Object
other
- the version to be compared to this onetrue
of the versions are equalObject.equals(java.lang.Object)
public FormatVersion clone()