Package ai.djl.repository
Class Version
- java.lang.Object
-
- ai.djl.repository.Version
-
-
Constructor Summary
Constructors Constructor Description Version(java.lang.String version)Constructs a version with the version string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Version otherVersion)booleanequals(java.lang.Object o)intgetIncrementalVersion()Returns the incremental version (assuming major.minor.incremental...) of the version.intgetMajorVersion()Returns the major version (assuming major.minor.incremental...) of the version.intgetMinorVersion()Returns the minor version (assuming major.minor.incremental...) of the version.inthashCode()booleanisSnapshot()Returns true if this is a snapshot version.java.lang.StringtoString()
-
-
-
Method Detail
-
compareTo
public int compareTo(Version otherVersion)
- Specified by:
compareToin interfacejava.lang.Comparable<Version>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getMajorVersion
public int getMajorVersion()
Returns the major version (assuming major.minor.incremental...) of the version.- Returns:
- the major version
-
getMinorVersion
public int getMinorVersion()
Returns the minor version (assuming major.minor.incremental...) of the version.- Returns:
- the minor version
-
getIncrementalVersion
public int getIncrementalVersion()
Returns the incremental version (assuming major.minor.incremental...) of the version.- Returns:
- the incremental version
-
isSnapshot
public boolean isSnapshot()
Returns true if this is a snapshot version.- Returns:
- true if this is a snapshot version
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-