Enum EJavaVersion

    • Method Detail

      • values

        public static EJavaVersion[] 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 (EJavaVersion c : EJavaVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EJavaVersion valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isMatchingVersion

        protected boolean isMatchingVersion​(double dVersion)
      • isCurrentVersion

        public boolean isCurrentVersion()
        Returns:
        true if this is the current version, false otherwise
      • isSupportedVersion

        public boolean isSupportedVersion()
        Returns:
        true if this Java version is supported by the current Java Version. It is expected that all versions are backward compatible.
      • isOlderOrEqualsThan

        public boolean isOlderOrEqualsThan​(@Nonnull
                                           EJavaVersion eJavaVersion)
        Check if this java version is older or equals than the passed version
        Parameters:
        eJavaVersion - the Java version to be checked. May not be null.
        Returns:
        true if this Java version is old or equal than the passed version.
      • isNewerOrEqualsThan

        public boolean isNewerOrEqualsThan​(@Nonnull
                                           EJavaVersion eJavaVersion)
        Check if this java version is newer or equals than the passed version
        Parameters:
        eJavaVersion - the Java version to be checked. May not be null.
        Returns:
        true if this Java version is newer or equal than the passed version.
      • getCurrentVersion

        @Nonnull
        public static EJavaVersion getCurrentVersion()
        Returns:
        The current Java version. If the Java version could not be determined, UNKNOWN is returned and never null.
      • getFromMajorAndMinor

        @Nonnull
        public static EJavaVersion getFromMajorAndMinor​(int nMajor,
                                                        int nMinor)
        Get the matching Java version from a class version.
        Parameters:
        nMajor - Major version number
        nMinor - Minor version number
        Returns:
        UNKNOWN if the version could not be determined.
      • getFromVersionNumber

        @Nonnull
        public static EJavaVersion getFromVersionNumber​(double dVersion)