Package org.hotswap.agent.versions
Class ArtifactVersion
- java.lang.Object
-
- org.hotswap.agent.versions.ArtifactVersion
-
- All Implemented Interfaces:
Comparable<ArtifactVersion>
public class ArtifactVersion extends Object implements Comparable<ArtifactVersion>
Default implementation of artifact versioning.- Author:
- Brett Porter
-
-
Constructor Summary
Constructors Constructor Description ArtifactVersion(String version)Instantiates a new artifact version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ArtifactVersion otherVersion)Stringdump()Dump.booleanequals(Object other)intgetBuildNumber()Gets the builds the number.intgetIncrementalVersion()Gets the incremental version.intgetMajorVersion()Gets the major version.intgetMinorVersion()Gets the minor version.StringgetQualifier()Gets the qualifier.StringgetVersion()Gets the version.inthashCode()voidparseVersion(String version)Parses the version.StringtoString()
-
-
-
Constructor Detail
-
ArtifactVersion
public ArtifactVersion(String version)
Instantiates a new artifact version.- Parameters:
version- the version
-
-
Method Detail
-
getVersion
public String getVersion()
Gets the version.- Returns:
- the version
-
compareTo
public int compareTo(ArtifactVersion otherVersion)
- Specified by:
compareToin interfaceComparable<ArtifactVersion>
-
getMajorVersion
public int getMajorVersion()
Gets the major version.- Returns:
- the major version
-
getMinorVersion
public int getMinorVersion()
Gets the minor version.- Returns:
- the minor version
-
getIncrementalVersion
public int getIncrementalVersion()
Gets the incremental version.- Returns:
- the incremental version
-
getBuildNumber
public int getBuildNumber()
Gets the builds the number.- Returns:
- the builds the number
-
getQualifier
public String getQualifier()
Gets the qualifier.- Returns:
- the qualifier
-
parseVersion
public final void parseVersion(String version)
Parses the version.- Parameters:
version- the version
-
dump
public String dump()
Dump.- Returns:
- the string
-
-