Interface RuntimeVersionType

All Superinterfaces:
java.lang.Comparable<RuntimeVersionType>
All Known Implementing Classes:
RuntimeVersion

@Immutable
public interface RuntimeVersionType
extends java.lang.Comparable<RuntimeVersionType>
A (slightly reduced) version number for Java runtimes. This version represents a subset of the possible data present in Java runtime versions. Specifically, this version number represents just the semantic versioning information, plus a build number.
See Also:
"https://openjdk.java.net/jeps/223"
  • Method Details

    • major

      java.math.BigInteger major()
      Returns:
      The major version
    • minor

      java.math.BigInteger minor()
      Returns:
      The minor version
    • patch

      java.math.BigInteger patch()
      Returns:
      The patch version
    • build

      java.util.Optional<java.math.BigInteger> build()
      Returns:
      The build number, if any
    • compareTo

      default int compareTo​(RuntimeVersionType other)
      Specified by:
      compareTo in interface java.lang.Comparable<RuntimeVersionType>
    • toExternalString

      default java.lang.String toExternalString()
      Returns:
      The version as an external string (such as "3.2.1+200")
    • toExternalMinimalString

      default java.lang.String toExternalMinimalString()
      Returns:
      The version as an external string (such as "3.2.1+200")