Package org.identityconnectors.common
Class Version
- java.lang.Object
- 
- org.identityconnectors.common.Version
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Version that)static Versioncreate(java.lang.Integer... components)Creates a new version from components.booleanequals(java.lang.Object o)java.lang.IntegergetMajor()Returns this version number's major component.java.lang.IntegergetMicro()Returns this version number's minor component.java.lang.IntegergetMinor()Returns this version number's minor component.java.lang.IntegergetRevision()Returns this version number's minor component.java.lang.StringgetVersion()Returns this version as a string.inthashCode()static Versionparse(java.lang.String version)Parses the passed version string.java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
parsepublic static Version parse(java.lang.String version) Parses the passed version string. The string can contain up to four numeric component separated by a dot, followed by an alphanumberic qualifier prepended by a dash. For example, the following are valid versions:- 1
- 1.1
- 1.1.0
- 1.2.3-alpha
- 1.2.3.4-SNAPSHOT
 - Parameters:
- version- the version string.
 
 - 
createpublic static Version create(java.lang.Integer... components) Creates a new version from components.- Parameters:
- components- the components
 
 - 
getMajorpublic java.lang.Integer getMajor() Returns this version number's major component.- Returns:
- the major component; never null.
 
 - 
getMinorpublic java.lang.Integer getMinor() Returns this version number's minor component.- Returns:
- the minor component or nullif this version number doesn't have a minor component.
 
 - 
getMicropublic java.lang.Integer getMicro() Returns this version number's minor component.- Returns:
- the minor component or nullif this version number doesn't have a minor component.
 
 - 
getRevisionpublic java.lang.Integer getRevision() Returns this version number's minor component.- Returns:
- the minor component or nullif this version number doesn't have a revision component.
 
 - 
getVersionpublic java.lang.String getVersion() Returns this version as a string.- Returns:
- this version as a string.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
compareTopublic int compareTo(Version that) - Specified by:
- compareToin interface- java.lang.Comparable<Version>
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-