Class Version
java.lang.Object
net.ME1312.Galaxi.Library.Version.Version
- All Implemented Interfaces:
Serializable
,Comparable<Version>
Version Class
- See Also:
-
Constructor Summary
ConstructorDescriptionVersion
(int... ints) Creates a VersionCreates a VersionCreates a Version (Appending the parent)Creates a Version (Appending the parent)Version
(Version parent, VersionType type, int... ints) Creates a Version (Appending the parent)Version
(Version parent, VersionType type, String string) Creates a Version (Appending the parent)Version
(VersionType type, int... ints) Creates a VersionVersion
(VersionType type, String string) Creates a Version -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Compare Versionsint
Compare Versionsboolean
boolean
See if Versions are Equalstatic boolean
See if Versions are Equalstatic Version
fromString
(String string) Parse a Version from a stringThe extended toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
1.0.0 pre-alpha 7The full extended toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
version 1.0.0 pre-alpha 7The full toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
v1.0.0/pa7static String
toFullString
(Collection<Version> collection) The full toString() method for CollectionstoString()
The default toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
1.0.0/pa7static String
toString
(Collection<Version> collection) The default toString() method for Collections
-
Constructor Details
-
Version
Creates a Version- Parameters:
string
- Version String
-
Version
Creates a Version- Parameters:
type
- Version Typestring
- Version String
-
Version
Creates a Version (Appending the parent)- Parameters:
parent
- Parent Versionstring
- Version String
-
Version
Creates a Version (Appending the parent)- Parameters:
parent
- Parent Versiontype
- Version Typestring
- Version String
-
Version
public Version(int... ints) Creates a Version- Parameters:
ints
- Version Numbers (Will be separated with dots)
-
Version
Creates a Version- Parameters:
type
- Version Typeints
- Version Numbers (Will be separated with dots)
-
Version
Creates a Version (Appending the parent)- Parameters:
parent
- Parent Versionints
- Version Numbers (Will be separated with dots)
-
Version
Creates a Version (Appending the parent)- Parameters:
parent
- Parent Versiontype
- Version Typeints
- Version Numbers (Will be separated with dots)
-
-
Method Details
-
fromString
Parse a Version from a string- Parameters:
string
- String to parse- See Also:
-
toString
The default toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
1.0.0/pa7 -
toFullString
The full toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
v1.0.0/pa7- Returns:
- Version as a 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- Returns:
- Version as a String
-
toFullExtendedString
The full extended toString() method
new Version(new Version("1.0.0"), VersionType.PRE_ALPHA, "7") would return:
version 1.0.0 pre-alpha 7- Returns:
- Version as a String
-
toString
The default toString() method for Collections- Parameters:
collection
- Version Collection- Returns:
- Version Collection as a String
- See Also:
-
toFullString
The full toString() method for Collections- Parameters:
collection
- Version Collection- Returns:
- Version Collection as a String
- See Also:
-
equals
-
equals
See if Versions are Equal- Parameters:
version
- Version to Compare to- Returns:
-
compareTo
Compare Versions- Specified by:
compareTo
in interfaceComparable<Version>
- Parameters:
version
- Version to Compare to
-
equals
See if Versions are Equal- Parameters:
ver1
- Version to Comparever2
- Version to Compare- Returns:
-
compare
Compare Versions- Parameters:
ver1
- Version to Comparever2
- Version to Compare
-