public class SchemaVersion extends Object implements Comparable
1, 1.0,
2.1.1.| Modifier and Type | Field and Description |
|---|---|
static String |
DEV_VERSION
Defines the development version string - this is the schema version on development builds.
|
static String |
LATEST_VERSION
Defines the version string that indicates this is the latest schema version.
|
| Constructor and Description |
|---|
SchemaVersion(String version_string)
Creates a new
SchemaVersion object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
between(SchemaVersion start_exclusive,
SchemaVersion end_inclusive)
Determines if this version is newer than
start_exclusive but equal to or older than
end_inclusive. |
int |
compareTo(Object o) |
boolean |
equals(Object o) |
boolean |
getIsLatest()
Returns
true if this version is to be considered the latest schema version; no other schema versions
are considered newer than the version this object represents. |
int |
getMajorVersion()
The major version number, which is the left most number in the X.X.X version string.
|
int |
getMinorVersion()
The minor version number, which is the second number in the X.X.X version string.
|
int |
getPatchVersion()
The patch version number, which is the third number in the X.X.X version string.
|
int |
hashCode() |
String |
toString() |
public static final String DEV_VERSION
latest version.public static final String LATEST_VERSION
public SchemaVersion(String version_string) throws IllegalArgumentException
SchemaVersion object. If the version_string is null, it will be
considered the latest version.version_string - IllegalArgumentException - if the string was not a valid versionpublic int getMajorVersion()
public int getMinorVersion()
public int getPatchVersion()
public boolean getIsLatest()
true if this version is to be considered the latest schema version; no other schema versions
are considered newer than the version this object represents.true if this version string represents the newest version.public int compareTo(Object o)
compareTo in interface ComparableComparable.compareTo(java.lang.Object)public String toString()
toString in class ObjectObject.toString()public boolean equals(Object o)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean between(SchemaVersion start_exclusive, SchemaVersion end_inclusive)
start_exclusive but equal to or older than
end_inclusive.start_exclusive - the version that this version should be newer thanend_inclusive - the version that this version should equal or be older thantrue if this version is between the two given versionsCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.