covers

fun covers(version: Version): Boolean

Returns whether this Version is greater than or equal to the specified version instance.

Version.from("2.5.250").covers(Version.from("1.4.200")) // true
Version.from("2.5.250").covers(Version.from("2.1.214")) // true
Version.from("2.5.250").covers(Version.from("2.5.250")) // true
Version.from("2.3.230").covers(Version.from("2.3.232")) // false

fun covers(version: String): Boolean

Returns whether this Version is greater than or equal to the specified String version.

Version.from("2.5.250").covers("1.4.200") // true
Version.from("2.5.250").covers("2.1.214") // true
Version.from("2.5.250").covers("2.5.250") // true
Version.from("2.3.230").covers("2.3.232") // false

fun covers(version: BigDecimal): Boolean

Returns whether this Version is greater than or equal to the specified BigDecimal version.

Version.from("2.5.250").covers(BigDecimal("1.4.200")) // true
Version.from("2.5.250").covers(BigDecimal("2.1.214")) // true
Version.from("2.5.250").covers(BigDecimal("2.5.250")) // true
Version.from("2.3.230").covers(BigDecimal("2.3.232")) // false

fun covers(major: Int, minor: Int = 0, patch: Int = 0): Boolean

Returns whether this Version is greater than or equal to the specified version number parts.

Version.from("2.5.250").covers(1, 4, 200)) // true
Version.from("2.5.250").covers(2, 1, 214)) // true
Version.from("2.5.250").covers(2, 5, 250)) // true
Version.from("2.3.230").covers(2, 3, 232)) // false