Class Version
- java.lang.Object
-
- org.apache.sling.provisioning.model.Version
-
-
Constructor Summary
Constructors Constructor Description Version(java.lang.String version)Creates a version identifier from the specified string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Version other)Compares thisVersionobject to anotherVersion.booleanequals(java.lang.Object obj)intgetMajorVersion()Get the major versionintgetMicroVersion()Get the minor versionintgetMinorVersion()Get the major versionjava.lang.StringgetQualifier()Get the qualifierinthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getMajorVersion
public int getMajorVersion()
Get the major version- Returns:
- The major version
- Since:
- 1.8.0
-
getMinorVersion
public int getMinorVersion()
Get the major version- Returns:
- The major version
- Since:
- 1.8.0
-
getMicroVersion
public int getMicroVersion()
Get the minor version- Returns:
- The minor version
- Since:
- 1.8.0
-
getQualifier
public java.lang.String getQualifier()
Get the qualifier- Returns:
- The qualifier, the qualifier might be the empty string.
- Since:
- 1.8.0
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(Version other)
Compares thisVersionobject to anotherVersion.- Specified by:
compareToin interfacejava.lang.Comparable<Version>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-