public class Version extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Version>
Modifier and Type | Class and Description |
---|---|
static class |
Version.VersionType |
Constructor and Description |
---|
Version(int... ints)
Creates a Version
|
Version(java.lang.String string)
Creates a Version
|
Version(Version.VersionType type,
int... ints)
Creates a Version
|
Version(Version.VersionType type,
java.lang.String string)
Creates a Version
|
Version(Version parent,
int... ints)
Creates a Version (Prepending the parent)
|
Version(Version parent,
java.lang.String string)
Creates a Version (Prepending the parent)
|
Version(Version parent,
Version.VersionType type,
int... ints)
Creates a Version (Prepending the parent)
|
Version(Version parent,
Version.VersionType type,
java.lang.String string)
Creates a Version (Prepending the parent)
|
Modifier and Type | Method and Description |
---|---|
static int |
compare(Version ver1,
Version ver2)
Compare Versions
|
int |
compareTo(Version version)
Compare Versions
|
boolean |
equals(java.lang.Object object) |
boolean |
equals(Version version)
See if Versions are Equal
|
static boolean |
equals(Version ver1,
Version ver2)
See if Versions are Equal
|
java.lang.String |
toExtendedString()
The extended toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return: 1.0.0 pre-alpha 7 |
java.lang.String |
toFullExtendedString()
The full extended toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return: release 1.0.0 pre-alpha 7 |
java.lang.String |
toFullString()
The full toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return: r1.0.0/pa7 |
java.lang.String |
toString()
The default toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return: 1.0.0/pa7 |
public Version(java.lang.String string)
string
- Version Stringpublic Version(Version.VersionType type, java.lang.String string)
type
- Version Typestring
- Version Stringpublic Version(Version parent, java.lang.String string)
parent
- Parent Versionstring
- Version Stringpublic Version(Version parent, Version.VersionType type, java.lang.String string)
parent
- Parent Versiontype
- Version Typestring
- Version Stringpublic Version(int... ints)
ints
- Version Numbers (Will be separated with dots)public Version(Version.VersionType type, int... ints)
type
- Version Typeints
- Version Numbers (Will be separated with dots)public Version(Version parent, int... ints)
parent
- Parent Versionints
- Version Numbers (Will be separated with dots)public Version(Version parent, Version.VersionType type, int... ints)
parent
- Parent Versiontype
- Version Typeints
- Version Numbers (Will be separated with dots)public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toFullString()
public java.lang.String toExtendedString()
public java.lang.String toFullExtendedString()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public boolean equals(Version version)
version
- Version to Comparepublic int compareTo(Version version)
compareTo
in interface java.lang.Comparable<Version>
version
- The version to compare topublic static boolean equals(Version ver1, Version ver2)
ver1
- Version to Comparever2
- Version to Compare