Package akka.util
Class Version
- java.lang.Object
-
- akka.util.Version
-
- All Implemented Interfaces:
java.lang.Comparable<Version>
public final class Version extends java.lang.Object implements java.lang.Comparable<Version>
Comparable version information.The typical convention is to use 3 digit version numbers
major.minor.patch
, but 1 or two digits are also supported.If no
.
is used it is interpreted as a single digit version number or as plain alphanumeric if it couldn't be parsed as a number.It may also have a qualifier at the end for 2 or 3 digit version numbers such as "1.2-RC1". For 1 digit with qualifier, 1-RC1, it is interpreted as plain alphanumeric.
It has support for https://github.com/dwijnand/sbt-dynver format with
+
or-
separator. The number of commits from the tag is handled as a numeric part. For example1.0.0+3-73475dce26
is less than1.0.10+10-ed316bd024
(3 < 10).
-
-
Constructor Summary
Constructors Constructor Description Version(java.lang.String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Version
apply(java.lang.String version)
int
compareTo(Version other)
boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
toString()
java.lang.String
version()
static Version
Zero()
-
-
-
Method Detail
-
Zero
public static Version Zero()
-
apply
public static Version apply(java.lang.String version)
-
version
public java.lang.String version()
-
compareTo
public int compareTo(Version other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Version>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-