Version is defined as a list of decimal digits separated by the dot. Convention for Fan pods is a four part version format of major.minor.build.patch
.
Slots
- buildSource
-
Int? build()
Get the third segment which represents the build number. If return null if less than three segments.
- compareSource
-
Overrides sys::Obj.compare
Compare from from most significant segment to least significant segment.
Examples:
1.6 > 1.4 2.0 > 1.9 1.2.3 > 1.2 1.11 > 1.9.3
- equalsSource
-
override Bool equals(Obj? obj)
Overrides sys::Obj.equals
Return true if equal segments.
- fromStrSource
-
static Version? fromStr(Str version, Bool checked := true)
Parse a string representation into a Version. If invalid format and checked is false return null, otherwise throw ParseErr.
- hashSource
-
override Int hash()
Overrides sys::Obj.hash
Return toStr.hash
- majorSource
-
Int major()
Get the first, most significant segment which represents the major version.
- makeSource
-
static Version make(Int[] segments)
Construct with list of integer segments. Throw ArgErr if segments is empty or contains negative numbers.
- minorSource
-
Int? minor()
Get the second segment which represents the minor version. If return null if less than two segments.
- patchSource
-
Int? patch()
Get the fourth segment which represents the patch number. If return null if less than four segments.
-
new privateMake()
Private constructor
- segmentsSource
-
Int[] segments()
Get a readonly list of the integer segments.
- toStrSource
-
override Str toStr()
Overrides sys::Obj.toStr
The string format is equivalent to segments.join(".")