Package 

Enum JavaVersion

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

    
    public enum JavaVersion
    
                        

    An enum representing all the versions of the Java specification. This is intended to mirror available values from the java.specification.version System property.

    • Method Summary

      Modifier and Type Method Description
      boolean atLeast(JavaVersion requiredVersion) Whether this version of Java is at least the version of Java passed in.
      String toString() The string value is overridden to return the standard name.
      static Array<JavaVersion> values()
      static JavaVersion valueOf(String name)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • atLeast

         boolean atLeast(JavaVersion requiredVersion)

        Whether this version of Java is at least the version of Java passed in.

        For example:{@code myVersion.atLeast(JavaVersion.JAVA_1_4)}

        Parameters:
        requiredVersion - the version to check against, not null
      • toString

         String toString()

        The string value is overridden to return the standard name.

        For example, "1.5".