Enum Class GoVer
- All Implemented Interfaces:
Serializable
,Comparable<GoVer>
,Constable
Golang version numbers
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GoVer
fromProgramProperties
(Program program) int
getMajor()
Major valueint
getMinor()
Minor valueboolean
Compares this version to the specified other version and returns true if this version is greater than or equal to the other version.static GoVer
Parses a version string ("1.2") and returns the matching GoVer enum instance, or UNKNOWN if no matching version or bad data.static void
static GoVer
Returns the enum constant of this class with the specified name.static GoVer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
V1_2
-
V1_16
-
V1_17
-
V1_18
-
V1_19
-
V1_20
-
V1_21
-
V1_22
-
-
Field Details
-
GOLANG_VERSION_PROPERTY_NAME
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getMajor
public int getMajor()Major value- Returns:
- major
-
getMinor
public int getMinor()Minor value- Returns:
- minor
-
isAtLeast
Compares this version to the specified other version and returns true if this version is greater than or equal to the other version.- Parameters:
otherVersion
- version info to compare- Returns:
- true if this version is gte other version
-
parse
Parses a version string ("1.2") and returns the matching GoVer enum instance, or UNKNOWN if no matching version or bad data.- Parameters:
s
- string to parse- Returns:
- GoVer enum instance, or UNKNOWN
-
fromProgramProperties
-
setProgramPropertiesWithOriginalVersionString
-