gradle
8.3

# JavaLanguageVersion

interface JavaLanguageVersion : Comparable<T>

Represents a Java Language version

## Functions

asInt
Link copied to clipboard
abstract fun asInt(): Int
Return this version as a number, 14 for Java 14.
canCompileOrRun
Link copied to clipboard
abstract fun canCompileOrRun(otherVersion: Int): Boolean
abstract fun canCompileOrRun(other: JavaLanguageVersion): Boolean
Indicates if this version can compile or run code based on the passed in language version.
compareTo
Link copied to clipboard
abstract fun compareTo(p: T): Int
of
Link copied to clipboard
open fun of(version: Int): JavaLanguageVersion
open fun of(version: String): JavaLanguageVersion
toString
Link copied to clipboard
abstract fun toString(): String
Return this version as a String, "14" for Java 14.