Enum JavaVersion

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<JavaVersion>

    public enum JavaVersion
    extends java.lang.Enum<JavaVersion>
    • Method Detail

      • values

        public static JavaVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JavaVersion c : JavaVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JavaVersion valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getRuntimeVersion

        public static JavaVersion getRuntimeVersion()
      • fromVersionId

        public static java.util.Optional<JavaVersion> fromVersionId​(double versionId)
      • fromVersion

        public static java.util.Optional<JavaVersion> fromVersion​(int version)
      • getVersion

        public int getVersion()
      • getVersionId

        public double getVersionId()
      • getName

        public java.lang.String getName()
      • isUnknown

        public boolean isUnknown()
      • isSupportedByMin

        public boolean isSupportedByMin​(JavaVersion minRequiredJavaVersion)
      • isSupportedByMax

        public boolean isSupportedByMax​(JavaVersion maxRequiredJavaVersion)