android-components / mozilla.components.concept.engine.utils / EngineVersion

EngineVersion

data class EngineVersion (source)

Data class for engine versions using semantic versioning (major.minor.patch).

Parameters

major - Major version number

minor - Minor version number

patch - Patch version number

metadata - Additional and optional metadata appended to the version number, e.g. for a version number of “68.0a1” metadata will contain “a1”.

Constructors

Name Summary
<init> EngineVersion(major: Int, minor: Int, patch: Long, metadata: String? = null)
Data class for engine versions using semantic versioning (major.minor.patch).

Properties

Name Summary
major val major: Int
Major version number
metadata val metadata: String?
Additional and optional metadata appended to the version number, e.g. for a version number of “68.0a1” metadata will contain “a1”.
minor val minor: Int
Minor version number
patch val patch: Long
Patch version number

Functions

Name Summary
compareTo operator fun compareTo(other: EngineVersion): Int
isAtLeast fun isAtLeast(major: Int, minor: Int = 0, patch: Long = 0): Boolean
Returns true if this version number equals or is higher than the provided major, minor, patch version numbers.
toString fun toString(): String

Companion Object Functions

Name Summary
parse fun parse(version: String): EngineVersion?
Parses the given version string and returns an EngineVersion. Returns null if the version string could not be parsed successfully.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.