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 int
compareTo(Version other)
Compares thisVersion
object to anotherVersion
.boolean
equals(java.lang.Object obj)
int
getMajorVersion()
Get the major versionint
getMicroVersion()
Get the minor versionint
getMinorVersion()
Get the major versionjava.lang.String
getQualifier()
Get the qualifierint
hashCode()
java.lang.String
toString()
-
-
-
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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(Version other)
Compares thisVersion
object to anotherVersion
.- Specified by:
compareTo
in interfacejava.lang.Comparable<Version>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-